Intel® ISA Extensions
Use hardware-based isolation and memory encryption to provide more code protection in your solutions.
1094 Discussions

How to load usigned char to __m512i on KNL

Zekun_Y_
Beginner
812 Views

How can I load the unsigned char to a __m512i vector on KNL?

I can't find the similar instrinsic like extload(I use extload on KNC) on KNL. On the other hand the AVX512-BW is not supported on KNL as well, so I can't use  _mm512_mask_load_epi8 to load a uint8. Is there anyway could load the unsigned char efficiently to a __m512i?

Thank you

0 Kudos
1 Solution
andysem
New Contributor III
812 Views

I guess you can load 16 bytes into __m128i and then use _mm512_cvtepi8_epi32/_mm512_cvtepu8_epi32 to convert the bytes to 32-bit integers for processing. AVX-512F does not support operating on 8-bit integers directly.

View solution in original post

0 Kudos
2 Replies
andysem
New Contributor III
813 Views

I guess you can load 16 bytes into __m128i and then use _mm512_cvtepi8_epi32/_mm512_cvtepu8_epi32 to convert the bytes to 32-bit integers for processing. AVX-512F does not support operating on 8-bit integers directly.

0 Kudos
Zekun_Y_
Beginner
812 Views

I just tested it. It seems working well.

Thank you very much!

andysem wrote:

I guess you can load 16 bytes into __m128i and then use _mm512_cvtepi8_epi32/_mm512_cvtepu8_epi32 to convert the bytes to 32-bit integers for processing. AVX-512F does not support operating on 8-bit integers directly.

0 Kudos
Reply