45 #ifndef INCLUDED_volk_16ic_convert_32fc_a_H
46 #define INCLUDED_volk_16ic_convert_32fc_a_H
51 #include <immintrin.h>
53 static inline void volk_16ic_convert_32fc_a_avx2(
lv_32fc_t* outputVector,
55 unsigned int num_points)
57 const unsigned int avx_iters = num_points / 8;
58 unsigned int number = 0;
59 const int16_t* complexVectorPtr = (int16_t*)inputVector;
60 float* outputVectorPtr = (
float*)outputVector;
65 for (number = 0; number < avx_iters; number++) {
67 complexVectorPtr += 8;
69 outValInt = _mm256_cvtepi16_epi32(cplxValue);
70 outVal = _mm256_cvtepi32_ps(outValInt);
71 _mm256_store_ps((
float*)outputVectorPtr, outVal);
76 number = avx_iters * 8;
77 for (; number < num_points * 2; number++) {
78 *outputVectorPtr++ = (float)*complexVectorPtr++;
84 #ifdef LV_HAVE_GENERIC
88 unsigned int num_points)
91 for (
i = 0;
i < num_points;
i++) {
101 #include <emmintrin.h>
105 unsigned int num_points)
107 const unsigned int sse_iters = num_points / 2;
114 for (number = 0; number < sse_iters; number++) {
125 if (num_points & 1) {
134 #include <immintrin.h>
138 unsigned int num_points)
140 const unsigned int sse_iters = num_points / 4;
145 unsigned int i, number;
147 for (number = 0; number < sse_iters; number++) {
158 _mm256_store_ps((
float*)_out, a);
163 for (
i = 0;
i < (num_points % 4); ++
i) {
173 #include <arm_neon.h>
177 unsigned int num_points)
179 const unsigned int sse_iters = num_points / 2;
187 unsigned int i, number;
189 for (number = 0; number < sse_iters; number++) {
190 a16x4 = vld1_s16((
const int16_t*)_in);
192 a32x4 = vmovl_s16(a16x4);
193 f32x4 = vcvtq_f32_s32(a32x4);
194 vst1q_f32((float32_t*)_out, f32x4);
198 for (
i = 0;
i < (num_points % 2); ++
i) {
207 #ifndef INCLUDED_volk_16ic_convert_32fc_u_H
208 #define INCLUDED_volk_16ic_convert_32fc_u_H
214 #include <immintrin.h>
216 static inline void volk_16ic_convert_32fc_u_avx2(
lv_32fc_t* outputVector,
218 unsigned int num_points)
220 const unsigned int avx_iters = num_points / 8;
221 unsigned int number = 0;
222 const int16_t* complexVectorPtr = (int16_t*)inputVector;
223 float* outputVectorPtr = (
float*)outputVector;
228 for (number = 0; number < avx_iters; number++) {
230 complexVectorPtr += 8;
232 outValInt = _mm256_cvtepi16_epi32(cplxValue);
233 outVal = _mm256_cvtepi32_ps(outValInt);
234 _mm256_storeu_ps((
float*)outputVectorPtr, outVal);
236 outputVectorPtr += 8;
239 number = avx_iters * 8;
240 for (; number < num_points * 2; number++) {
241 *outputVectorPtr++ = (float)*complexVectorPtr++;
248 #include <emmintrin.h>
252 unsigned int num_points)
254 const unsigned int sse_iters = num_points / 2;
261 for (number = 0; number < sse_iters; number++) {
272 if (num_points & 1) {
282 #include <immintrin.h>
286 unsigned int num_points)
288 const unsigned int sse_iters = num_points / 4;
293 unsigned int i, number;
295 for (number = 0; number < sse_iters; number++) {
306 _mm256_storeu_ps((
float*)_out, a);
311 for (
i = 0;
i < (num_points % 4); ++
i) {
float32x4_t __m128
Definition: sse2neon.h:235
FORCE_INLINE __m128i _mm_loadu_si128(const __m128i *p)
Definition: sse2neon.h:4570
FORCE_INLINE __m128 _mm_set_ps(float w, float z, float y, float x)
Definition: sse2neon.h:2429
FORCE_INLINE void _mm_storeu_ps(float *p, __m128 a)
Definition: sse2neon.h:2787
FORCE_INLINE __m128i _mm_load_si128(const __m128i *p)
Definition: sse2neon.h:4471
int64x2_t __m128i
Definition: sse2neon.h:244
FORCE_INLINE void _mm_store_ps(float *p, __m128 a)
Definition: sse2neon.h:2704
static void volk_16ic_convert_32fc_generic(lv_32fc_t *outputVector, const lv_16sc_t *inputVector, unsigned int num_points)
Definition: volk_16ic_convert_32fc.h:86
static void volk_16ic_convert_32fc_u_avx(lv_32fc_t *outputVector, const lv_16sc_t *inputVector, unsigned int num_points)
Definition: volk_16ic_convert_32fc.h:284
static void volk_16ic_convert_32fc_a_avx(lv_32fc_t *outputVector, const lv_16sc_t *inputVector, unsigned int num_points)
Definition: volk_16ic_convert_32fc.h:136
static void volk_16ic_convert_32fc_u_sse2(lv_32fc_t *outputVector, const lv_16sc_t *inputVector, unsigned int num_points)
Definition: volk_16ic_convert_32fc.h:250
static void volk_16ic_convert_32fc_neon(lv_32fc_t *outputVector, const lv_16sc_t *inputVector, unsigned int num_points)
Definition: volk_16ic_convert_32fc.h:175
static void volk_16ic_convert_32fc_a_sse2(lv_32fc_t *outputVector, const lv_16sc_t *inputVector, unsigned int num_points)
Definition: volk_16ic_convert_32fc.h:103
#define __VOLK_PREFETCH(addr)
Definition: volk_common.h:71
#define lv_cimag(x)
Definition: volk_complex.h:98
#define lv_cmake(r, i)
Definition: volk_complex.h:77
#define lv_creal(x)
Definition: volk_complex.h:96
float complex lv_32fc_t
Definition: volk_complex.h:74
short complex lv_16sc_t
Definition: volk_complex.h:71
for i
Definition: volk_config_fixed.tmpl.h:13