From 120544baa002e66e2a675aa746e0969fdc5898c9 Mon Sep 17 00:00:00 2001 From: Ismael Gomez Date: Thu, 14 Sep 2017 10:09:52 +0200 Subject: [PATCH] Remove LV_HAVE_SSE from turbodecoder interface. Fixes #99 --- lib/include/srslte/phy/fec/turbodecoder.h | 16 +++++----------- .../srslte/phy/fec/turbodecoder_simd.h | 19 ++----------------- 2 files changed, 7 insertions(+), 28 deletions(-) diff --git a/lib/include/srslte/phy/fec/turbodecoder.h b/lib/include/srslte/phy/fec/turbodecoder.h index d42a20ae6..4a24804fa 100644 --- a/lib/include/srslte/phy/fec/turbodecoder.h +++ b/lib/include/srslte/phy/fec/turbodecoder.h @@ -50,20 +50,14 @@ #define SRSLTE_TCOD_MAX_LEN_CODED (SRSLTE_TCOD_RATE*SRSLTE_TCOD_MAX_LEN_CB+SRSLTE_TCOD_TOTALTAIL) #include "srslte/phy/fec/turbodecoder_gen.h" - -#ifdef LV_HAVE_SSE #include "srslte/phy/fec/turbodecoder_simd.h" -#else -#define SRSLTE_TDEC_NPAR 1 -#endif typedef struct SRSLTE_API { -#ifdef LV_HAVE_SSE - srslte_tdec_simd_t tdec_simd; -#else - float *input_conv; - srslte_tdec_gen_t tdec_gen; -#endif + float *input_conv; + union { + srslte_tdec_simd_t tdec_simd; + srslte_tdec_gen_t tdec_gen; + }; } srslte_tdec_t; SRSLTE_API int srslte_tdec_init(srslte_tdec_t * h, diff --git a/lib/include/srslte/phy/fec/turbodecoder_simd.h b/lib/include/srslte/phy/fec/turbodecoder_simd.h index d7bc284d2..8cafbc5f8 100644 --- a/lib/include/srslte/phy/fec/turbodecoder_simd.h +++ b/lib/include/srslte/phy/fec/turbodecoder_simd.h @@ -43,23 +43,8 @@ #include "srslte/phy/fec/tc_interl.h" #include "srslte/phy/fec/cbsegm.h" -//#define ENABLE_SIMD_INTER - -// The constant SRSLTE_TDEC_NPAR defines the maximum number of parallel CB supported by all SIMD decoders -#ifdef ENABLE_SIMD_INTER - #include "srslte/phy/fec/turbodecoder_simd_inter.h" - #ifdef LV_HAVE_AVX2 - #define SRSLTE_TDEC_NPAR_INTRA 2 - #else - #define SRSLTE_TDEC_NPAR_INTRA 1 - #endif -#else - #ifdef LV_HAVE_AVX2 - #define SRSLTE_TDEC_NPAR 2 - #else - #define SRSLTE_TDEC_NPAR 1 - #endif -#endif +// Define maximum number of CB decoded in parallel (2 for AVX2) +#define SRSLTE_TDEC_NPAR 2 #define SRSLTE_TCOD_RATE 3 #define SRSLTE_TCOD_TOTALTAIL 12