[she] add MCLSHE_WIN_SIZE macro

dev
MITSUNARI Shigeo 7 years ago
parent f59761d940
commit e2336179e9
  1. 2
      Makefile
  2. 5
      include/mcl/she.hpp

@ -218,7 +218,7 @@ $(EXPORTED_SHE_JS): ./include/mcl/she.h
EXPORTED_SHE=$(shell cat $(SHE_TXT))
docs/demo/mclshe.js: src/fp.cpp src/she_c256.cpp $(SHE_TXT) $(EXPORTED_SHE_JS)
emcc -o $@ src/fp.cpp src/she_c256.cpp -I./include -I./src -I../cybozulib/include -s WASM=1 -s "MODULARIZE=1" -s "EXPORTED_FUNCTIONS=[$(EXPORTED_SHE)]" -O3 -DNDEBUG -DMCLBN_FP_UNIT_SIZE=4 -DMCL_MAX_BIT_SIZE=256 -s DISABLE_EXCEPTION_CATCHING=0 -s NO_EXIT_RUNTIME=1
emcc -o $@ src/fp.cpp src/she_c256.cpp -I./include -I./src -I../cybozulib/include -s WASM=1 -s "MODULARIZE=1" -s "EXPORTED_FUNCTIONS=[$(EXPORTED_SHE)]" -O3 -DNDEBUG -DMCLBN_FP_UNIT_SIZE=4 -DMCL_MAX_BIT_SIZE=256 -s DISABLE_EXCEPTION_CATCHING=0 -s NO_EXIT_RUNTIME=1 -DMCLSHE_WIN_SIZE=8
demo:
$(MAKE) docs/demo/mclshe.js

@ -57,7 +57,10 @@ static thread_local std::random_device g_rg;
#else
static cybozu::RandomGenerator g_rg;
#endif
const size_t winSize = 10;
#ifndef MCLSHE_WIN_SIZE
#define MCLSHE_WIN_SIZE 10
#endif
const size_t winSize = MCLSHE_WIN_SIZE;
struct KeyCount {
uint32_t key;

Loading…
Cancel
Save