Skip to content

Commit

Permalink
Fix macos compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
xevisalle committed Nov 4, 2023
1 parent 6761464 commit 577baa2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 5 additions & 1 deletion src/gro16/prover.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 577baa2

Please sign in to comment.