| 233 | |
| 234 | template<typename B, typename Q> |
| 235 | module::Decoder_SISO<B, Q>* |
| 236 | Decoder_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 | |
| 263 | template<typename B, typename Q> |
| 264 | module::Decoder_SIHO<B, Q>* |
nothing calls this directly
no outgoing calls
no test coverage detected