| 69 | |
| 70 | template<typename B> |
| 71 | void |
| 72 | Encoder_LDPC<B>::_check_G_dimensions() |
| 73 | { |
| 74 | if (this->K != (int)this->G.get_n_cols()) |
| 75 | { |
| 76 | std::stringstream message; |
| 77 | message << "The built G matrix has a dimension 'K' different than the given one ('K' = " << this->K |
| 78 | << ", 'G.get_n_cols()' = " << this->G.get_n_cols() << ")."; |
| 79 | throw spu::tools::invalid_argument(__FILE__, __LINE__, __func__, message.str()); |
| 80 | } |
| 81 | |
| 82 | if (this->N != (int)this->G.get_n_rows()) |
| 83 | { |
| 84 | std::stringstream message; |
| 85 | message << "The built G matrix has a dimension 'N' different than the given one ('N' = " << this->N |
| 86 | << ", 'G.get_n_rows()' = " << this->G.get_n_rows() << ")."; |
| 87 | throw spu::tools::runtime_error(__FILE__, __LINE__, __func__, message.str()); |
| 88 | } |
| 89 | } |
| 90 | |
| 91 | template<typename B> |
| 92 | void |