aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMITSUNARI Shigeo <herumi@nifty.com>2018-12-05 15:12:31 +0800
committerMITSUNARI Shigeo <herumi@nifty.com>2018-12-05 15:12:31 +0800
commit6cfb77a18f9c82959121380a86e392ed664a31b9 (patch)
tree1a0fe22be77e899f0a4c5a4cec69a38f35c9284f
parentc2946c7a953263083fe0fd50f6c77d88a39eb877 (diff)
downloadtangerine-mcl-6cfb77a18f9c82959121380a86e392ed664a31b9.tar.gz
tangerine-mcl-6cfb77a18f9c82959121380a86e392ed664a31b9.tar.zst
tangerine-mcl-6cfb77a18f9c82959121380a86e392ed664a31b9.zip
clear() is reduced
-rw-r--r--include/mcl/bn.hpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/mcl/bn.hpp b/include/mcl/bn.hpp
index 7862010..708e97d 100644
--- a/include/mcl/bn.hpp
+++ b/include/mcl/bn.hpp
@@ -1564,17 +1564,22 @@ inline void mulSparse(Fp12& z, const Fp6& x)
}
inline void convertFp6toFp12(Fp12& y, const Fp6& x)
{
- y.clear();
if (BN::param.cp.isMtype) {
// (a, b, c) -> (a, c, 0, 0, b, 0)
y.a.a = x.a;
y.b.b = x.b;
y.a.b = x.c;
+ y.a.c.clear();
+ y.b.a.clear();
+ y.b.c.clear();
} else {
// (a, b, c) -> (b, 0, 0, c, a, 0)
y.b.b = x.a;
y.a.a = x.b;
y.b.a = x.c;
+ y.a.b.clear();
+ y.a.c.clear();
+ y.b.c.clear();
}
}
inline void mulSparse2(Fp12& z, const Fp6& x, const Fp6& y)