MCPcopy Create free account
hub / github.com/aff3ct/aff3ct / build

Method build

src/Factory/Module/Decoder/BCH/Decoder_BCH.cpp:90–113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

88
89template<typename B, typename Q>
90module::Decoder_SIHO<B, Q>*
91Decoder_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"

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected