Vector128.ConditionalSelect<T> Method

Definition

Conditionally selects a value from two vectors on a bitwise basis.

public static System.Runtime.Intrinsics.Vector128<T> ConditionalSelect<T> (System.Runtime.Intrinsics.Vector128<T> condition, System.Runtime.Intrinsics.Vector128<T> left, System.Runtime.Intrinsics.Vector128<T> right) where T : struct;
public static System.Runtime.Intrinsics.Vector128<T> ConditionalSelect<T> (System.Runtime.Intrinsics.Vector128<T> condition, System.Runtime.Intrinsics.Vector128<T> left, System.Runtime.Intrinsics.Vector128<T> right);

Type Parameters

T

The type of the elements in the vector.

Parameters

condition
Vector128<T>

The mask that is used to select a value from left or right.

left
Vector128<T>

The vector that is selected when the corresponding bit in condition is one.

right
Vector128<T>

The vector that is selected when the corresponding bit in condition is zero.

Returns

A vector whose bits come from left or right based on the value of condition.

Exceptions

The type of condition, left, and right (T) is not supported.

Applies to

Product Versions
.NET 7, 8, 9