Visible to Intel only — GUID: GUID-96EC3F0E-053E-4E70-9004-04E5F00B4AB7
Visible to Intel only — GUID: GUID-96EC3F0E-053E-4E70-9004-04E5F00B4AB7
<span class='option'>_mm256_sign_epi8/16/32</span>
Changes the sign of elements in one source vector depending on the sign of corresponding element in other source vector. The corresponding Intel® AVX2 instruction is VPSIGNB, VPSIGNW, or VPSIGND.
extern __m256i _mm256_sign_epi8(__m256i s1, __m256i s2); |
extern __m256i _mm256_sign_epi16(__m256i s1, __m256i s2); |
extern __m256i _mm256_sign_epi32(__m256i s1, __m256i s2); |
s1 |
integer source vector used for the operation |
s2 |
integer source vector used for the operation |
Modifies the sign of data elements in the source vector s1 depending on the sign of corresponding element in vector s2 as follows:
If sign of data element in s2 vector is < 0 then the sign of corresponding data element in vector s1 is made negative.
If sign of data element in s2 vector is > 0 then the sign of corresponding data element in vector s1 is left unchanged.
If the data element in s2 vector is = 0 then the corresponding data element in vector s1 is set to 0.
The _mm256_sign_epi8 intrinsic operates on 8-bit signed bytes. The _mm256_sign_epi16 intrinsic operates on 16-bit signed words. The _mm256_sign_epi32 intrinsic operates on 32-bit signed integers.
Result of the operation.