46 #ifndef INCLUDED_volk_16i_permute_and_scalar_add_a_H
47 #define INCLUDED_volk_16i_permute_and_scalar_add_a_H
54 #include <emmintrin.h>
55 #include <xmmintrin.h>
59 short* permute_indexes,
65 unsigned int num_points)
68 const unsigned int num_bytes = num_points * 2;
70 __m128i xmm0, xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7;
72 __m128i *p_target, *p_cntl0, *p_cntl1, *p_cntl2, *p_cntl3, *p_scalars;
74 short* p_permute_indexes = permute_indexes;
85 int bound = (num_bytes >> 4);
86 int leftovers = (num_bytes >> 1) & 7;
101 for (;
i < bound; ++
i) {
119 p_permute_indexes += 8;
155 for (
i = bound * 8;
i < (bound * 8) + leftovers; ++
i) {
156 target[
i] = src0[permute_indexes[
i]] + (cntl0[
i] & scalars[0]) +
157 (cntl1[
i] & scalars[1]) + (cntl2[
i] & scalars[2]) +
158 (cntl3[
i] & scalars[3]);
164 #ifdef LV_HAVE_GENERIC
167 short* permute_indexes,
173 unsigned int num_points)
175 const unsigned int num_bytes = num_points * 2;
179 int bound = num_bytes >> 1;
181 for (
i = 0;
i < bound; ++
i) {
182 target[
i] = src0[permute_indexes[
i]] + (cntl0[
i] & scalars[0]) +
183 (cntl1[
i] & scalars[1]) + (cntl2[
i] & scalars[2]) +
184 (cntl3[
i] & scalars[3]);
FORCE_INLINE void _mm_store_si128(__m128i *p, __m128i a)
Definition: sse2neon.h:5937
FORCE_INLINE __m128i _mm_setzero_si128()
Definition: sse2neon.h:5339
FORCE_INLINE __m128i _mm_and_si128(__m128i, __m128i)
Definition: sse2neon.h:3128
FORCE_INLINE __m128i _mm_add_epi16(__m128i a, __m128i b)
Definition: sse2neon.h:2969
#define _mm_insert_epi16(a, b, imm)
Definition: sse2neon.h:4418
FORCE_INLINE __m128i _mm_load_si128(const __m128i *p)
Definition: sse2neon.h:4471
#define _mm_shufflelo_epi16(a, imm)
Definition: sse2neon.h:5459
int64x2_t __m128i
Definition: sse2neon.h:244
#define _mm_shuffle_epi32(a, imm)
Definition: sse2neon.h:5358
static void volk_16i_permute_and_scalar_add_a_sse2(short *target, short *src0, short *permute_indexes, short *cntl0, short *cntl1, short *cntl2, short *cntl3, short *scalars, unsigned int num_points)
Definition: volk_16i_permute_and_scalar_add.h:57
static void volk_16i_permute_and_scalar_add_generic(short *target, short *src0, short *permute_indexes, short *cntl0, short *cntl1, short *cntl2, short *cntl3, short *scalars, unsigned int num_points)
Definition: volk_16i_permute_and_scalar_add.h:165
for i
Definition: volk_config_fixed.tmpl.h:13