Show / Hide Table of Contents

Class BinaryTransformations

Provides various binary transformations.

Inheritance
object
BinaryTransformations
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: DotNext.Buffers.Binary
Assembly: DotNext.dll
Syntax
public static class BinaryTransformations

Methods

| Edit this page View Source

AndNot<T>(ReadOnlySpan<T>, Span<T>)

Performs bitwise AND-NOT operation between two vectors in-place.

Declaration
public static void AndNot<T>(this ReadOnlySpan<T> x, Span<T> y) where T : unmanaged
Parameters
Type Name Description
ReadOnlySpan<T> x

The first vector.

Span<T> y

The second vector. It will be replaced with a result of operation.

Type Parameters
Name Description
T

The type of elements in vector.

Exceptions
Type Condition
ArgumentOutOfRangeException

The length of x is not equal to y.

| Edit this page View Source

BitwiseAnd<T>(ReadOnlySpan<T>, Span<T>)

Performs bitwise AND operation between two vectors in-place.

Declaration
public static void BitwiseAnd<T>(this ReadOnlySpan<T> x, Span<T> y) where T : unmanaged
Parameters
Type Name Description
ReadOnlySpan<T> x

The first vector.

Span<T> y

The second vector. It will be replaced with a result of operation.

Type Parameters
Name Description
T

The type of elements in vector.

Exceptions
Type Condition
ArgumentOutOfRangeException

The length of x is not equal to y.

| Edit this page View Source

BitwiseOr<T>(ReadOnlySpan<T>, Span<T>)

Performs bitwise OR operation between two vectors in-place.

Declaration
public static void BitwiseOr<T>(this ReadOnlySpan<T> x, Span<T> y) where T : unmanaged
Parameters
Type Name Description
ReadOnlySpan<T> x

The first vector.

Span<T> y

The second vector. It will be replaced with a result of operation.

Type Parameters
Name Description
T

The type of elements in vector.

Exceptions
Type Condition
ArgumentOutOfRangeException

The length of x is not equal to y.

| Edit this page View Source

BitwiseXor<T>(ReadOnlySpan<T>, Span<T>)

Performs bitwise XOR operation between two vectors in-place.

Declaration
public static void BitwiseXor<T>(this ReadOnlySpan<T> x, Span<T> y) where T : unmanaged
Parameters
Type Name Description
ReadOnlySpan<T> x

The first vector.

Span<T> y

The second vector. It will be replaced with a result of operation.

Type Parameters
Name Description
T

The type of elements in vector.

Exceptions
Type Condition
ArgumentOutOfRangeException

The length of x is not equal to y.

| Edit this page View Source

OnesComplement<T>(Span<T>)

Inverts all bits within the provided vector in-place.

Declaration
public static void OnesComplement<T>(this Span<T> values) where T : unmanaged
Parameters
Type Name Description
Span<T> values

The vector to modify.

Type Parameters
Name Description
T

The type of elements in vector.

| Edit this page View Source

Reverse<T>(ref T)

Reverse bytes in the specified value of blittable type.

Declaration
public static void Reverse<T>(ref T value) where T : unmanaged
Parameters
Type Name Description
T value

The value which bytes should be reversed.

Type Parameters
Name Description
T

Blittable type.

  • Edit this page
  • View Source
☀
☾
In this article
Back to top
Supported by the .NET Foundation
☀
☾