| 19 | |
| 20 | template<typename B> |
| 21 | Encoder_LDPC_QC<B>::Encoder_LDPC_QC(const int K, const int N, const int Zc, const char* file_name, const int K_LDPC) |
| 22 | : Encoder_LDPC<B>(K, N) |
| 23 | , Zc(Zc) |
| 24 | , file_name(file_name) |
| 25 | , G(K / Zc) |
| 26 | , K_LDPC(K_LDPC == -1 ? K : K_LDPC) |
| 27 | { |
| 28 | if (this->K_LDPC < this->K) |
| 29 | { |
| 30 | std::stringstream message; |
| 31 | message << "'K_LDPC' has to be greater than 'K' ('K_LDPC' = " << this->K_LDPC << ", 'K' = " << this->K << ")."; |
| 32 | throw spu::tools::invalid_argument(__FILE__, __LINE__, __func__, message.str()); |
| 33 | } |
| 34 | |
| 35 | const std::string name = "Encoder_LDPC_QC"; |
| 36 | this->set_name(name); |
| 37 | this->G = this->read_G_file(this->file_name); |
| 38 | } |
| 39 | |
| 40 | template<typename B> |
| 41 | Encoder_LDPC_QC<B>* |
nothing calls this directly
no test coverage detected