From a3d5d0f88953b04385732a75e073ff48e4cd8174 Mon Sep 17 00:00:00 2001 From: Martino Date: Sun, 17 Jun 2018 11:39:46 +0200 Subject: [PATCH] Kernal operation with avx and avx2 (commented) --- .../nrPolar_tools/nr_polar_kernal_operation.c | 119 +++++++++--------- 1 file changed, 62 insertions(+), 57 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 253ca6a1a4..e374418877 100644 --- a/openair1/PHY/CODING/nrPolar_tools/nr_polar_kernal_operation.c +++ b/openair1/PHY/CODING/nrPolar_tools/nr_polar_kernal_operation.c @@ -9,78 +9,83 @@ void nr_polar_kernal_operation(uint8_t *u, uint8_t *d, uint16_t N) { // Martino's algorithm to avoid multiplication for the generating matrix of polar codes - uint16_t i,j; - + uint32_t i,j; + for(i=0; i num1 - num2=_mm_load_ps((float*)&matrix2[j][i]); // 2[3], 2[2], 2[1], 2[0] -> num2 - num3=_mm_mul_ps(num1, num2); // 1[3]*2[3],...1[0]*2[0] -> num3 - num3=_mm_hadd_ps(num3, num3); //1[3]*2[3]+1[2]*2[2] ... - num4 = _mm_add_ps(num4, num3); - } - num4= _mm_hadd_ps(num4, num4); - _mm_store_ss(&output[i], num4); // Stores only the lower SP FP that contain the sum - } + } */ }