stop papr reduction if goal is reached

This commit is contained in:
Ahmet Inan 2023-12-14 12:25:50 +01:00
commit c851ed2a5a

View file

@ -89,6 +89,8 @@ struct Encoder
if (norm(tdom[peak]) < norm(tdom[i]))
peak = i;
cmplx orig = tdom[peak];
if (norm(orig) <= value(1))
break;
for (int i = 0; i < peak; ++i)
tdom[i] -= orig * kern[symbol_len-peak+i];
for (int i = peak; i < symbol_len; ++i)