Skip to content

Commit

Permalink
Always generate tables for current (blocks,teeth) config
Browse files Browse the repository at this point in the history
  • Loading branch information
sipa committed Apr 19, 2024
1 parent fde1dfc commit 5f7be9f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/precompute_ecmult_gen.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ int main(int argc, char **argv) {
const char outfile[] = "src/precomputed_ecmult_gen.c";
FILE* fp;
size_t config;
int did_current_config = 0;

(void)argc;
(void)argv;
Expand All @@ -77,6 +78,12 @@ int main(int argc, char **argv) {
fprintf(fp, "#if 0\n");
for (config = 0; config < sizeof(CONFIGS) / sizeof(*CONFIGS); ++config) {
print_table(fp, CONFIGS[config][0], CONFIGS[config][1]);
if (CONFIGS[config][0] == COMB_BLOCKS && CONFIGS[config][1] == COMB_TEETH) {
did_current_config = 1;
}
}
if (!did_current_config) {
print_table(fp, COMB_BLOCKS, COMB_TEETH);
}
fprintf(fp, "#else\n");
fprintf(fp, "# error Configuration mismatch, invalid COMB_* parameters. Try deleting precomputed_ecmult_gen.c before the build.\n");
Expand Down

0 comments on commit 5f7be9f

Please sign in to comment.