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

Method build_siso

src/Factory/Module/Decoder/RSC/Decoder_RSC.cpp:235–261  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

233
234template<typename B, typename Q>
235module::Decoder_SISO<B, Q>*
236Decoder_RSC ::build_siso(const std::vector<std::vector<int>>& trellis,
237 std::ostream& stream,
238 const int n_ite,
239 module::Encoder<B>* encoder) const
240{
241 using QD = typename std::conditional<std::is_same<Q, int8_t>::value, int16_t, Q>::type;
242
243 if (this->simd_strategy.empty())
244 {
245 if (this->max == "MAX")
246 return _build_siso_seq<B, Q, QD, tools::max<Q>, tools::max<QD>>(trellis, stream, n_ite, encoder);
247 if (this->max == "MAXS")
248 return _build_siso_seq<B, Q, QD, tools::max_star<Q>, tools::max_star<QD>>(trellis, stream, n_ite, encoder);
249 if (this->max == "MAXL")
250 return _build_siso_seq<B, Q, QD, tools::max_linear<Q>, tools::max_linear<QD>>(
251 trellis, stream, n_ite, encoder);
252 }
253 else
254 {
255 if (this->max == "MAX") return _build_siso_simd<B, Q, QD, tools::max_i<Q>>(trellis, encoder);
256 if (this->max == "MAXS") return _build_siso_simd<B, Q, QD, tools::max_star_i<Q>>(trellis, encoder);
257 if (this->max == "MAXL") return _build_siso_simd<B, Q, QD, tools::max_linear_i<Q>>(trellis, encoder);
258 }
259
260 throw spu::tools::cannot_allocate(__FILE__, __LINE__, __func__);
261}
262
263template<typename B, typename Q>
264module::Decoder_SIHO<B, Q>*

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected