diff options
author | MITSUNARI Shigeo <herumi@nifty.com> | 2017-09-28 07:29:36 +0800 |
---|---|---|
committer | MITSUNARI Shigeo <herumi@nifty.com> | 2017-09-28 07:29:36 +0800 |
commit | 6b6b7fd8b138a76bd3e58ea845f503b957ba4379 (patch) | |
tree | 3d07ce76d3c20c07a86639815e22f9f5ea5cc191 /include/mcl/she.hpp | |
parent | 3a69196261b7a6150bb814f2c0290d11ef12febd (diff) | |
download | dexon-mcl-6b6b7fd8b138a76bd3e58ea845f503b957ba4379.tar.gz dexon-mcl-6b6b7fd8b138a76bd3e58ea845f503b957ba4379.tar.zst dexon-mcl-6b6b7fd8b138a76bd3e58ea845f503b957ba4379.zip |
[she] change define macro for parameter
Diffstat (limited to 'include/mcl/she.hpp')
-rw-r--r-- | include/mcl/she.hpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/include/mcl/she.hpp b/include/mcl/she.hpp index 5cc31a8..d304ef1 100644 --- a/include/mcl/she.hpp +++ b/include/mcl/she.hpp @@ -18,26 +18,26 @@ #include <cmath> #include <vector> #include <iosfwd> -#if !defined(MCL_USE_BN256) && !defined(MCL_USE_BN384) && !defined(MCL_USE_BN512) - #define MCL_USE_BN256 +#ifndef MCLBN_FP_UNIT_SIZE + #define MCLBN_FP_UNIT_SIZE 4 #endif -#ifdef MCL_USE_BN256 +#if MCLBN_FP_UNIT_SIZE == 4 #include <mcl/bn256.hpp> namespace mcl { namespace bn_current = mcl::bn256; } -#endif -#ifdef MCL_USE_BN384 +#elif MCLBN_FP_UNIT_SIZE == 6 #include <mcl/bn384.hpp> namespace mcl { namespace bn_current = mcl::bn384; } -#endif -#ifdef MCL_USE_BN512 +#elif MCLBN_FP_UNIT_SIZE == 8 #include <mcl/bn512.hpp> namespace mcl { namespace bn_current = mcl::bn512; } +#else + #error "MCLBN_FP_UNIT_SIZE must be 4, 6, or 8" #endif #if CYBOZU_CPP_VERSION >= CYBOZU_CPP_VERSION_CPP11 |