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_blend_ps</span>

Performs a conditional blend/merge of float32 vectors. The corresponding Intel® AVX instruction is VBLENDPS.

Syntax

extern __m256 _mm256_blend_ps(__m256 m1, __m256 m2, const int mask);

Arguments

m1

float32 vector used for the operation

m2

float32 vector also used for the operation

mask

a constant of integer type that is the mask for the operation

Description

Performs a conditional merge of eight packed single-precision floating point elements (float32 elements) of two vectors according to the immediate bits of the mask parameter.

The mask parameter defines a constant integer. The immediate bits [7:0] in the mask determine from which source vector elements are copied into the resulting vector.

If the bits in mask are “1” then the corresponding elements of the second source vector are copied into the resulting vector. If the bits are “0” then the corresponding elements of the first source vector are copied into the resulting vector. Thus a merging/blending of the elements of the two source vectors occurs when this intrinsic is used.

Returns

Result of the merge/blend operation.