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

Method is_codeword

src/Module/Encoder/RS/Encoder_RS.cpp:93–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

91
92template<typename B>
93bool
94Encoder_RS<B>::is_codeword(const B* X_N)
95{
96 spu::tools::Bit_packer::pack(X_N, this->packed_X_N.data(), this->N, 1, false, this->m);
97
98 this->__encode(this->packed_X_N.data() + this->n_rdncy, this->bb.data()); // encode the systematic bits
99
100 auto p = 0;
101 while (p < this->n_rdncy && (this->packed_X_N[p] == this->bb[p]))
102 p++; // compare the parity parts
103
104 return p == this->n_rdncy;
105}
106
107// ==================================================================================== explicit template instantiation
108#include "Tools/types.h"

Callers 5

_decode_siho_cwMethod · 0.45
_decode_hiho_cwMethod · 0.45
_decode_siho_cwMethod · 0.45

Calls 1

__encodeMethod · 0.95

Tested by

no test coverage detected