| 11 | |
| 12 | template<typename B, typename R> |
| 13 | Decoder_BCH_std<B, R>::Decoder_BCH_std(const int& K, const int& N, const tools::BCH_polynomial_generator<B>& GF_poly) |
| 14 | : Decoder_BCH<B, R>(K, N, GF_poly.get_t()) |
| 15 | , t2(2 * this->t) |
| 16 | , YH_N(N) |
| 17 | , elp(this->N_p2_1 + 2, std::vector<int>(this->N_p2_1)) |
| 18 | , discrepancy(this->N_p2_1 + 2) |
| 19 | , l(this->N_p2_1 + 2) |
| 20 | , u_lu(this->N_p2_1 + 2) |
| 21 | , s(t2 + 1) |
| 22 | , loc(this->t + 1) |
| 23 | , reg(this->t + 1) |
| 24 | , m(GF_poly.get_m()) |
| 25 | , d(GF_poly.get_d()) |
| 26 | , alpha_to(GF_poly.get_alpha_to()) |
| 27 | , index_of(GF_poly.get_index_of()) |
| 28 | { |
| 29 | const std::string name = "Decoder_BCH_std"; |
| 30 | this->set_name(name); |
| 31 | for (auto& t : this->tasks) |
| 32 | t->set_replicability(true); |
| 33 | |
| 34 | if ((this->N - this->K) != GF_poly.get_n_rdncy()) |
| 35 | { |
| 36 | std::stringstream message; |
| 37 | message << "'N - K' is different than 'GF_poly.get_n_rdncy()' ('K' = " << K << ", 'N' = " << N |
| 38 | << ", 'GF_poly.get_n_rdncy()' = " << GF_poly.get_n_rdncy() << ")."; |
| 39 | throw spu::tools::invalid_argument(__FILE__, __LINE__, __func__, message.str()); |
| 40 | } |
| 41 | } |
| 42 | |
| 43 | template<typename B, typename R> |
| 44 | Decoder_BCH_std<B, R>* |
nothing calls this directly
no test coverage detected