Method BitSelect
- Namespace
- Zyl.VectorTraits.Numerics
- Assembly
- VectorTraits.dll
BitSelect(sbyte, sbyte, sbyte)
Conditionally mask selects a value from two variables on a bitwise basis (按条件掩码从两个变量中按位选择值).
[CLSCompliant(false)]
public static sbyte BitSelect(sbyte condition, sbyte left, sbyte right)
Parameters
condition
sbyteThe mask that is used to select a value from
left
orright
(用于从left
或right
中选择值的掩码).left
sbyteThe variable that is selected when the corresponding bit in
condition
is one (当condition
中的对应位为 1 时选择的变量).right
sbyteThe variable that is selected when the corresponding bit in
condition
is zero (当condition
中的对应位为 0 时选择的变量).
Returns
- sbyte
A value whose bits come from
left
orright
based on the value ofcondition
(一个数值,其二进制位是根据condition
由left
orright
组合而成).
BitSelect(byte, byte, byte)
Conditionally mask selects a value from two variables on a bitwise basis (按条件掩码从两个变量中按位选择值).
public static byte BitSelect(byte condition, byte left, byte right)
Parameters
condition
byteThe mask that is used to select a value from
left
orright
(用于从left
或right
中选择值的掩码).left
byteThe variable that is selected when the corresponding bit in
condition
is one (当condition
中的对应位为 1 时选择的变量).right
byteThe variable that is selected when the corresponding bit in
condition
is zero (当condition
中的对应位为 0 时选择的变量).
Returns
- byte
A value whose bits come from
left
orright
based on the value ofcondition
(一个数值,其二进制位是根据condition
由left
orright
组合而成).
BitSelect(short, short, short)
Conditionally mask selects a value from two variables on a bitwise basis (按条件掩码从两个变量中按位选择值).
public static short BitSelect(short condition, short left, short right)
Parameters
condition
shortThe mask that is used to select a value from
left
orright
(用于从left
或right
中选择值的掩码).left
shortThe variable that is selected when the corresponding bit in
condition
is one (当condition
中的对应位为 1 时选择的变量).right
shortThe variable that is selected when the corresponding bit in
condition
is zero (当condition
中的对应位为 0 时选择的变量).
Returns
- short
A value whose bits come from
left
orright
based on the value ofcondition
(一个数值,其二进制位是根据condition
由left
orright
组合而成).
BitSelect(ushort, ushort, ushort)
Conditionally mask selects a value from two variables on a bitwise basis (按条件掩码从两个变量中按位选择值).
[CLSCompliant(false)]
public static ushort BitSelect(ushort condition, ushort left, ushort right)
Parameters
condition
ushortThe mask that is used to select a value from
left
orright
(用于从left
或right
中选择值的掩码).left
ushortThe variable that is selected when the corresponding bit in
condition
is one (当condition
中的对应位为 1 时选择的变量).right
ushortThe variable that is selected when the corresponding bit in
condition
is zero (当condition
中的对应位为 0 时选择的变量).
Returns
- ushort
A value whose bits come from
left
orright
based on the value ofcondition
(一个数值,其二进制位是根据condition
由left
orright
组合而成).
BitSelect(int, int, int)
Conditionally mask selects a value from two variables on a bitwise basis (按条件掩码从两个变量中按位选择值).
public static int BitSelect(int condition, int left, int right)
Parameters
condition
intThe mask that is used to select a value from
left
orright
(用于从left
或right
中选择值的掩码).left
intThe variable that is selected when the corresponding bit in
condition
is one (当condition
中的对应位为 1 时选择的变量).right
intThe variable that is selected when the corresponding bit in
condition
is zero (当condition
中的对应位为 0 时选择的变量).
Returns
- int
A value whose bits come from
left
orright
based on the value ofcondition
(一个数值,其二进制位是根据condition
由left
orright
组合而成).
BitSelect(uint, uint, uint)
Conditionally mask selects a value from two variables on a bitwise basis (按条件掩码从两个变量中按位选择值).
[CLSCompliant(false)]
public static uint BitSelect(uint condition, uint left, uint right)
Parameters
condition
uintThe mask that is used to select a value from
left
orright
(用于从left
或right
中选择值的掩码).left
uintThe variable that is selected when the corresponding bit in
condition
is one (当condition
中的对应位为 1 时选择的变量).right
uintThe variable that is selected when the corresponding bit in
condition
is zero (当condition
中的对应位为 0 时选择的变量).
Returns
- uint
A value whose bits come from
left
orright
based on the value ofcondition
(一个数值,其二进制位是根据condition
由left
orright
组合而成).
BitSelect(long, long, long)
Conditionally mask selects a value from two variables on a bitwise basis (按条件掩码从两个变量中按位选择值).
public static long BitSelect(long condition, long left, long right)
Parameters
condition
longThe mask that is used to select a value from
left
orright
(用于从left
或right
中选择值的掩码).left
longThe variable that is selected when the corresponding bit in
condition
is one (当condition
中的对应位为 1 时选择的变量).right
longThe variable that is selected when the corresponding bit in
condition
is zero (当condition
中的对应位为 0 时选择的变量).
Returns
- long
A value whose bits come from
left
orright
based on the value ofcondition
(一个数值,其二进制位是根据condition
由left
orright
组合而成).
BitSelect(ulong, ulong, ulong)
Conditionally mask selects a value from two variables on a bitwise basis (按条件掩码从两个变量中按位选择值).
[CLSCompliant(false)]
public static ulong BitSelect(ulong condition, ulong left, ulong right)
Parameters
condition
ulongThe mask that is used to select a value from
left
orright
(用于从left
或right
中选择值的掩码).left
ulongThe variable that is selected when the corresponding bit in
condition
is one (当condition
中的对应位为 1 时选择的变量).right
ulongThe variable that is selected when the corresponding bit in
condition
is zero (当condition
中的对应位为 0 时选择的变量).
Returns
- ulong
A value whose bits come from
left
orright
based on the value ofcondition
(一个数值,其二进制位是根据condition
由left
orright
组合而成).
BitSelect(ExInt128, ExInt128, ExInt128)
Conditionally mask selects a value from two variables on a bitwise basis (按条件掩码从两个变量中按位选择值).
public static ExInt128 BitSelect(ExInt128 condition, ExInt128 left, ExInt128 right)
Parameters
condition
ExInt128The mask that is used to select a value from
left
orright
(用于从left
或right
中选择值的掩码).left
ExInt128The variable that is selected when the corresponding bit in
condition
is one (当condition
中的对应位为 1 时选择的变量).right
ExInt128The variable that is selected when the corresponding bit in
condition
is zero (当condition
中的对应位为 0 时选择的变量).
Returns
- ExInt128
A value whose bits come from
left
orright
based on the value ofcondition
(一个数值,其二进制位是根据condition
由left
orright
组合而成).
BitSelect(ExUInt128, ExUInt128, ExUInt128)
Conditionally mask selects a value from two variables on a bitwise basis (按条件掩码从两个变量中按位选择值).
[CLSCompliant(false)]
public static ExUInt128 BitSelect(ExUInt128 condition, ExUInt128 left, ExUInt128 right)
Parameters
condition
ExUInt128The mask that is used to select a value from
left
orright
(用于从left
或right
中选择值的掩码).left
ExUInt128The variable that is selected when the corresponding bit in
condition
is one (当condition
中的对应位为 1 时选择的变量).right
ExUInt128The variable that is selected when the corresponding bit in
condition
is zero (当condition
中的对应位为 0 时选择的变量).
Returns
- ExUInt128
A value whose bits come from
left
orright
based on the value ofcondition
(一个数值,其二进制位是根据condition
由left
orright
组合而成).
BitSelect(Int128, Int128, Int128)
Conditionally mask selects a value from two variables on a bitwise basis (按条件掩码从两个变量中按位选择值).
public static Int128 BitSelect(Int128 condition, Int128 left, Int128 right)
Parameters
condition
Int128The mask that is used to select a value from
left
orright
(用于从left
或right
中选择值的掩码).left
Int128The variable that is selected when the corresponding bit in
condition
is one (当condition
中的对应位为 1 时选择的变量).right
Int128The variable that is selected when the corresponding bit in
condition
is zero (当condition
中的对应位为 0 时选择的变量).
Returns
- Int128
A value whose bits come from
left
orright
based on the value ofcondition
(一个数值,其二进制位是根据condition
由left
orright
组合而成).
BitSelect(UInt128, UInt128, UInt128)
Conditionally mask selects a value from two variables on a bitwise basis (按条件掩码从两个变量中按位选择值).
[CLSCompliant(false)]
public static UInt128 BitSelect(UInt128 condition, UInt128 left, UInt128 right)
Parameters
condition
UInt128The mask that is used to select a value from
left
orright
(用于从left
或right
中选择值的掩码).left
UInt128The variable that is selected when the corresponding bit in
condition
is one (当condition
中的对应位为 1 时选择的变量).right
UInt128The variable that is selected when the corresponding bit in
condition
is zero (当condition
中的对应位为 0 时选择的变量).
Returns
- UInt128
A value whose bits come from
left
orright
based on the value ofcondition
(一个数值,其二进制位是根据condition
由left
orright
组合而成).
BitSelect(nint, nint, nint)
Conditionally mask selects a value from two variables on a bitwise basis (按条件掩码从两个变量中按位选择值).
public static nint BitSelect(nint condition, nint left, nint right)
Parameters
condition
nintThe mask that is used to select a value from
left
orright
(用于从left
或right
中选择值的掩码).left
nintThe variable that is selected when the corresponding bit in
condition
is one (当condition
中的对应位为 1 时选择的变量).right
nintThe variable that is selected when the corresponding bit in
condition
is zero (当condition
中的对应位为 0 时选择的变量).
Returns
- nint
A value whose bits come from
left
orright
based on the value ofcondition
(一个数值,其二进制位是根据condition
由left
orright
组合而成).
BitSelect(nuint, nuint, nuint)
Conditionally mask selects a value from two variables on a bitwise basis (按条件掩码从两个变量中按位选择值).
[CLSCompliant(false)]
public static nuint BitSelect(nuint condition, nuint left, nuint right)
Parameters
condition
nuintThe mask that is used to select a value from
left
orright
(用于从left
或right
中选择值的掩码).left
nuintThe variable that is selected when the corresponding bit in
condition
is one (当condition
中的对应位为 1 时选择的变量).right
nuintThe variable that is selected when the corresponding bit in
condition
is zero (当condition
中的对应位为 0 时选择的变量).
Returns
- nuint
A value whose bits come from
left
orright
based on the value ofcondition
(一个数值,其二进制位是根据condition
由left
orright
组合而成).
BitSelect(int, float, float)
Conditionally mask selects a value from two variables on a bitwise basis (按条件掩码从两个变量中按位选择值).
public static float BitSelect(int condition, float left, float right)
Parameters
condition
intThe mask that is used to select a value from
left
orright
(用于从left
或right
中选择值的掩码).left
floatThe variable that is selected when the corresponding bit in
condition
is one (当condition
中的对应位为 1 时选择的变量).right
floatThe variable that is selected when the corresponding bit in
condition
is zero (当condition
中的对应位为 0 时选择的变量).
Returns
- float
A value whose bits come from
left
orright
based on the value ofcondition
(一个数值,其二进制位是根据condition
由left
orright
组合而成).
BitSelect(float, float, float)
Conditionally mask selects a value from two variables on a bitwise basis (按条件掩码从两个变量中按位选择值).
public static float BitSelect(float condition, float left, float right)
Parameters
condition
floatThe mask that is used to select a value from
left
orright
(用于从left
或right
中选择值的掩码).left
floatThe variable that is selected when the corresponding bit in
condition
is one (当condition
中的对应位为 1 时选择的变量).right
floatThe variable that is selected when the corresponding bit in
condition
is zero (当condition
中的对应位为 0 时选择的变量).
Returns
- float
A value whose bits come from
left
orright
based on the value ofcondition
(一个数值,其二进制位是根据condition
由left
orright
组合而成).
BitSelect(long, double, double)
Conditionally mask selects a value from two variables on a bitwise basis (按条件掩码从两个变量中按位选择值).
public static double BitSelect(long condition, double left, double right)
Parameters
condition
longThe mask that is used to select a value from
left
orright
(用于从left
或right
中选择值的掩码).left
doubleThe variable that is selected when the corresponding bit in
condition
is one (当condition
中的对应位为 1 时选择的变量).right
doubleThe variable that is selected when the corresponding bit in
condition
is zero (当condition
中的对应位为 0 时选择的变量).
Returns
- double
A value whose bits come from
left
orright
based on the value ofcondition
(一个数值,其二进制位是根据condition
由left
orright
组合而成).
BitSelect(double, double, double)
Conditionally mask selects a value from two variables on a bitwise basis (按条件掩码从两个变量中按位选择值).
public static double BitSelect(double condition, double left, double right)
Parameters
condition
doubleThe mask that is used to select a value from
left
orright
(用于从left
或right
中选择值的掩码).left
doubleThe variable that is selected when the corresponding bit in
condition
is one (当condition
中的对应位为 1 时选择的变量).right
doubleThe variable that is selected when the corresponding bit in
condition
is zero (当condition
中的对应位为 0 时选择的变量).
Returns
- double
A value whose bits come from
left
orright
based on the value ofcondition
(一个数值,其二进制位是根据condition
由left
orright
组合而成).
BitSelect(short, Half, Half)
Conditionally mask selects a value from two variables on a bitwise basis (按条件掩码从两个变量中按位选择值).
public static Half BitSelect(short condition, Half left, Half right)
Parameters
condition
shortThe mask that is used to select a value from
left
orright
(用于从left
或right
中选择值的掩码).left
HalfThe variable that is selected when the corresponding bit in
condition
is one (当condition
中的对应位为 1 时选择的变量).right
HalfThe variable that is selected when the corresponding bit in
condition
is zero (当condition
中的对应位为 0 时选择的变量).
Returns
- Half
A value whose bits come from
left
orright
based on the value ofcondition
(一个数值,其二进制位是根据condition
由left
orright
组合而成).
BitSelect(Half, Half, Half)
Conditionally mask selects a value from two variables on a bitwise basis (按条件掩码从两个变量中按位选择值).
public static Half BitSelect(Half condition, Half left, Half right)
Parameters
condition
HalfThe mask that is used to select a value from
left
orright
(用于从left
或right
中选择值的掩码).left
HalfThe variable that is selected when the corresponding bit in
condition
is one (当condition
中的对应位为 1 时选择的变量).right
HalfThe variable that is selected when the corresponding bit in
condition
is zero (当condition
中的对应位为 0 时选择的变量).
Returns
- Half
A value whose bits come from
left
orright
based on the value ofcondition
(一个数值,其二进制位是根据condition
由left
orright
组合而成).