[ILNumerics Core Module]
Assembly: ILNumerics.Core (in ILNumerics.Core.dll) Version: 184.108.40.206 (5.5.7503.3146)
public virtual IntPtr GetHostPointerForRead( Nullable<StorageOrders> order = null )
Public Overridable Function GetHostPointerForRead ( Optional order As Nullable(Of StorageOrders) = Nothing ) As IntPtr Dim instance As ConcreteArray Dim order As Nullable(Of StorageOrders) Dim returnValue As IntPtr returnValue = instance.GetHostPointerForRead(order)
- order (Optional)
- Type: StorageOrders
[Optional] Ensures that the array is in a specific storage layout before acquiring the pointer. Default: (null) don't change the storage layout.
Pointer to the first element of this array.
|if called on a return type array or if the elements are not of a.|
Do not use this pointer for modifying the value of an element of this array! This pointer is for read purposes only!
For empty arrays A (where A.IsEmpty is true) the value of the pointer returned is undefined.
This pointer is valid only as long as this array is not modified or released! Do not attempt to use this pointer after the array has been released, ran out of the current scope (meaning the current function scope as well as Enter(BaseArray, NullableArrayStyles)), or is modified!
The order of elements in this array is determined by the size descriptor Size. Use the strides, dimension lengths and the size of the T1 elements (SizeOfT) in order to compute the byte offset to individual elements relative to this pointer.
The memory region addressed by the pointer returned exists on the unmanaged heap. Hence, it does not need to be pinned and will not be moved by the GC. However, this memory is subject of deterministic disposal, pooling and frequent reuse by other arrays. Do not use the pointer returned after this array left the current function scope, was modified, reassigned or released!
When order is not null the storage order of the array is modified according to order. Valid values for order are RowMajor, ColumnMajor, and null. The order parameter can be convenient in order to access elements of non-continous array layouts. Instead of computing the address of individual elements (GetSeqIndex(Int64, Int64, Int64, Int64), or GetStride(UInt32)) the array can be brought into a continous storage layout before acquiring the pointer. Afterwards, elements can be accessed sequentially in memory, with unity strides. The price is the rearranging of the whole storage which commonly requires a copy of all elements.
[ILNumerics Core Module]