Developer Guide and Reference

Contents

_mm256_blendv_epi8

Conditionally blends word elements of source vector depending on bits in a mask vector. The corresponding Intel® AVX2 instruction is
VPBLENDVB
.

Syntax

extern __m256i _mm256_blendv_epi8(__m256i s1, __m256i s2, __m256i mask);
Arguments
s1
integer source vector used for the operation
s2
integer source vector used for the operation
mask
integer vector used for the operation
Description
Performs a blend operation by conditionally copying 8-bit byte elements from source vectors
s2
and
s1
, depending on mask bits defined in
mask
vector. The mask bits are the most significant bit in each byte element of
mask.
Each byte element of the destination vector is copied from the corresponding byte element in
s2
if a mask bit is 1, or the corresponding byte element in
s1
if a mask bit is 0.
Returns
Result of the blend operation.