Muokkaa

Jaa


BitOperations Class

Definition

Provides utility methods for intrinsic bit-twiddling operations. The methods use hardware intrinsics when available on the underlying platform; otherwise, they use optimized software fallbacks.

public ref class BitOperations abstract sealed
public static class BitOperations
type BitOperations = class
Public Class BitOperations
Inheritance
BitOperations

Methods

Crc32C(UInt32, Byte)

Accumulates the CRC (Cyclic redundancy check) checksum.

Crc32C(UInt32, UInt16)

Accumulates the CRC (Cyclic redundancy check) checksum.

Crc32C(UInt32, UInt32)

Accumulates the CRC (Cyclic redundancy check) checksum.

Crc32C(UInt32, UInt64)

Accumulates the CRC (Cyclic redundancy check) checksum.

IsPow2(Int32)

Evaluates whether the specified Int32 value is a power of two.

IsPow2(Int64)

Evaluates whether the specified Int64 value is a power of two.

IsPow2(IntPtr)

Determines whether the specified integral value is a power of 2.

IsPow2(UInt32)

Evaluates whether the specified UInt32 value is a power of two.

IsPow2(UInt64)

Evaluates whether the specified UInt64 value is a power of two.

IsPow2(UIntPtr)

Determines whether the specified integral value is a power of 2.

LeadingZeroCount(UInt32)

Counts the number of leading zero bits in an unsigned 32-bit integer mask.

LeadingZeroCount(UInt64)

Counts the number of leading zero bits in an unsigned 64-bit integer mask.

LeadingZeroCount(UIntPtr)

Counts the number of leading zero bits in a mask. Similar in behavior to the x86 instruction LZCNT.

Log2(UInt32)

Returns the integer (floor) log of the specified value, base 2.

Log2(UInt64)

Returns the integer (floor) log of the specified value, base 2.

Log2(UIntPtr)

Returns the integer (floor) log of the specified value, base 2.

PopCount(UInt32)

Returns the population count (number of bits set) of a mask.

PopCount(UInt64)

Returns the population count (number of bits set) of an unsigned 64-bit integer mask.

PopCount(UIntPtr)

Returns the population count (number of bits set) of a mask. Similar in behavior to the x86 instruction POPCNT.

RotateLeft(UInt32, Int32)

Rotates the specified value left by the specified number of bits.

RotateLeft(UInt64, Int32)

Rotates the specified value left by the specified number of bits.

RotateLeft(UIntPtr, Int32)

Rotates the specified value left by the specified number of bits. Similar in behavior to the x86 instruction ROL.

RotateRight(UInt32, Int32)

Rotates the specified value right by the specified number of bits.

RotateRight(UInt64, Int32)

Rotates the specified value right by the specified number of bits.

RotateRight(UIntPtr, Int32)

Rotates the specified value right by the specified number of bits. Similar in behavior to the x86 instruction ROR.

RoundUpToPowerOf2(UInt32)

Rounds the specified UInt32 value up to a power of two.

RoundUpToPowerOf2(UInt64)

Rounds the specified UInt64 value up to a power of two.

RoundUpToPowerOf2(UIntPtr)

Rounds the given integral value up to a power of 2.

TrailingZeroCount(Int32)

Counts the number of trailing zero bits in an 32-bit integer value mask.

TrailingZeroCount(Int64)

Counts the number of trailing zero bits in a 64-bit integer value mask.

TrailingZeroCount(IntPtr)

Counts the number of trailing zero bits in a mask. Similar in behavior to the x86 instruction TZCNT.

TrailingZeroCount(UInt32)

Counts the number of trailing zero bits in an unsigned 32-bit integer value mask.

TrailingZeroCount(UInt64)

Count the number of trailing zero bits in an unsigned 64-bit integer value mask.

TrailingZeroCount(UIntPtr)

Counts the number of trailing zero bits in a mask. Similar in behavior to the x86 instruction TZCNT.

Applies to