58#ifndef INCLUDED_volk_32f_s32f_add_32f_u_H
59#define INCLUDED_volk_32f_s32f_add_32f_u_H
66 unsigned int num_points)
68 unsigned int number = 0;
69 const float* inputPtr = aVector;
70 float* outputPtr = cVector;
71 for (number = 0; number < num_points; number++) {
72 *outputPtr = (*inputPtr) + scalar;
85 unsigned int num_points)
87 unsigned int number = 0;
88 const unsigned int quarterPoints = num_points / 4;
90 float* cPtr = cVector;
91 const float* aPtr = aVector;
95 for (; number < quarterPoints; number++) {
106 number = quarterPoints * 4;
112#include <immintrin.h>
115 const float* aVector,
117 unsigned int num_points)
119 unsigned int number = 0;
120 const unsigned int eighthPoints = num_points / 8;
122 float* cPtr = cVector;
123 const float* aPtr = aVector;
125 __m256 aVal, bVal, cVal;
126 bVal = _mm256_set1_ps(scalar);
127 for (; number < eighthPoints; number++) {
129 aVal = _mm256_loadu_ps(aPtr);
131 cVal = _mm256_add_ps(aVal, bVal);
133 _mm256_storeu_ps(cPtr, cVal);
139 number = eighthPoints * 8;
148 const float* aVector,
150 unsigned int num_points)
152 unsigned int number = 0;
153 const float* inputPtr = aVector;
154 float* outputPtr = cVector;
155 const unsigned int quarterPoints = num_points / 4;
157 float32x4_t aVal, cVal, scalarvec;
159 scalarvec = vdupq_n_f32(scalar);
161 for (number = 0; number < quarterPoints; number++) {
162 aVal = vld1q_f32(inputPtr);
163 cVal = vaddq_f32(aVal, scalarvec);
164 vst1q_f32(outputPtr, cVal);
169 number = quarterPoints * 4;
178#ifndef INCLUDED_volk_32f_s32f_add_32f_a_H
179#define INCLUDED_volk_32f_s32f_add_32f_a_H
182#include <xmmintrin.h>
185 const float* aVector,
187 unsigned int num_points)
189 unsigned int number = 0;
190 const unsigned int quarterPoints = num_points / 4;
192 float* cPtr = cVector;
193 const float* aPtr = aVector;
197 for (; number < quarterPoints; number++) {
208 number = quarterPoints * 4;
214#include <immintrin.h>
217 const float* aVector,
219 unsigned int num_points)
221 unsigned int number = 0;
222 const unsigned int eighthPoints = num_points / 8;
224 float* cPtr = cVector;
225 const float* aPtr = aVector;
227 __m256 aVal, bVal, cVal;
228 bVal = _mm256_set1_ps(scalar);
229 for (; number < eighthPoints; number++) {
230 aVal = _mm256_load_ps(aPtr);
232 cVal = _mm256_add_ps(aVal, bVal);
234 _mm256_store_ps(cPtr, cVal);
240 number = eighthPoints * 8;
247extern void volk_32f_s32f_add_32f_a_orc_impl(
float* dst,
250 unsigned int num_points);
252static inline void volk_32f_s32f_add_32f_u_orc(
float* cVector,
253 const float* aVector,
255 unsigned int num_points)
257 volk_32f_s32f_add_32f_a_orc_impl(cVector, aVector, scalar, num_points);