Skip to content
Snippets Groups Projects
Commit 05be3207 authored by James Willis's avatar James Willis
Browse files

Define VEC_HADD for GCC when using AVX-512 architectures.

parent 5ff84736
No related branches found
No related tags found
1 merge request!320Dopair1 vectorisation merge
......@@ -107,8 +107,13 @@
}
/* Performs a horizontal add on the vector and adds the result to a float. */
#ifdef __ICC
#define VEC_HADD(a, b) b += _mm512_reduce_add_ps(a.v)
#else /* _mm512_reduce_add_ps not present in GCC compiler. TODO: Implement intrinsic version.*/
#define VEC_HADD(a, b) { \
for( int i=0; i<VEC_SIZE; i++) b += a.f[i]; \
}
#endif
/* Calculates the number of set bits in the mask and adds the result to an int.
*/
#define VEC_FORM_PACKED_MASK(mask, v_mask, pack) \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment