Skip to content

Commit

Permalink
ref: poly: improve scheduling for ntt and invntt
Browse files Browse the repository at this point in the history
  • Loading branch information
tfaoliveira committed Feb 9, 2024
1 parent acee459 commit f50b237
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions code/jasmin/mlkem_ref/poly.jinc
Original file line number Diff line number Diff line change
Expand Up @@ -486,9 +486,9 @@ fn _poly_invntt(reg ptr u16[MLKEM_N] rp) -> reg ptr u16[MLKEM_N]
cmp = start; cmp += len;
while (j < cmp)
{
t = rp[(int)j];
offset = j; offset += len;
s = rp[(int)offset];
t = rp[(int)j];
m = s; m += t;
m = __barrett_reduce(m);
rp[(int)j] = m;
Expand Down Expand Up @@ -544,14 +544,14 @@ fn _poly_ntt(reg ptr u16[MLKEM_N] rp) -> reg ptr u16[MLKEM_N]
cmp = start; cmp += len;
while (j < cmp)
{
s = rp[(int)j];
m = s;
offset = j; offset += len;
t = rp[(int)offset];
t = __fqmul(t, zeta);
s = rp[(int)j];
m = s;
m -= t;
rp[(int)offset] = m;
t += s;
rp[(int)offset] = m;
rp[(int)j] = t;
j += 1;
}
Expand Down

0 comments on commit f50b237

Please sign in to comment.