- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I'm trying to copy some values using one instruction between two registers(__m512i). I'm started using permutation, but the function _mm512_permutevar_epi32(__m512i idx, __m512i a) needs a complete new permutation (idx) for all elements and I need to keep some elements (99s in example).
I need something like that:
__m512i a = {21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36}; __m512i idx = {-,-,-,-,0,1,2,3,4,5,6,7,8,9,10,11}; __m512i dst = {99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99}; dst = _m512_permutevar_epi32(idx,a); // {99,99,99,99,21,22,23,24,25,26,27,28,29,30,31,32};
If anyone could suggest a instruction in KNC that do this, I appreciate.
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Use the variation of the same intrinsic that uses the write mask
__m512i _mm512_mask_permutexvar_epi32 (__m512i src, __mmask16 k, __m512i idx, __m512i a);
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks.
It works well.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page