mirror of
https://github.com/aicodix/code.git
synced 2026-04-27 22:35:44 +00:00
calculate first q entries directly
This commit is contained in:
parent
86bf81dd2d
commit
6af9798553
1 changed files with 6 additions and 13 deletions
|
|
@ -208,20 +208,13 @@ public:
|
||||||
for (int g = 0; TABLE::LEN[g]; ++g) {
|
for (int g = 0; TABLE::LEN[g]; ++g) {
|
||||||
int bit_deg = TABLE::DEG[g];
|
int bit_deg = TABLE::DEG[g];
|
||||||
for (int r = 0; r < TABLE::LEN[g]; ++r) {
|
for (int r = 0; r < TABLE::LEN[g]; ++r) {
|
||||||
int acc_pos[bit_deg];
|
for (int d = 0; d < bit_deg; ++d) {
|
||||||
for (int d = 0; d < bit_deg; ++d)
|
int n = row_ptr[d] % q;
|
||||||
acc_pos[d] = row_ptr[d];
|
int m = row_ptr[d] / q;
|
||||||
row_ptr += bit_deg;
|
pos[CNC*n+cnc[n]++] = bit_pos + (M - m) % M;
|
||||||
for (int j = 0; j < M; ++j) {
|
|
||||||
for (int d = 0; d < bit_deg; ++d) {
|
|
||||||
int n = acc_pos[d];
|
|
||||||
if (n < q)
|
|
||||||
pos[CNC*n+cnc[n]++] = bit_pos;
|
|
||||||
}
|
|
||||||
++bit_pos;
|
|
||||||
for (int d = 0; d < bit_deg; ++d)
|
|
||||||
acc_pos[d] = (acc_pos[d] + q) % R;
|
|
||||||
}
|
}
|
||||||
|
row_ptr += bit_deg;
|
||||||
|
bit_pos += M;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue