Processors
Intel® Processors, Tools, and Utilities
14536 Discussions

Can I use __mmask8 in intrinsic functions without AVX512DQ?

AFog0
Beginner
930 Views

Some AVX512F intrinsic functions use __mmask8 masks, but 8-bit mask instructions like KMOVB and KANDB require AVX512DQ. How can I make sure the compiler uses 16-bit mask instructions (KMOVW, KANDW) and not 8-bit mask instructions when I have AVX512F but not AVX512DQ? I am writing generic code and I want to make sure the code works correctly in all compilers. For example:

__mmask8 a, b, c; __m512i x, y, z; ... a = b & c; // use KANDW, not KANDB z = _mm512_mask_mov_epi64(x, a, y);

Or should I write:

__mmask16 a, b, c; __m512i x, y, z; ... a = b & c; // use KANDW, not KANDB z = _mm512_mask_mov_epi64(x, (__mmask8)a, y);

 

 

 

 

 

0 Kudos
1 Reply
n_scott_pearson
Super User
697 Views

Sorry, this is a technical support forum for Intel processors. You need to repost your query in the Intel Developer Zone. Here is link to their forum: Intel Developer Zone forum. Unfortunately, I don't have the privileges that would allow me to move this query for you.

...S

0 Kudos
Reply