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

Method build

src/Factory/Module/Decoder/RS/Decoder_RS.cpp:89–111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

87
88template<typename B, typename Q>
89module::Decoder_SIHO<B, Q>*
90Decoder_RS ::build(const tools::RS_polynomial_generator& GF, module::Encoder<B>* encoder) const
91{
92 try
93 {
94 return Decoder::build<B, Q>(encoder);
95 }
96 catch (spu::tools::cannot_allocate const&)
97 {
98 if (this->type == "ALGEBRAIC")
99 {
100 if (this->implem == "STD") return new module::Decoder_RS_std<B, Q>(this->K, this->N_cw, GF);
101
102 if (encoder)
103 {
104 if (this->implem == "GENIUS")
105 return new module::Decoder_RS_genius<B, Q>(this->K, this->N_cw, GF, *encoder);
106 }
107 }
108 }
109
110 throw spu::tools::cannot_allocate(__FILE__, __LINE__, __func__);
111}
112
113// ==================================================================================== explicit template instantiation
114#include "Tools/types.h"

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected