_mm256_sign_epi8
Classification
AVX_ALL, Arithmetic, CPUID Test: AVX2
Header File
immintrin.h
Instruction
VPSIGNB ymm, ymm, ymm
Synopsis
 _mm256_sign_epi8(__m256i a, __m256i b);
Description
Negate packed signed 8-bit integers in "a" when the corresponding signed 8-bit integer in "b" is negative, and store the results in "dst". Element in "dst" are zeroed out when the corresponding element in "b" is zero.
Operation
FOR j := 0 to 31
	i := j*8
	IF b[i+7:i] < 0
		dst[i+7:i] := -(a[i+7:i])
	ELSE IF b[i+7:i] == 0
		dst[i+7:i] := 0
	ELSE
		dst[i+7:i] := a[i+7:i]
	FI
ENDFOR
dst[MAX:256] := 0