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

Method __encode

src/Module/Encoder/BCH/Encoder_BCH.cpp:45–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43
44template<typename B>
45void
46Encoder_BCH<B>::__encode(const B* U_K, B* par)
47{
48 std::fill(par, par + n_rdncy, (B)0);
49
50 for (auto i = this->K - 1; i >= 0; i--)
51 {
52 const auto feedback = U_K[i] ^ par[n_rdncy - 1];
53 for (auto j = n_rdncy - 1; j > 0; j--)
54 par[j] = par[j - 1] ^ (g[j] & feedback);
55 par[0] = feedback ? g[0] && feedback : 0;
56 }
57}
58
59template<typename B>
60void

Callers 2

_encodeMethod · 0.95
is_codewordMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected