Skip to content

Commit 812d428

Browse files
committed
Allow field opt-in
Building with -DDISABLE_DEFAULT_FIELDS disables all fields, allowing only the desired ones to be enabled with -DDENABLE_FIELD_FOO. If a field is explicitly enabled and disabled, disable takes precedence.
1 parent 9d027d3 commit 812d428

20 files changed

+854
-362
lines changed

doc/gen_params.sage

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,14 +315,14 @@ def print_result(bits, style):
315315
assert(False)
316316

317317
for bits in range(2, 65):
318-
print("#ifndef DISABLE_FIELD_%i" % bits)
318+
print("#ifdef ENABLE_FIELD_INT_%i" % bits)
319319
print("// %i bit field" % bits)
320320
print_result(bits, INT)
321321
print("#endif")
322322
print("")
323323

324324
for bits in range(2, 65):
325-
print("#ifndef DISABLE_FIELD_%i" % bits)
325+
print("#ifdef ENABLE_FIELD_INT_%i" % bits)
326326
print("// %i bit field" % bits)
327327
print_result(bits, CLMUL)
328328
print_result(bits, CLMUL_TRI)

sources.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ MINISKETCH_DIST_HEADERS_INT += %reldir%/include/minisketch.h
1313

1414
MINISKETCH_LIB_HEADERS_INT =
1515
MINISKETCH_LIB_HEADERS_INT += %reldir%/src/false_positives.h
16+
MINISKETCH_LIB_HEADERS_INT += %reldir%/src/fielddefines.h
1617
MINISKETCH_LIB_HEADERS_INT += %reldir%/src/int_utils.h
1718
MINISKETCH_LIB_HEADERS_INT += %reldir%/src/lintrans.h
1819
MINISKETCH_LIB_HEADERS_INT += %reldir%/src/sketch.h

0 commit comments

Comments
 (0)