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

Method build

src/Factory/Module/Decoder/Decoder.cpp:86–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

84
85template<typename B, typename Q>
86module::Decoder_SIHO<B, Q>*
87Decoder ::build(module::Encoder<B>* encoder) const
88{
89 if (encoder)
90 {
91 if (this->type == "ML")
92 {
93 if (this->implem == "STD")
94 return new module::Decoder_ML_std<B, Q>(this->K, this->N_cw, *encoder, this->hamming);
95 if (this->implem == "NAIVE")
96 return new module::Decoder_ML_naive<B, Q>(this->K, this->N_cw, *encoder, this->hamming);
97 }
98 else if (this->type == "CHASE")
99 {
100 if (this->implem == "STD")
101 return new module::Decoder_chase_std<B, Q>(this->K, this->N_cw, *encoder, this->flips, this->hamming);
102 }
103 }
104
105 throw spu::tools::cannot_allocate(__FILE__, __LINE__, __func__);
106}
107
108// ==================================================================================== explicit template instantiation
109#include "Tools/types.h"

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected