pub fn decode(
code: &LdpcCode,
llr: &mut [i16],
max_iters: usize,
) -> Result<usize, LdpcError>Expand description
Decodes using layered min-sum belief propagation.
llr must have at least code.n + code.punctured entries.
The first code.n are channel LLRs (positive = likely 0,
negative = likely 1). The remaining code.punctured entries
should be 0 (no channel information for punctured bits).
Returns Ok(iterations) on success (0 = already valid).
After return, hard decision for bit i: 0 if llr[i] >= 0,
1 if llr[i] < 0. The first code.k bits are decoded info.
Currently supports k=1024 codes only.