From 2758ba4118bc9764552a5ea59c8eebe49d3f9c6a Mon Sep 17 00:00:00 2001 From: Ismael Gomez Date: Wed, 25 Jan 2017 17:40:28 +0100 Subject: [PATCH] fixed lut in vector simd (now all tests passing) --- srslte/lib/utils/vector_simd.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/srslte/lib/utils/vector_simd.c b/srslte/lib/utils/vector_simd.c index ba30e190f..16bbbc0bb 100644 --- a/srslte/lib/utils/vector_simd.c +++ b/srslte/lib/utils/vector_simd.c @@ -227,10 +227,8 @@ void srslte_vec_lut_sss_simd(short *x, unsigned short *lut, short *y, uint32_t l lutVal = _mm_loadu_si128(lutPtr); for (int i=0;i<8;i++) { - _mm_shuffle_epi8(xVal,_mm_set1_epi8(i)); - int16_t x = (int16_t) _mm_extract_epi16(xVal, 0); - _mm_shuffle_epi8(lutVal,_mm_set1_epi8(i)); - uint16_t l = (uint16_t) _mm_extract_epi16(lutVal, 0); + int16_t x = (int16_t) _mm_extract_epi16(xVal, i); + uint16_t l = (uint16_t) _mm_extract_epi16(lutVal, i); y[l] = x; } xPtr ++;