mirror of
https://github.com/aicodix/code.git
synced 2026-04-27 22:35:44 +00:00
rotate write disable bits right
This commit is contained in:
parent
4afdb249da
commit
cf035084e3
1 changed files with 4 additions and 4 deletions
|
|
@ -200,8 +200,8 @@ class LDPCDecoder
|
|||
wd_t mask = ((1 << count) - 1) << first;
|
||||
wd_t cur = wd[W*i+j];
|
||||
wd_t tmp = cur & mask;
|
||||
wd_t rol = (tmp << 1) | (tmp >> (count-1));
|
||||
wd[W*i+j] = (cur & ~mask) | (rol & mask);
|
||||
wd_t ror = (tmp >> 1) | (tmp << (count-1));
|
||||
wd[W*i+j] = (cur & ~mask) | (ror & mask);
|
||||
}
|
||||
first = c;
|
||||
}
|
||||
|
|
@ -250,8 +250,8 @@ public:
|
|||
}
|
||||
std::sort(lo, lo + cnt, [](const Loc &a, const Loc &b){ return a.off < b.off; });
|
||||
wd[W*i+j] = 0;
|
||||
for (int c = 1; c < cnt; ++c)
|
||||
if (lo[c].off == lo[c-1].off)
|
||||
for (int c = 0; c < cnt-1; ++c)
|
||||
if (lo[c].off == lo[c+1].off)
|
||||
wd[W*i+j] |= 1 << c;
|
||||
lo += cnt;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue