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

Method build

src/Factory/Module/Decoder/Repetition/Decoder_repetition.cpp:67–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65
66template<typename B, typename Q>
67module::Decoder_SIHO<B, Q>*
68Decoder_repetition ::build(module::Encoder<B>* encoder) const
69{
70 try
71 {
72 return Decoder::build<B, Q>(encoder);
73 }
74 catch (spu::tools::cannot_allocate const&)
75 {
76 if (this->type == "REPETITION")
77 {
78 if (this->implem == "STD")
79 return new module::Decoder_repetition_std<B, Q>(this->K, this->N_cw, this->buffered);
80 if (this->implem == "FAST")
81 return new module::Decoder_repetition_fast<B, Q>(this->K, this->N_cw, this->buffered);
82 }
83 if (this->type == "REPETITION_VOTE")
84 {
85 if (this->implem == "STD")
86 return new module::Decoder_repetition_vote<B, Q>(this->K, this->N_cw, this->buffered);
87 }
88 }
89
90 throw spu::tools::cannot_allocate(__FILE__, __LINE__, __func__);
91}
92
93// ==================================================================================== explicit template instantiation
94#include "Tools/types.h"

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected