From 9acb1002e96c6e5ed655bc885749030b75463132 Mon Sep 17 00:00:00 2001 From: Ismael Gomez Date: Thu, 26 Jan 2017 17:48:32 +0100 Subject: [PATCH] added more functions to simd for UE --- srslte/include/srslte/utils/vector_simd.h | 10 +- srslte/lib/utils/vector.c | 33 ++++- srslte/lib/utils/vector_simd.c | 164 +++++++++++++++++++++- 3 files changed, 193 insertions(+), 14 deletions(-) diff --git a/srslte/include/srslte/utils/vector_simd.h b/srslte/include/srslte/utils/vector_simd.h index 81aed443f..8380a75de 100644 --- a/srslte/include/srslte/utils/vector_simd.h +++ b/srslte/include/srslte/utils/vector_simd.h @@ -53,11 +53,15 @@ SRSLTE_API void srslte_vec_prod_ccc_simd(cf_t *x,cf_t *y, cf_t *z, uint32_t len) SRSLTE_API void srslte_vec_sc_prod_cfc_simd(cf_t *x, float h, cf_t *z, uint32_t len); +SRSLTE_API void srslte_vec_sc_prod_fff_simd(float *x, float h, float *z, uint32_t len); + SRSLTE_API void srslte_vec_abs_square_cf_simd(cf_t *x, float *abs_square, uint32_t len); SRSLTE_API cf_t srslte_vec_dot_prod_ccc_simd(cf_t *x, cf_t *y, uint32_t len); -SRSLTE_API void srslte_vec_sum_fff_simd(float *x, float *y, float *z, uint32_t len); +SRSLTE_API void srslte_vec_sum_fff_simd(float *x, float *y, float *z, uint32_t len); + +SRSLTE_API void srslte_vec_sub_fff_simd(float *x, float *h, float *z, uint32_t len); SRSLTE_API cf_t srslte_vec_dot_prod_conj_ccc_simd(cf_t *x, cf_t *y, uint32_t len); @@ -65,6 +69,10 @@ SRSLTE_API void srslte_vec_prod_conj_ccc_simd(cf_t *x,cf_t *y, cf_t *z, uint32_t SRSLTE_API void srslte_vec_sc_prod_ccc_simd(cf_t *x, cf_t h, cf_t *z, uint32_t len); +SRSLTE_API cf_t srslte_vec_dot_prod_conj_ccc_simd(cf_t *x, cf_t *y, uint32_t len); + +SRSLTE_API void srslte_vec_sc_prod_cfc_simd(cf_t *x, float h, cf_t *z, uint32_t len); + SRSLTE_API float srslte_vec_acc_ff_simd(float *x, uint32_t len); SRSLTE_API cf_t srslte_vec_dot_prod_cfc_simd(cf_t *x, float *y, uint32_t len); diff --git a/srslte/lib/utils/vector.c b/srslte/lib/utils/vector.c index 52e8b54d0..10fe38165 100644 --- a/srslte/lib/utils/vector.c +++ b/srslte/lib/utils/vector.c @@ -44,7 +44,7 @@ int srslte_vec_acc_ii(int *x, uint32_t len) { return z; } -// Used in PRACH detector +// Used in PRACH detector, AGC and chest_dl for noise averaging float srslte_vec_acc_ff(float *x, uint32_t len) { int i; float z=0; @@ -79,10 +79,14 @@ void srslte_vec_square_dist(cf_t symbol, cf_t *points, float *distance, uint32_t } void srslte_vec_sub_fff(float *x, float *y, float *z, uint32_t len) { +#ifndef LV_HAVE_SSE int i; for (i=0;i