remove fpDbl_sqrPreA_

update-fork
MITSUNARI Shigeo 4 years ago
parent 64be787592
commit ebbb5cf6cc
  1. 7
      include/mcl/fp_tower.hpp
  2. 2
      include/mcl/op.hpp
  3. 4
      src/fp_generator.hpp
  4. 2
      src/fp_static_code.hpp

@ -128,7 +128,6 @@ public:
static void subPre(FpDblT& z, const FpDblT& x, const FpDblT& y) { Fp::op_.fpDbl_subPre(z.v_, x.v_, y.v_); }
static void mulPre(FpDblT& xy, const Fp& x, const Fp& y) { Fp::op_.fpDbl_mulPre(xy.v_, x.v_, y.v_); }
#endif
static void sqrPreC(FpDblT& xx, const Fp& x) { Fp::op_.fpDbl_sqrPre(xx.v_, x.v_); }
/*
mul(z, x, y) = mulPre(xy, x, y) + mod(z, xy)
*/
@ -155,11 +154,7 @@ public:
mulPre = fp::func_ptr_cast<void (*)(FpDblT&, const Fp&, const Fp&)>(op.fpDbl_mulPreA_);
if (mulPre == 0) mulPre = mulPreC;
#endif
if (op.fpDbl_sqrPreA_) {
sqrPre = fp::func_ptr_cast<void (*)(FpDblT&, const Fp&)>(op.fpDbl_sqrPreA_);
} else {
sqrPre = sqrPreC;
}
sqrPre = fp::func_ptr_cast<void (*)(FpDblT&, const Fp&)>(op.fpDbl_sqrPre);
}
void operator+=(const FpDblT& x) { add(*this, *this, x); }
void operator-=(const FpDblT& x) { sub(*this, *this, x); }

@ -222,7 +222,6 @@ struct Op {
void3u fpDbl_addA_;
void3u fpDbl_subA_;
void3u fpDbl_mulPreA_;
void2u fpDbl_sqrPreA_;
void2u fpDbl_modA_;
void3u fp2Dbl_mulPreA_;
void2u fp2Dbl_sqrPreA_;
@ -309,7 +308,6 @@ struct Op {
fpDbl_addA_ = 0;
fpDbl_subA_ = 0;
fpDbl_mulPreA_ = 0;
fpDbl_sqrPreA_ = 0;
fpDbl_modA_ = 0;
fp2Dbl_mulPreA_ = 0;
fp2Dbl_sqrPreA_ = 0;

@ -425,8 +425,8 @@ private:
setFuncInfo(prof_, suf, "Dbl_mulPre", op.fpDbl_mulPreA_, getCurr());
align(16);
op.fpDbl_sqrPreA_ = gen_fpDbl_sqrPre();
setFuncInfo(prof_, suf, "Dbl_sqrPre", op.fpDbl_sqrPreA_, getCurr());
op.fpDbl_sqrPre = gen_fpDbl_sqrPre();
setFuncInfo(prof_, suf, "Dbl_sqrPre", op.fpDbl_sqrPre, getCurr());
align(16);
op.fp2_addA_ = gen_fp2_add();

@ -66,7 +66,7 @@ void setStaticCode(mcl::fp::Op& op)
op.fpDbl_addPre = mclx_FpDbl_addPre;
op.fpDbl_subPre = mclx_FpDbl_subPre;
op.fpDbl_mulPreA_ = mclx_FpDbl_mulPre;
op.fpDbl_sqrPreA_ = mclx_FpDbl_sqrPre;
op.fpDbl_sqrPre = mclx_FpDbl_sqrPre;
op.fp2_addA_ = mclx_Fp2_add;
op.fp2_subA_ = mclx_Fp2_sub;
op.fp2_negA_ = mclx_Fp2_neg;

Loading…
Cancel
Save