Intel® C++ Compiler Classic Developer Guide and Reference

ID 767249
Date 12/16/2022
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

<span class='option'>_mm256_blendv_epi8 </span>

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.