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