Class BinaryTransformations
Provides various binary transformations.
Inherited Members
Namespace: DotNext.Buffers.Binary
Assembly: DotNext.dll
Syntax
public static class BinaryTransformations
Methods
| Edit this page View SourceAndNot<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 |
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 |
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 |
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 |
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. |
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. |