clear() is reduced

dev
MITSUNARI Shigeo 6 years ago
parent c2946c7a95
commit 6cfb77a18f
  1. 7
      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)

Loading…
Cancel
Save