Intel® C++ Compiler 16.0 User and Reference Guide
This topic only applies to Intel® Many Integrated Core Architecture (Intel® MIC Architecture).
Reduction intrinsics perform arithmetic operations on all elements of a source vector and return a scalar value. There are 14 reduction intrinsics. Their prototypes are available in the immintrin.h header file.
To use the reduction intrinsics across all types, you can use the type cast intrinsics. The example below illustrates the usage. The __cdecl _mm512_setzero_pd() reduction intrinsic sets all the elements of a float64 vector to zero. To set all other vector types to zero, do the following:
#ifdef _m512_TYPED #define __cdecl _mm512_setzero_pd() __cdecl _mm512_castps_pd(__cdecl _mm512_setzero()) #define __cdecl _mm512_setzero_ps() __cdecl _mm512_setzero() #define __cdecl _mm512_setzero_epi32() __cdecl _mm512_castps_si512(__cdecl _mm512_setzero()) #else #define __cdecl _mm512_setzero_pd() __cdecl _mm512_setzero() #define __cdecl _mm512_setzero_ps() __cdecl _mm512_setzero() #define __cdecl _mm512_setzero_epi32() __cdecl _mm512_setzero() #endif