refactor: Make PREC_BITS a parameter of ecmult_gen_build_prec_table

This commit is contained in:
Tim Ruffing committed 2021-12-05 17:58:26 +01:00
1 parent a4875e30a6
commit fdb33dd122
6 files changed
+49 -36

No files matched your search

+2 -3
View File
@@ -13,9 +13,8 @@
#if ECMULT_GEN_PREC_BITS != 2 && ECMULT_GEN_PREC_BITS != 4 && ECMULT_GEN_PREC_BITS != 8
# error "Set ECMULT_GEN_PREC_BITS to 2, 4 or 8."
#endif
#define ECMULT_GEN_PREC_B ECMULT_GEN_PREC_BITS
#define ECMULT_GEN_PREC_G (1 << ECMULT_GEN_PREC_B)
#define ECMULT_GEN_PREC_N (256 / ECMULT_GEN_PREC_B)
#define ECMULT_GEN_PREC_G(bits) (1 << bits)
#define ECMULT_GEN_PREC_N(bits) (256 / bits)
typedef struct {
/* Whether the context has been built. */