Fixed polar encoder and decoder initialization failure for ARM. Initialization unconditionally used x86 SIMD routines instead of getting disabled for ARM compilations.

master
faluco 4 years ago committed by faluco
parent d9e5f4ccc7
commit aa3309157b

@ -185,8 +185,13 @@ int srsran_pdcch_nr_init_tx(srsran_pdcch_nr_t* q, const srsran_pdcch_nr_args_t*
} }
q->is_tx = true; q->is_tx = true;
srsran_polar_encoder_type_t encoder_type = srsran_polar_encoder_type_t encoder_type = SRSRAN_POLAR_ENCODER_PIPELINED;
(args->disable_simd) ? SRSRAN_POLAR_ENCODER_PIPELINED : SRSRAN_POLAR_ENCODER_AVX2;
#ifdef LV_HAVE_AVX2
if (!args->disable_simd) {
encoder_type = SRSRAN_POLAR_ENCODER_AVX2;
}
#endif // LV_HAVE_AVX2
if (srsran_polar_encoder_init(&q->encoder, encoder_type, NMAX_LOG) < SRSRAN_SUCCESS) { if (srsran_polar_encoder_init(&q->encoder, encoder_type, NMAX_LOG) < SRSRAN_SUCCESS) {
return SRSRAN_ERROR; return SRSRAN_ERROR;
@ -205,8 +210,13 @@ int srsran_pdcch_nr_init_rx(srsran_pdcch_nr_t* q, const srsran_pdcch_nr_args_t*
return SRSRAN_ERROR; return SRSRAN_ERROR;
} }
srsran_polar_decoder_type_t decoder_type = srsran_polar_decoder_type_t decoder_type = SRSRAN_POLAR_DECODER_SSC_C;
(args->disable_simd) ? SRSRAN_POLAR_DECODER_SSC_C : SRSRAN_POLAR_DECODER_SSC_C_AVX2;
#ifdef LV_HAVE_AVX2
if (!args->disable_simd) {
decoder_type = SRSRAN_POLAR_DECODER_SSC_C_AVX2;
}
#endif // LV_HAVE_AVX2
if (srsran_polar_decoder_init(&q->decoder, decoder_type, NMAX_LOG) < SRSRAN_SUCCESS) { if (srsran_polar_decoder_init(&q->decoder, decoder_type, NMAX_LOG) < SRSRAN_SUCCESS) {
return SRSRAN_ERROR; return SRSRAN_ERROR;

Loading…
Cancel
Save