| 10 | |
| 11 | template<typename B, typename R> |
| 12 | Decoder_RS<B, R>::Decoder_RS(const int K, const int N, const tools::RS_polynomial_generator& GF) |
| 13 | : Decoder_SIHO<B, R>(K * GF.get_m(), N * GF.get_m()) |
| 14 | , K_rs(K) |
| 15 | , N_rs(N) |
| 16 | , m(GF.get_m()) |
| 17 | , n_rdncy_bits(GF.get_n_rdncy() * m) |
| 18 | , n_rdncy(GF.get_n_rdncy()) |
| 19 | , alpha_to(GF.get_alpha_to()) |
| 20 | , index_of(GF.get_index_of()) |
| 21 | , t(GF.get_t()) |
| 22 | , N_p2_1(spu::tools::next_power_of_2(N_rs) - 1) |
| 23 | , YH_N(N_rs) |
| 24 | , YH_Nb(this->N) |
| 25 | { |
| 26 | const std::string name = "Decoder_RS"; |
| 27 | this->set_name(name); |
| 28 | |
| 29 | if ((this->N_rs - this->K_rs) != this->n_rdncy) |
| 30 | { |
| 31 | std::stringstream message; |
| 32 | message << "'N_rs - K_rs' is different than 'n_rdncy' ('K_rs' = " << this->K_rs << ", 'N_rs' = " << this->N_rs |
| 33 | << ", 'n_rdncy' = " << n_rdncy << ", 'N_rs - K_rs' = " << (this->N_rs - this->K_rs) << ")."; |
| 34 | throw spu::tools::invalid_argument(__FILE__, __LINE__, __func__, message.str()); |
| 35 | } |
| 36 | } |
| 37 | |
| 38 | template<typename B, typename R> |
| 39 | Decoder_RS<B, R>* |
nothing calls this directly
no test coverage detected