From 4626a85dbf528f9b661ec4ac8d06b1212b372302 Mon Sep 17 00:00:00 2001 From: Martino Date: Sun, 17 Jun 2018 12:15:21 +0200 Subject: [PATCH] Improved intrinsic version: now it's (20us) slower than the normal one --- .../nrPolar_tools/nr_polar_kernal_operation.c | 54 ++++++++----------- 1 file changed, 21 insertions(+), 33 deletions(-) diff --git a/openair1/PHY/CODING/nrPolar_tools/nr_polar_kernal_operation.c b/openair1/PHY/CODING/nrPolar_tools/nr_polar_kernal_operation.c index e374418877..2bd76e488c 100644 --- a/openair1/PHY/CODING/nrPolar_tools/nr_polar_kernal_operation.c +++ b/openair1/PHY/CODING/nrPolar_tools/nr_polar_kernal_operation.c @@ -19,53 +19,41 @@ void nr_polar_kernal_operation(uint8_t *u, uint8_t *d, uint16_t N) d[i]=d[i] ^ (!( (j-i)& i ))*u[j]; } } + + /* * It works, but there are too many moves from memory and it's slow. With AVX-512 it could be done faster * - __m256i A,B,C,E, OUT; - + __m256i A,B,C,E,U, OUT; + __m256i inc; uint32_t dTest[8]; - uint32_t jiArray[8]; - uint32_t iArray[8]; uint32_t uArray[8]; uint32_t k; uint32_t toCheck[8]; + uint32_t incArray[8]; + for(k=0; k<8; k++) + incArray[k]=k; //0,1, ... 7 + + inc=_mm256_loadu_si256((__m256i const*)incArray); + for(i=0; i