Table of Contents

Method ConditionalSelect

Namespace
Zyl.VectorTraits
Assembly
VectorTraits.dll

ConditionalSelect<T>(Vector512<T>, Vector512<T>, Vector512<T>)

Conditionally selects a value from two vectors on a bitwise basis (按条件从两个向量中按位选择值). Mnemonic: rt[i] := (left[i] & condition[i]) | (right[i] & ~condition[i]).

public static Vector512<T> ConditionalSelect<T>(Vector512<T> condition, Vector512<T> left, Vector512<T> right) where T : struct

Parameters

condition Vector512<T>

The mask that is used to select a value from left or right (用于从 leftright中选择值的掩码).

left Vector512<T>

The vector that is selected when the corresponding bit in condition is one (当 condition 中的对应位为 1 时选择的向量).

right Vector512<T>

The vector that is selected when the corresponding bit in condition is zero (当 condition 中的对应位为 0 时选择的向量).

Returns

Vector512<T>

A vector whose bits come from left or right based on the value of condition (一个向量,其二进制位是根据 conditionleft or right 组合而成).

Type Parameters

T

The vector element type (向量中的元素的类型).

See Also

ConditionalSelect(Vector512<int>, Vector512<float>, Vector512<float>)

Conditionally selects a value from two vectors on a bitwise basis (按条件从两个向量中按位选择值). Mnemonic: rt[i] := (left[i] & condition[i]) | (right[i] & ~condition[i]).

public static Vector512<float> ConditionalSelect(Vector512<int> condition, Vector512<float> left, Vector512<float> right)

Parameters

condition Vector512<int>

The mask that is used to select a value from left or right (用于从 leftright中选择值的掩码).

left Vector512<float>

The vector that is selected when the corresponding bit in condition is one (当 condition 中的对应位为 1 时选择的向量).

right Vector512<float>

The vector that is selected when the corresponding bit in condition is zero (当 condition 中的对应位为 0 时选择的向量).

Returns

Vector512<float>

A vector whose bits come from left or right based on the value of condition (一个向量,其二进制位是根据 conditionleft or right 组合而成).

See Also

ConditionalSelect(Vector512<long>, Vector512<double>, Vector512<double>)

Conditionally selects a value from two vectors on a bitwise basis (按条件从两个向量中按位选择值). Mnemonic: rt[i] := (left[i] & condition[i]) | (right[i] & ~condition[i]).

public static Vector512<double> ConditionalSelect(Vector512<long> condition, Vector512<double> left, Vector512<double> right)

Parameters

condition Vector512<long>

The mask that is used to select a value from left or right (用于从 leftright中选择值的掩码).

left Vector512<double>

The vector that is selected when the corresponding bit in condition is one (当 condition 中的对应位为 1 时选择的向量).

right Vector512<double>

The vector that is selected when the corresponding bit in condition is zero (当 condition 中的对应位为 0 时选择的向量).

Returns

Vector512<double>

A vector whose bits come from left or right based on the value of condition (一个向量,其二进制位是根据 conditionleft or right 组合而成).

See Also