Auki::ConjureKit::Manna::BitwiseNativeArrayView
NativeArray View interface constrained to read-only operation, which indexes single bits in the array. This tool allows to pass a span of any existing NativeArray of bits without need of copying.
Inherits from IEnumerable, IEnumerable< bool >, IReadOnlyList< bool >
Public Classes
Name | |
---|---|
struct | Enumerator Enumerator for iterating over the bits in the BitwiseNativeArrayView.. |
Public Functions
Name | |
---|---|
BitwiseNativeArrayView(NativeArray< uint > buffer, int startIndexInBits, int lengthInBits) Initializes a new instance of the BitwiseNativeArrayView structure, which provides read-only access to individual bits in a NativeArray of uint values. | |
bool[] | ToBoolArray() Converts the view to a boolean array. This involves a new array being created. |
BitwiseNativeArrayView.Enumerator | GetEnumerator() Provides an enumerator for iterating over the bits in the BitwiseNativeArrayView. |
IEnumerator< bool > IEnumerable< bool >. | GetEnumerator() |
IEnumerator IEnumerable. | GetEnumerator() |
Public Properties
Name | |
---|---|
int | Count Gets the total number of bits in the view. |
int | Length Gets the total number of bits in the view. |
unsafe bool | this[int index] Gets the value of the bit at the specified index. |
unsafe bool | IsCreated Gets a value indicating whether the BitwiseNativeArrayView is created. |
Public Functions Documentation
function BitwiseNativeArrayView
BitwiseNativeArrayView(
NativeArray< uint > buffer,
int startIndexInBits,
int lengthInBits
)
Initializes a new instance of the BitwiseNativeArrayView structure, which provides read-only access to individual bits in a NativeArray of uint values.
Parameters:
- buffer The NativeArray of uint values containing the bits to be viewed.
- startIndexInBits The starting bit index within the NativeArray to begin the view.
- lengthInBits The length, in bits, of the view. The view is constrained to this length, but may be shorter than the provided NativeArray.
function ToBoolArray
bool[] ToBoolArray()
Converts the view to a boolean array. This involves a new array being created.
Return: An array of boolean values corresponding to the bits in the view.
function GetEnumerator
BitwiseNativeArrayView.Enumerator GetEnumerator()
Provides an enumerator for iterating over the bits in the BitwiseNativeArrayView.
function GetEnumerator
IEnumerator< bool > IEnumerable< bool >. GetEnumerator()
function GetEnumerator
IEnumerator IEnumerable. GetEnumerator()
Public Property Documentation
property Count
int Count;
Gets the total number of bits in the view.
property Length
int Length;
Gets the total number of bits in the view.
property this[int index]
unsafe bool this[int index];
Gets the value of the bit at the specified index.
Parameters:
- index The index of the bit to retrieve.
Return: The value of the bit at the specified index.
property IsCreated
unsafe bool IsCreated;
Gets a value indicating whether the BitwiseNativeArrayView is created.