From d6c61234e0f2d0840d597765152deeb254da17e1 Mon Sep 17 00:00:00 2001 From: MITSUNARI Shigeo Date: Sun, 26 Mar 2017 14:14:09 +0900 Subject: [PATCH] old code is removed --- include/mcl/util.hpp | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/include/mcl/util.hpp b/include/mcl/util.hpp index 0d6ed71..fe8dc3c 100644 --- a/include/mcl/util.hpp +++ b/include/mcl/util.hpp @@ -197,33 +197,6 @@ void getRandVal(T *out, RG& rg, const T *in, size_t bitSize) template void powGeneric(G& out, const G& x, const T *y, size_t n, void mul(G&, const G&, const G&) , void sqr(G&, const G&)) { -#if 0 - assert(&out != &x); - while (n > 0) { - if (y[n - 1]) break; - n--; - } - if (n == 0) return; - out = x; - int m = cybozu::bsr(y[n - 1]); - if (m == 0) { - if (n == 1) return; - n--; - m = (int)sizeof(T) * 8; - } - for (int i = (int)n - 1; i >= 0; i--) { - T v = y[i]; - if (i < n - 1) { - m = (int)sizeof(T) * 8; - } - for (int j = m - 1; j >= 0; j--) { - sqr(out, out); - if (v & (T(1) << j)) { - mul(out, out, x); - } - } - } -#else assert(&out != &x); while (n > 0) { if (y[n - 1]) break; @@ -274,7 +247,6 @@ void powGeneric(G& out, const G& x, const T *y, size_t n, void mul(G&, const G&, } m = (int)sizeof(T) * 8; } -#endif } /*