Fix benchmark
This commit is contained in:
parent
42013d27a0
commit
e9537b29a3
|
@ -40,18 +40,20 @@ long run_bench(int scale, int max_seconds) {
|
||||||
|
|
||||||
fr_t *zero_eval = malloc(fs.max_width * sizeof(fr_t));
|
fr_t *zero_eval = malloc(fs.max_width * sizeof(fr_t));
|
||||||
fr_t *zero_poly = malloc(fs.max_width * sizeof(fr_t));
|
fr_t *zero_poly = malloc(fs.max_width * sizeof(fr_t));
|
||||||
uint64_t zero_poly_len;
|
poly zero_poly_p;
|
||||||
|
zero_poly_p.coeffs = zero_poly;
|
||||||
|
zero_poly_p.length = fs.max_width;
|
||||||
while (total_time < max_seconds * NANO) {
|
while (total_time < max_seconds * NANO) {
|
||||||
clock_gettime(CLOCK_REALTIME, &t0);
|
clock_gettime(CLOCK_REALTIME, &t0);
|
||||||
// Half missing leaves enough FFT computation space
|
// Half missing leaves enough FFT computation space
|
||||||
assert(C_KZG_OK == zero_polynomial_via_multiplication(zero_eval, zero_poly, &zero_poly_len, fs.max_width,
|
assert(C_KZG_OK == zero_polynomial_via_multiplication(zero_eval, &zero_poly_p, fs.max_width, missing,
|
||||||
missing, fs.max_width / 2, &fs));
|
fs.max_width / 2, &fs));
|
||||||
clock_gettime(CLOCK_REALTIME, &t1);
|
clock_gettime(CLOCK_REALTIME, &t1);
|
||||||
nits++;
|
nits++;
|
||||||
total_time += tdiff(t0, t1);
|
total_time += tdiff(t0, t1);
|
||||||
}
|
}
|
||||||
|
|
||||||
free(zero_poly);
|
free_poly(&zero_poly_p);
|
||||||
free(zero_eval);
|
free(zero_eval);
|
||||||
free(missing);
|
free(missing);
|
||||||
free_fft_settings(&fs);
|
free_fft_settings(&fs);
|
||||||
|
|
Loading…
Reference in New Issue