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.