@ -22,6 +22,9 @@
#pragma warning(disable : 4512)
#pragma warning(disable : 4146)
#endif
#ifdef __EMSCRIPTEN__
#define MCL_USE_VINT
#ifdef MCL_USE_VINT
#include <mcl/vint.hpp>
typedef mcl::Vint mpz_class;
@ -11,6 +11,10 @@
#ifndef MCL_MAX_BIT_SIZE
#define MCL_MAX_BIT_SIZE 521
#define MCL_DONT_USE_XBYAK
#define MCL_DONT_USE_OPENSSL
#if !defined(MCL_DONT_USE_XBYAK) && (defined(_WIN64) || defined(__x86_64__))
#define MCL_USE_XBYAK
@ -14,6 +14,10 @@
#include <iostream>
#include <mcl/util.hpp>
#define MCL_VINT_64BIT_PORTABLE
#ifndef MCL_SIZEOF_UNIT
#if defined(CYBOZU_OS_BIT) && (CYBOZU_OS_BIT == 32)
#define MCL_SIZEOF_UNIT 4
@ -252,10 +252,10 @@ void testPairing(const G1& P, const G2& Q, const char *eStr)
Fp12 e = e1, ea;
G1 Pa;
G2 Qa;
#if MCL_SIZEOF_UNIT == 8
const int count = 1000;
#else
#if defined(__EMSCRIPTEN__) || MCL_SIZEOF_UNIT == 4
const int count = 100;
mpz_class a;
cybozu::XorShift rg;