Method ConditionalSelect
- Namespace
- Zyl.VectorTraits.Impl.AVector128
- Assembly
- VectorTraits.dll
ConditionalSelect<T>(Vector128<T>, Vector128<T>, Vector128<T>)
Conditionally selects a value from two vectors on a bitwise basis (按条件从两个向量中按位选择值).
Mnemonic: rt[i] := (left[i] & condition[i]) | (right[i] & ~condition[i]).
public virtual Vector128<T> ConditionalSelect<T>(Vector128<T> condition, Vector128<T> left, Vector128<T> right) where T : struct
Parameters
conditionVector128<T>The mask that is used to select a value from
leftorright(用于从left或right中选择值的掩码).leftVector128<T>The vector that is selected when the corresponding bit in
conditionis one (当condition中的对应位为 1 时选择的向量).rightVector128<T>The vector that is selected when the corresponding bit in
conditionis zero (当condition中的对应位为 0 时选择的向量).
Returns
- Vector128<T>
A vector whose bits come from
leftorrightbased on the value ofcondition(一个向量,其二进制位是根据condition由leftorright组合而成).
Type Parameters
TThe vector element type (向量中的元素的类型).
- See Also
ConditionalSelect(Vector128<int>, Vector128<float>, Vector128<float>)
Conditionally selects a value from two vectors on a bitwise basis (按条件从两个向量中按位选择值).
Mnemonic: rt[i] := (left[i] & condition[i]) | (right[i] & ~condition[i]).
public virtual Vector128<float> ConditionalSelect(Vector128<int> condition, Vector128<float> left, Vector128<float> right)
Parameters
conditionVector128<int>The mask that is used to select a value from
leftorright(用于从left或right中选择值的掩码).leftVector128<float>The vector that is selected when the corresponding bit in
conditionis one (当condition中的对应位为 1 时选择的向量).rightVector128<float>The vector that is selected when the corresponding bit in
conditionis zero (当condition中的对应位为 0 时选择的向量).
Returns
- Vector128<float>
A vector whose bits come from
leftorrightbased on the value ofcondition(一个向量,其二进制位是根据condition由leftorright组合而成).
- See Also
ConditionalSelect(Vector128<long>, Vector128<double>, Vector128<double>)
Conditionally selects a value from two vectors on a bitwise basis (按条件从两个向量中按位选择值).
Mnemonic: rt[i] := (left[i] & condition[i]) | (right[i] & ~condition[i]).
public virtual Vector128<double> ConditionalSelect(Vector128<long> condition, Vector128<double> left, Vector128<double> right)
Parameters
conditionVector128<long>The mask that is used to select a value from
leftorright(用于从left或right中选择值的掩码).leftVector128<double>The vector that is selected when the corresponding bit in
conditionis one (当condition中的对应位为 1 时选择的向量).rightVector128<double>The vector that is selected when the corresponding bit in
conditionis zero (当condition中的对应位为 0 时选择的向量).
Returns
- Vector128<double>
A vector whose bits come from
leftorrightbased on the value ofcondition(一个向量,其二进制位是根据condition由leftorright组合而成).
- See Also