72#ifndef INCLUDED_volk_64f_x2_min_64f_a_H
73#define INCLUDED_volk_64f_x2_min_64f_a_H
81static inline void volk_64f_x2_min_64f_a_avx512f(
double* cVector,
82 const double* aVector,
83 const double* bVector,
84 unsigned int num_points)
86 unsigned int number = 0;
87 const unsigned int eigthPoints = num_points / 8;
89 double* cPtr = cVector;
90 const double* aPtr = aVector;
91 const double* bPtr = bVector;
93 __m512d aVal, bVal, cVal;
94 for (; number < eigthPoints; number++) {
96 aVal = _mm512_load_pd(aPtr);
97 bVal = _mm512_load_pd(bPtr);
99 cVal = _mm512_min_pd(aVal, bVal);
101 _mm512_store_pd(cPtr, cVal);
108 number = eigthPoints * 8;
109 for (; number < num_points; number++) {
110 const double a = *aPtr++;
111 const double b = *bPtr++;
112 *cPtr++ = (a < b ? a : b);
119#include <immintrin.h>
122 const double* aVector,
123 const double* bVector,
124 unsigned int num_points)
126 unsigned int number = 0;
127 const unsigned int quarterPoints = num_points / 4;
129 double* cPtr = cVector;
130 const double* aPtr = aVector;
131 const double* bPtr = bVector;
133 __m256d aVal, bVal, cVal;
134 for (; number < quarterPoints; number++) {
136 aVal = _mm256_load_pd(aPtr);
137 bVal = _mm256_load_pd(bPtr);
139 cVal = _mm256_min_pd(aVal, bVal);
141 _mm256_store_pd(cPtr, cVal);
148 number = quarterPoints * 4;
149 for (; number < num_points; number++) {
150 const double a = *aPtr++;
151 const double b = *bPtr++;
152 *cPtr++ = (a < b ? a : b);
159#include <emmintrin.h>
162 const double* aVector,
163 const double* bVector,
164 unsigned int num_points)
166 unsigned int number = 0;
167 const unsigned int halfPoints = num_points / 2;
169 double* cPtr = cVector;
170 const double* aPtr = aVector;
171 const double* bPtr = bVector;
173 __m128d aVal, bVal, cVal;
174 for (; number < halfPoints; number++) {
176 aVal = _mm_load_pd(aPtr);
177 bVal = _mm_load_pd(bPtr);
179 cVal = _mm_min_pd(aVal, bVal);
181 _mm_store_pd(cPtr, cVal);
188 number = halfPoints * 2;
189 for (; number < num_points; number++) {
190 const double a = *aPtr++;
191 const double b = *bPtr++;
192 *cPtr++ = (a < b ? a : b);
198#ifdef LV_HAVE_GENERIC
201 const double* aVector,
202 const double* bVector,
203 unsigned int num_points)
205 double* cPtr = cVector;
206 const double* aPtr = aVector;
207 const double* bPtr = bVector;
208 unsigned int number = 0;
210 for (number = 0; number < num_points; number++) {
211 const double a = *aPtr++;
212 const double b = *bPtr++;
213 *cPtr++ = (a < b ? a : b);
221#ifndef INCLUDED_volk_64f_x2_min_64f_u_H
222#define INCLUDED_volk_64f_x2_min_64f_u_H
227#ifdef LV_HAVE_AVX512F
228#include <immintrin.h>
230static inline void volk_64f_x2_min_64f_u_avx512f(
double* cVector,
231 const double* aVector,
232 const double* bVector,
233 unsigned int num_points)
235 unsigned int number = 0;
236 const unsigned int eigthPoints = num_points / 8;
238 double* cPtr = cVector;
239 const double* aPtr = aVector;
240 const double* bPtr = bVector;
242 __m512d aVal, bVal, cVal;
243 for (; number < eigthPoints; number++) {
245 aVal = _mm512_loadu_pd(aPtr);
246 bVal = _mm512_loadu_pd(bPtr);
248 cVal = _mm512_min_pd(aVal, bVal);
250 _mm512_storeu_pd(cPtr, cVal);
257 number = eigthPoints * 8;
258 for (; number < num_points; number++) {
259 const double a = *aPtr++;
260 const double b = *bPtr++;
261 *cPtr++ = (a < b ? a : b);
268#include <immintrin.h>
271 const double* aVector,
272 const double* bVector,
273 unsigned int num_points)
275 unsigned int number = 0;
276 const unsigned int quarterPoints = num_points / 4;
278 double* cPtr = cVector;
279 const double* aPtr = aVector;
280 const double* bPtr = bVector;
282 __m256d aVal, bVal, cVal;
283 for (; number < quarterPoints; number++) {
285 aVal = _mm256_loadu_pd(aPtr);
286 bVal = _mm256_loadu_pd(bPtr);
288 cVal = _mm256_min_pd(aVal, bVal);
290 _mm256_storeu_pd(cPtr, cVal);
297 number = quarterPoints * 4;
298 for (; number < num_points; number++) {
299 const double a = *aPtr++;
300 const double b = *bPtr++;
301 *cPtr++ = (a < b ? a : b);
static void volk_64f_x2_min_64f_u_avx(double *cVector, const double *aVector, const double *bVector, unsigned int num_points)
Definition: volk_64f_x2_min_64f.h:270
static void volk_64f_x2_min_64f_a_sse2(double *cVector, const double *aVector, const double *bVector, unsigned int num_points)
Definition: volk_64f_x2_min_64f.h:161
static void volk_64f_x2_min_64f_a_avx(double *cVector, const double *aVector, const double *bVector, unsigned int num_points)
Definition: volk_64f_x2_min_64f.h:121
static void volk_64f_x2_min_64f_generic(double *cVector, const double *aVector, const double *bVector, unsigned int num_points)
Definition: volk_64f_x2_min_64f.h:200