| 7 | using namespace aff3ct::module; |
| 8 | |
| 9 | Decoder_LDPC_BP ::Decoder_LDPC_BP(const int /*K*/, |
| 10 | const int N, |
| 11 | const int n_ite, |
| 12 | const tools::Sparse_matrix& _H, |
| 13 | const bool enable_syndrome, |
| 14 | const int syndrome_depth) |
| 15 | : n_ite(n_ite) |
| 16 | , H(_H) |
| 17 | , enable_syndrome(enable_syndrome) |
| 18 | , syndrome_depth(syndrome_depth) |
| 19 | , cur_syndrome_depth(0) |
| 20 | { |
| 21 | if (n_ite <= 0) |
| 22 | { |
| 23 | std::stringstream message; |
| 24 | message << "'n_ite' has to be greater than 0 ('n_ite' = " << n_ite << ")."; |
| 25 | throw spu::tools::invalid_argument(__FILE__, __LINE__, __func__, message.str()); |
| 26 | } |
| 27 | |
| 28 | if (syndrome_depth <= 0) |
| 29 | { |
| 30 | std::stringstream message; |
| 31 | message << "'syndrome_depth' has to be greater than 0 ('syndrome_depth' = " << syndrome_depth << ")."; |
| 32 | throw spu::tools::invalid_argument(__FILE__, __LINE__, __func__, message.str()); |
| 33 | } |
| 34 | |
| 35 | if (N != (int)this->H.get_n_rows()) |
| 36 | { |
| 37 | std::stringstream message; |
| 38 | message << "'N' is not compatible with the H matrix ('N' = " << N |
| 39 | << ", 'H.get_n_rows()' = " << this->H.get_n_rows() << ")."; |
| 40 | throw spu::tools::invalid_argument(__FILE__, __LINE__, __func__, message.str()); |
| 41 | } |
| 42 | } |
nothing calls this directly
no outgoing calls
no test coverage detected