diff --git a/Makefile b/Makefile index 733e33a..3655131 100644 --- a/Makefile +++ b/Makefile @@ -33,7 +33,7 @@ else ifeq ($(ARCH), arm) $(CARM) $(COMMON) $(LIBCROSS) -D $(CURVE) $(MULTI_SET) else ifeq ($(shell uname), Darwin) - $(CC) $(COMMON) $(LIBMAC)-D $(CURVE) $(MULTI_SET) + $(CC) $(COMMON) $(LIBMAC) -D $(CURVE) $(MULTI_SET) -D IS_MAC_OS else $(CC) $(COMMON) $(LIB) -D $(CURVE) $(MULTI_SET) diff --git a/src/gro16/prover.c b/src/gro16/prover.c index c77e31a..edde8a8 100644 --- a/src/gro16/prover.c +++ b/src/gro16/prover.c @@ -111,7 +111,11 @@ void mul_exp(struct mulExpResult *result, mpz_t *uwProof, proving_key pk) if(i >= (nPublic + nConst)) mpz_to_fr(&uwFactorPublic[i-(nPublic + nConst)], &uw[i]); } - int num_threads = get_nprocs(); + #ifdef IS_MAC_OS + int num_threads = 8; + #else + int num_threads = get_nprocs(); + #endif mclBnG1_mulVecMT(&result->uwA1, pk.A1, uwFactor, M, num_threads); mclBnG1_mulVecMT(&result->uwB1, pk.B1, uwFactor, M, num_threads);