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

Method _build_siso_simd

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

Source from the content-addressed store, hash-verified

168
169template<typename B, typename Q, typename QD, tools::proto_max_i<Q> MAX>
170module::Decoder_SISO<B, Q>*
171Decoder_RSC ::_build_siso_simd(const std::vector<std::vector<int>>& trellis, module::Encoder<B>* /*encoder*/) const
172{
173 if (this->type == "BCJR" && this->simd_strategy == "INTER")
174 {
175 if (this->implem == "STD")
176 return new module::Decoder_RSC_BCJR_inter_std<B, Q, MAX>(this->K, trellis, this->buffered);
177 if (this->implem == "FAST")
178 return new module::Decoder_RSC_BCJR_inter_fast<B, Q, MAX>(this->K, trellis, this->buffered);
179 if (this->implem == "VERY_FAST")
180 return new module::Decoder_RSC_BCJR_inter_very_fast<B, Q, MAX>(this->K, trellis, this->buffered);
181 }
182
183 if (this->type == "BCJR" && this->simd_strategy == "INTRA")
184 {
185 if (this->implem == "STD")
186 {
187 switch (mipp::nElReg<Q>())
188 {
189 case 8:
190 return new module::Decoder_RSC_BCJR_intra_std<B, Q, MAX>(this->K, trellis, this->buffered);
191 default:
192 break;
193 }
194 }
195 else if (this->implem == "FAST")
196 {
197#ifdef __AVX__
198 switch (mipp::nElReg<Q>())
199 {
200 case 8:
201 return new module::Decoder_RSC_BCJR_intra_fast<B, Q, MAX>(this->K, trellis, this->buffered);
202 break;
203 case 16:
204 return new module::Decoder_RSC_BCJR_inter_intra_fast_x2_AVX<B, Q, MAX>(
205 this->K, trellis, this->buffered);
206 break;
207 case 32:
208 return new module::Decoder_RSC_BCJR_inter_intra_fast_x4_AVX<B, Q, MAX>(
209 this->K, trellis, this->buffered);
210 break;
211 default:
212 break;
213 }
214#else /* NEON and SSE */
215 switch (mipp::nElReg<Q>())
216 {
217 case 8:
218 return new module::Decoder_RSC_BCJR_intra_fast<B, Q, MAX>(this->K, trellis, this->buffered);
219 break;
220 case 16:
221 return new module::Decoder_RSC_BCJR_inter_intra_fast_x2_SSE<B, Q, MAX>(
222 this->K, trellis, this->buffered);
223 break;
224 default:
225 break;
226 }
227#endif

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected