Intel® ISA Extensions
Use hardware-based isolation and memory encryption to provide more code protection in your solutions.
This community is designed for sharing of public information. Please do not share Intel or third-party confidential information here.
1058 Discussions

Is the guide of Gather/Scatter of AVX512 wrong?


I found the following from



extern void __cdecl _mm512_i32scatter_epi32(void* base_addr, __m512i a, __m512i vindex, _MM_DOWNCONV_EPI32_ENUM downconv, int scale, int hint);

Scatters int32 from a into memory using 32-bit indices. 32-bit elements are stored at addresses starting at base_addrand offset by each 32-bit element in vindex (each index is scaled by the factor in scale).


When I tried _mm512_i32scatter_epi32(dst_ptr, Vdata, Vindex, _MM_DOWNCONV_EPI32_NONE, 4, 1);  

The compilation reports error saying too many argument.

Then I found another manual from

extern void __cdecl _mm512_i32scatter_epi32(void* mv, __m512i index, __m512i v1, int scale);

And this works. It doesn't only have different number of argument but the order of two __m512i vector is reversed.

I'm using ICC 17.0.4.

I'm wondering what is wrong with the gather/scatter intrinsics here?

0 Kudos
2 Replies
Black Belt

I recommend that you use the official version of the Intrinsics Guide.

Web pages at the Intel web site move from time to time, but the Intrinsics Guide is available as a link from the ISA Extensions web page:

Right now the direct address for the Intrinsics Guide is



I also tried to use 

void _mm512_i32extscatter_epi32 (void * mv__m512i index__m512i v1_MM_DOWNCONV_EPI32_ENUM convint scaleint hint)

and I wrote 

_mm512_i32extscatter_epi32(output, Vindex, Vinput, _MM_DOWNCONV_EPI32_NONE, 4, 1);

The compiler reports 

catastrophic error: Illegal value of immediate argument to intrinsic

If I change the _MM_DOWNCONV_EPI32_NONE to _MM_DOWNCONV_EPI32_UINT8, the error becomes 

catastrophic error: Invalid downconversion argument to intrinsic.

What is the proper way to use this extscatter intrinsics? How to fix it?