Class MathBitOperations
- Namespace
- Zyl.VectorTraits.Numerics
- Assembly
- VectorTraits.dll
Math functions of BitOperations (BitOperations 的数学函数).
public static class MathBitOperations
- Inheritance
-
MathBitOperations
- Inherited Members
Methods
- Crc32C(uint, byte)
Accumulates the CRC (Cyclic redundancy check) checksum.
- Crc32C(uint, ushort)
Accumulates the CRC (Cyclic redundancy check) checksum.
- Crc32C(uint, uint)
Accumulates the CRC (Cyclic redundancy check) checksum.
- Crc32C(uint, ulong)
Accumulates the CRC (Cyclic redundancy check) checksum.
- IsPow2(Int128)
Evaluate whether a given integral value is a power of 2.
- IsPow2(int)
Evaluate whether a given integral value is a power of 2.
- IsPow2(long)
Evaluate whether a given integral value is a power of 2.
- IsPow2(nint)
Evaluate whether a given integral value is a power of 2.
- IsPow2(UInt128)
Evaluate whether a given integral value is a power of 2.
- IsPow2(uint)
Evaluate whether a given integral value is a power of 2.
- IsPow2(ulong)
Evaluate whether a given integral value is a power of 2.
- IsPow2(nuint)
Evaluate whether a given integral value is a power of 2.
- IsPow2(ExInt128)
Evaluate whether a given integral value is a power of 2.
- IsPow2(ExUInt128)
Evaluate whether a given integral value is a power of 2.
- LeadingZeroCount(UInt128)
Count the number of leading zero bits in a mask. Similar in behavior to the x86 instruction LZCNT.
- LeadingZeroCount(uint)
Count the number of leading zero bits in a mask. Similar in behavior to the x86 instruction LZCNT.
- LeadingZeroCount(ulong)
Count the number of leading zero bits in a mask. Similar in behavior to the x86 instruction LZCNT.
- LeadingZeroCount(nuint)
Count the number of leading zero bits in a mask. Similar in behavior to the x86 instruction LZCNT.
- LeadingZeroCount(ExUInt128)
Count the number of leading zero bits in a mask. Similar in behavior to the x86 instruction LZCNT.
- Log2(UInt128)
Returns the integer (floor) log of the specified value, base 2. Note that by convention, input value 0 returns 0 since log(0) is undefined.
- Log2(uint)
Returns the integer (floor) log of the specified value, base 2. Note that by convention, input value 0 returns 0 since log(0) is undefined.
- Log2(ulong)
Returns the integer (floor) log of the specified value, base 2. Note that by convention, input value 0 returns 0 since log(0) is undefined.
- Log2(nuint)
Returns the integer (floor) log of the specified value, base 2. Note that by convention, input value 0 returns 0 since log(0) is undefined.
- Log2(ExUInt128)
Returns the integer (floor) log of the specified value, base 2. Note that by convention, input value 0 returns 0 since log(0) is undefined.
- PopCount(UInt128)
Returns the population count (number of bits set) of a mask. Similar in behavior to the x86 instruction POPCNT.
- PopCount(uint)
Returns the population count (number of bits set) of a mask. Similar in behavior to the x86 instruction POPCNT.
- PopCount(ulong)
Returns the population count (number of bits set) of a mask. Similar in behavior to the x86 instruction POPCNT.
- PopCount(nuint)
Returns the population count (number of bits set) of a mask. Similar in behavior to the x86 instruction POPCNT.
- PopCount(ExUInt128)
Returns the population count (number of bits set) of a mask. Similar in behavior to the x86 instruction POPCNT.
- RotateLeft(uint, int)
Rotates the specified value left by the specified number of bits. Similar in behavior to the x86 instruction ROL.
- RotateLeft(ulong, int)
Rotates the specified value left by the specified number of bits. Similar in behavior to the x86 instruction ROL.
- RotateLeft(nuint, int)
Rotates the specified value left by the specified number of bits. Similar in behavior to the x86 instruction ROL.
- RotateRight(uint, int)
Rotates the specified value right by the specified number of bits. Similar in behavior to the x86 instruction ROR.
- RotateRight(ulong, int)
Rotates the specified value right by the specified number of bits. Similar in behavior to the x86 instruction ROR.
- RotateRight(nuint, int)
Rotates the specified value right by the specified number of bits. Similar in behavior to the x86 instruction ROR.
- RoundUpToPowerOf2(UInt128)
Round the given integral value up to a power of 2.
- RoundUpToPowerOf2(uint)
Round the given integral value up to a power of 2.
- RoundUpToPowerOf2(ulong)
Round the given integral value up to a power of 2.
- RoundUpToPowerOf2(nuint)
Round the given integral value up to a power of 2.
- RoundUpToPowerOf2(ExUInt128)
Round the given integral value up to a power of 2.
- TrailingZeroCount(Int128)
Count the number of trailing zero bits in an integer value. Similar in behavior to the x86 instruction TZCNT.
- TrailingZeroCount(int)
Count the number of trailing zero bits in an integer value. Similar in behavior to the x86 instruction TZCNT.
- TrailingZeroCount(long)
Count the number of trailing zero bits in a mask. Similar in behavior to the x86 instruction TZCNT.
- TrailingZeroCount(nint)
Count the number of trailing zero bits in a mask. Similar in behavior to the x86 instruction TZCNT.
- TrailingZeroCount(UInt128)
Count the number of trailing zero bits in an integer value. Similar in behavior to the x86 instruction TZCNT.
- TrailingZeroCount(uint)
Count the number of trailing zero bits in an integer value. Similar in behavior to the x86 instruction TZCNT.
- TrailingZeroCount(ulong)
Count the number of trailing zero bits in a mask. Similar in behavior to the x86 instruction TZCNT.
- TrailingZeroCount(nuint)
Count the number of trailing zero bits in a mask. Similar in behavior to the x86 instruction TZCNT.
- TrailingZeroCount(ExInt128)
Count the number of trailing zero bits in an integer value. Similar in behavior to the x86 instruction TZCNT.
- TrailingZeroCount(ExUInt128)
Count the number of trailing zero bits in an integer value. Similar in behavior to the x86 instruction TZCNT.