|
|
|
@ -11,6 +11,9 @@ 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_addNC96(uint32_t *z, const uint32_t *x, const uint32_t *y); |
|
|
|
|
extern "C" void mcl_fp_addNC128(uint32_t *z, const uint32_t *x, const uint32_t *y); |
|
|
|
|
extern "C" void mcl_fp_addNC160(uint32_t *z, const uint32_t *x, const uint32_t *y); |
|
|
|
|
extern "C" void mcl_fp_addNC192(uint32_t *z, const uint32_t *x, const uint32_t *y); |
|
|
|
|
extern "C" void mcl_fp_addNC224(uint32_t *z, const uint32_t *x, const uint32_t *y); |
|
|
|
|
extern "C" void mcl_fp_addNC256(uint32_t *z, const uint32_t *x, const uint32_t *y); |
|
|
|
|
extern "C" void add_test(uint32_t *z, const uint32_t *x, const uint32_t *y); |
|
|
|
|
|
|
|
|
@ -22,6 +25,9 @@ void addNC(uint32_t *z, const uint32_t *x, const uint32_t *y); |
|
|
|
|
DEF_ADD(64) |
|
|
|
|
DEF_ADD(96) |
|
|
|
|
DEF_ADD(128) |
|
|
|
|
DEF_ADD(160) |
|
|
|
|
DEF_ADD(192) |
|
|
|
|
DEF_ADD(224) |
|
|
|
|
DEF_ADD(256) |
|
|
|
|
|
|
|
|
|
#define CAT(S, BIT) "S##BIT" |
|
|
|
@ -48,8 +54,11 @@ void benchAdd() |
|
|
|
|
CYBOZU_TEST_AUTO(addNC64) { benchAdd<64>(); } |
|
|
|
|
CYBOZU_TEST_AUTO(addNC96) { benchAdd<96>(); } |
|
|
|
|
CYBOZU_TEST_AUTO(addNC128) { benchAdd<128>(); } |
|
|
|
|
CYBOZU_TEST_AUTO(addNC160) { benchAdd<160>(); } |
|
|
|
|
CYBOZU_TEST_AUTO(addNC192) { benchAdd<192>(); } |
|
|
|
|
CYBOZU_TEST_AUTO(addNC224) { benchAdd<224>(); } |
|
|
|
|
CYBOZU_TEST_AUTO(addNC256) { benchAdd<256>(); } |
|
|
|
|
#if 1 |
|
|
|
|
#if 0 |
|
|
|
|
CYBOZU_TEST_AUTO(addNC) |
|
|
|
|
{ |
|
|
|
|
using namespace mcl::fp; |
|
|
|
|