Skip to content

Commit

Permalink
be explicit on shifts, the compiler gets this right but still
Browse files Browse the repository at this point in the history
  • Loading branch information
wjblanke committed Oct 13, 2024
1 parent 90c0f3d commit 71be19e
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/prover_slow.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ form GenerateWesolowski(form &y, form &x_init,
for (int64_t j = l - 1; j >= 0; j--) {
x = FastPowFormNucomp(x, D, integer(1 << k), L, reducer);

std::vector<form> ys((1 << k));
for (uint64_t i = 0; i < (1UL << k); i++)
std::vector<form> ys((1ULL << k));
for (uint64_t i = 0; i < (1ULL << k); i++)
ys[i] = form::identity(D);

for (uint64_t i = 0; i < (num_iterations + k * l - 1) / (k * l); i++) {
Expand All @@ -59,18 +59,18 @@ form GenerateWesolowski(form &y, form &x_init,
nucomp_form(ys[b], ys[b], intermediates[i], D, L);
}
}
for (uint64_t b1 = 0; b1 < (1UL << k1); b1++) {
for (uint64_t b1 = 0; b1 < (1ULL << k1); b1++) {
form z = form::identity(D);
for (uint64_t b0 = 0; b0 < (1UL << k0); b0++) {
nucomp_form(z, z, ys[b1 * (1 << k0) + b0], D, L);
for (uint64_t b0 = 0; b0 < (1ULL << k0); b0++) {
nucomp_form(z, z, ys[b1 * (1ULL << k0) + b0], D, L);
}
z = FastPowFormNucomp(z, D, integer(b1 * (1 << k0)), L, reducer);
z = FastPowFormNucomp(z, D, integer(b1 * (1ULL << k0)), L, reducer);
nucomp_form(x, x, z, D, L);
}
for (uint64_t b0 = 0; b0 < (1UL << k0); b0++) {
for (uint64_t b0 = 0; b0 < (1ULL << k0); b0++) {
form z = form::identity(D);
for (uint64_t b1 = 0; b1 < (1UL << k1); b1++) {
nucomp_form(z, z, ys[b1 * (1 << k0) + b0], D, L);
for (uint64_t b1 = 0; b1 < (1ULL << k1); b1++) {
nucomp_form(z, z, ys[b1 * (1ULL << k0) + b0], D, L);
}
z = FastPowFormNucomp(z, D, integer(b0), L, reducer);
nucomp_form(x, x, z, D, L);
Expand Down

0 comments on commit 71be19e

Please sign in to comment.