Permit COMB_BITS < 256 for exhaustive tests
This commit is contained in:
@@ -24,14 +24,15 @@ static const int CONFIGS[][2] = {
|
||||
};
|
||||
|
||||
static void print_table(FILE* fp, int blocks, int teeth) {
|
||||
int spacing = CEIL_DIV(256, blocks * teeth);
|
||||
size_t points = ((size_t)1) << (teeth - 1);
|
||||
int outer;
|
||||
size_t inner;
|
||||
|
||||
secp256k1_ge_storage* table = checked_malloc(&default_error_callback, blocks * points * sizeof(secp256k1_ge_storage));
|
||||
secp256k1_ecmult_gen_compute_table(table, &secp256k1_ge_const_g, blocks, teeth);
|
||||
secp256k1_ecmult_gen_compute_table(table, &secp256k1_ge_const_g, blocks, teeth, spacing);
|
||||
|
||||
fprintf(fp, "#elif (COMB_BLOCKS == %d) && (COMB_TEETH == %d)\n", blocks, teeth);
|
||||
fprintf(fp, "#elif (COMB_BLOCKS == %d) && (COMB_TEETH == %d) && (COMB_SPACING == %d)\n", blocks, teeth, spacing);
|
||||
for (outer = 0; outer != blocks; outer++) {
|
||||
fprintf(fp,"{");
|
||||
for (inner = 0; inner != points; inner++) {
|
||||
|
||||
Reference in New Issue
Block a user