|
|
@ -8,7 +8,6 @@ |
|
|
|
cybozu::XorShift rg; |
|
|
|
cybozu::XorShift rg; |
|
|
|
|
|
|
|
|
|
|
|
extern "C" void mcl_fp_addNC64(uint32_t *z, const uint32_t *x, const uint32_t *y); |
|
|
|
extern "C" void mcl_fp_addNC64(uint32_t *z, const uint32_t *x, const uint32_t *y); |
|
|
|
extern "C" void mcl_fp_addNC64_2(uint32_t *z, const uint32_t *x, const uint32_t *y); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CYBOZU_TEST_AUTO(addNC) |
|
|
|
CYBOZU_TEST_AUTO(addNC) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -23,12 +22,7 @@ CYBOZU_TEST_AUTO(addNC) |
|
|
|
low_add<N>(z, x, y); |
|
|
|
low_add<N>(z, x, y); |
|
|
|
mcl_fp_addNC64(w, x, y); |
|
|
|
mcl_fp_addNC64(w, x, y); |
|
|
|
CYBOZU_TEST_EQUAL_ARRAY(z, w, N); |
|
|
|
CYBOZU_TEST_EQUAL_ARRAY(z, w, N); |
|
|
|
mcl_fp_addNC64_2(w, x, y); |
|
|
|
|
|
|
|
CYBOZU_TEST_EQUAL_ARRAY(z, w, N); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
CYBOZU_BENCH("add1", mcl_fp_addNC64, x, x, y); |
|
|
|
CYBOZU_BENCH("add1", mcl_fp_addNC64, x, x, y); |
|
|
|
CYBOZU_BENCH("add2", mcl_fp_addNC64_2, x, x, y); |
|
|
|
|
|
|
|
CYBOZU_BENCH("add1", mcl_fp_addNC64, x, x, y); |
|
|
|
|
|
|
|
CYBOZU_BENCH("add2", mcl_fp_addNC64_2, x, x, y); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|