| 76 | |
| 77 | template<typename B> |
| 78 | void |
| 79 | Encoder_RS<B>::_encode(const B* U_K, B* X_N, const size_t /*frame_id*/) |
| 80 | { |
| 81 | spu::tools::Bit_packer::pack(U_K, this->packed_U_K.data(), this->K, 1, false, this->m); |
| 82 | |
| 83 | // generate the parity bits |
| 84 | this->__encode(this->packed_U_K.data(), this->bb.data()); |
| 85 | |
| 86 | spu::tools::Bit_packer::unpack(this->bb.data(), X_N, this->n_rdncy_bits, 1, false, this->m); |
| 87 | |
| 88 | // copy the sys bits at the end of the codeword |
| 89 | std::copy(U_K, U_K + this->K, X_N + this->n_rdncy_bits); |
| 90 | } |
| 91 | |
| 92 | template<typename B> |
| 93 | bool |