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

Method convert

src/Module/Encoder/Polar/Encoder_polar.cpp:64–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62
63template<typename B>
64void
65Encoder_polar<B>::convert(const B* U_K, B* U_N)
66{
67 if (U_K == U_N)
68 {
69 std::vector<B> U_K_tmp(this->K);
70 std::copy(U_K, U_K + this->K, U_K_tmp.begin());
71
72 auto j = 0;
73 for (unsigned i = 0; i < frozen_bits.size(); i++)
74 U_N[i] = (frozen_bits[i]) ? (B)0 : U_K_tmp[j++];
75 }
76 else
77 {
78 auto j = 0;
79 for (unsigned i = 0; i < frozen_bits.size(); i++)
80 U_N[i] = (frozen_bits[i]) ? (B)0 : U_K[j++];
81 }
82}
83
84template<typename B>
85bool

Callers 2

_encodeMethod · 0.95
_encodeMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected