aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMITSUNARI Shigeo <herumi@nifty.com>2017-03-26 13:14:09 +0800
committerMITSUNARI Shigeo <herumi@nifty.com>2017-03-26 13:14:09 +0800
commitd6c61234e0f2d0840d597765152deeb254da17e1 (patch)
treec7e2cdfcc91a0747d2555369b1a479c444ccfaa7
parent0f328f81c20a840216db95967db258994d957591 (diff)
downloaddexon-mcl-d6c61234e0f2d0840d597765152deeb254da17e1.tar.gz
dexon-mcl-d6c61234e0f2d0840d597765152deeb254da17e1.tar.zst
dexon-mcl-d6c61234e0f2d0840d597765152deeb254da17e1.zip
old code is removed
-rw-r--r--include/mcl/util.hpp28
1 files changed, 0 insertions, 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<class G, class T>
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<T>(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
}
/*