57 #ifndef INCLUDED_volk_32f_s32f_normalize_a_H
58 #define INCLUDED_volk_32f_s32f_normalize_a_H
64 #include <immintrin.h>
68 unsigned int num_points)
70 unsigned int number = 0;
71 float* inputPtr = vecBuffer;
73 const float invScalar = 1.0 / scalar;
74 __m256 vecScalar = _mm256_set1_ps(invScalar);
78 const uint64_t eighthPoints = num_points / 8;
79 for (; number < eighthPoints; number++) {
81 input1 = _mm256_load_ps(inputPtr);
83 input1 = _mm256_mul_ps(input1, vecScalar);
85 _mm256_store_ps(inputPtr, input1);
90 number = eighthPoints * 8;
91 for (; number < num_points; number++) {
92 *inputPtr *= invScalar;
99 #include <xmmintrin.h>
103 unsigned int num_points)
105 unsigned int number = 0;
106 float* inputPtr = vecBuffer;
108 const float invScalar = 1.0 / scalar;
113 const uint64_t quarterPoints = num_points / 4;
114 for (; number < quarterPoints; number++) {
125 number = quarterPoints * 4;
126 for (; number < num_points; number++) {
127 *inputPtr *= invScalar;
133 #ifdef LV_HAVE_GENERIC
137 unsigned int num_points)
139 unsigned int number = 0;
140 float* inputPtr = vecBuffer;
141 const float invScalar = 1.0 / scalar;
142 for (number = 0; number < num_points; number++) {
143 *inputPtr *= invScalar;
151 extern void volk_32f_s32f_normalize_a_orc_impl(
float* dst,
154 unsigned int num_points);
155 static inline void volk_32f_s32f_normalize_u_orc(
float* vecBuffer,
157 unsigned int num_points)
159 float invscalar = 1.0 / scalar;
160 volk_32f_s32f_normalize_a_orc_impl(vecBuffer, vecBuffer, invscalar, num_points);
166 #ifndef INCLUDED_volk_32f_s32f_normalize_u_H
167 #define INCLUDED_volk_32f_s32f_normalize_u_H
169 #include <inttypes.h>
172 #include <immintrin.h>
176 unsigned int num_points)
178 unsigned int number = 0;
179 float* inputPtr = vecBuffer;
181 const float invScalar = 1.0 / scalar;
182 __m256 vecScalar = _mm256_set1_ps(invScalar);
186 const uint64_t eighthPoints = num_points / 8;
187 for (; number < eighthPoints; number++) {
189 input1 = _mm256_loadu_ps(inputPtr);
191 input1 = _mm256_mul_ps(input1, vecScalar);
193 _mm256_storeu_ps(inputPtr, input1);
198 number = eighthPoints * 8;
199 for (; number < num_points; number++) {
200 *inputPtr *= invScalar;
float32x4_t __m128
Definition: sse2neon.h:235
FORCE_INLINE __m128 _mm_mul_ps(__m128 a, __m128 b)
Definition: sse2neon.h:2205
FORCE_INLINE __m128 _mm_set_ps1(float)
Definition: sse2neon.h:2437
FORCE_INLINE __m128 _mm_load_ps(const float *p)
Definition: sse2neon.h:1858
FORCE_INLINE void _mm_store_ps(float *p, __m128 a)
Definition: sse2neon.h:2704
static void volk_32f_s32f_normalize_a_avx(float *vecBuffer, const float scalar, unsigned int num_points)
Definition: volk_32f_s32f_normalize.h:66
static void volk_32f_s32f_normalize_u_avx(float *vecBuffer, const float scalar, unsigned int num_points)
Definition: volk_32f_s32f_normalize.h:174
static void volk_32f_s32f_normalize_generic(float *vecBuffer, const float scalar, unsigned int num_points)
Definition: volk_32f_s32f_normalize.h:135
static void volk_32f_s32f_normalize_a_sse(float *vecBuffer, const float scalar, unsigned int num_points)
Definition: volk_32f_s32f_normalize.h:101