SIMD: frequency estimate optimization

master
Xavier Arteaga 4 years ago committed by Xavier Arteaga
parent bf1b7b8527
commit 1f18e8a054

@ -1693,18 +1693,16 @@ float srslte_vec_estimate_frequency_simd(const cf_t* x, int len)
// Accumulate using horizontal addition
simd_f_t _sum_re = srslte_simd_cf_re(_sum);
simd_f_t _sum_im = srslte_simd_cf_im(_sum);
for (int k = 1; k < SRSLTE_SIMD_CF_SIZE; k *= 2) {
_sum_re = srslte_simd_f_hadd(_sum_re, _sum_re);
_sum_im = srslte_simd_f_hadd(_sum_im, _sum_im);
simd_f_t _sum_re_im = srslte_simd_f_hadd(_sum_re, _sum_im);
for (int j = 2; j < SRSLTE_SIMD_F_SIZE; j *= 2) {
_sum_re_im = srslte_simd_f_hadd(_sum_re_im, _sum_re_im);
}
// Get accumulator
srslte_simd_aligned float _sum_re_v[SRSLTE_SIMD_CF_SIZE];
srslte_simd_aligned float _sum_im_v[SRSLTE_SIMD_CF_SIZE];
srslte_simd_f_store(_sum_re_v, _sum_re);
srslte_simd_f_store(_sum_im_v, _sum_im);
__real__ sum = _sum_re_v[0];
__imag__ sum = _sum_im_v[0];
srslte_simd_aligned float _sum_v[SRSLTE_SIMD_CF_SIZE];
srslte_simd_f_store(_sum_v, _sum_re_im);
__real__ sum = _sum_v[0];
__imag__ sum = _sum_v[1];
}
#endif /* SRSLTE_SIMD_CF_SIZE */

Loading…
Cancel
Save