| 88 | |
| 89 | template<typename B, typename Q> |
| 90 | module::Decoder_SIHO<B, Q>* |
| 91 | Decoder_BCH ::build(const tools::BCH_polynomial_generator<B>& GF, module::Encoder<B>* encoder) const |
| 92 | { |
| 93 | try |
| 94 | { |
| 95 | return Decoder::build<B, Q>(encoder); |
| 96 | } |
| 97 | catch (spu::tools::cannot_allocate const&) |
| 98 | { |
| 99 | if (this->type == "ALGEBRAIC") |
| 100 | { |
| 101 | if (this->implem == "STD") return new module::Decoder_BCH_std<B, Q>(this->K, this->N_cw, GF); |
| 102 | if (this->implem == "FAST") return new module::Decoder_BCH_fast<B, Q>(this->K, this->N_cw, GF); |
| 103 | |
| 104 | if (encoder) |
| 105 | { |
| 106 | if (this->implem == "GENIUS") |
| 107 | return new module::Decoder_BCH_genius<B, Q>(this->K, this->N_cw, this->t, *encoder); |
| 108 | } |
| 109 | } |
| 110 | } |
| 111 | |
| 112 | throw spu::tools::cannot_allocate(__FILE__, __LINE__, __func__); |
| 113 | } |
| 114 | |
| 115 | // ==================================================================================== explicit template instantiation |
| 116 | #include "Tools/types.h" |
nothing calls this directly
no outgoing calls
no test coverage detected