| 91 | |
| 92 | template<typename B> |
| 93 | bool |
| 94 | Encoder_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" |
no test coverage detected