MCPcopy Create free account
hub / github.com/aff3ct/aff3ct / conv1bitEnc

Method conv1bitEnc

src/Module/Encoder/Polar_PAC/Encoder_polar_PAC.cpp:115–132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

113
114template<typename B>
115B
116Encoder_polar_PAC<B>::conv1bitEnc(B cbit)
117{
118
119 B u = cbit && (B)conv_reg[0];
120 for (size_t i = 1; i < conv_reg.size(); i++)
121 {
122 if (conv_reg[i] == 1)
123 {
124 u = u ^ curState[i - 1];
125 }
126 }
127 for (int i = curState.size() - 1; i >= 1; i--)
128 curState[i] = curState[i - 1];
129 curState[0] = cbit;
130
131 return u;
132}
133
134template<typename B>
135void

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected