ILNumerics - Technical Application Development
Assembly: ILNumerics.Core (in ILNumerics.Core.dll) Version: 5.5.0.0 (5.5.7503.3146)
A NativeHostHandle referencing a region of main (virtual) memory sufficient to store elementCount elements of type T.
Acquire a memory handle / array from this pool or create a new one. This class allows T to be a reference type.
[ILNumerics Core Module]
Namespace: ILNumerics.Core.DeviceManagement
Assembly: ILNumerics.Core (in ILNumerics.Core.dll) Version: 5.5.0.0 (5.5.7503.3146)
Syntax
Parameters
- elementCount
- Type: SystemUInt64
Number of elements. This determins the size of the memory required. - clear (Optional)
- Type: SystemBoolean
[Optional] True: clear the element values. False: do not clear the elements (default).
Type Parameters
- T
- Type of elements which will be stored in the memory.
Return Value
Type: MemoryHandleA NativeHostHandle referencing a region of main (virtual) memory sufficient to store elementCount elements of type T.
Remarks
The HostDevice allocates arrays for ValueType elements on native process memory instead on the managed heap. Reference type elements, however, are allocated on the managed heap. Hence, the handle returned will either be a NativeHostHandle or a ManagedHostHandleT. Note, both categories of memory are managed in their own pools. In the case of ValueType elements and native storage the new memory will - if possible - be taken from the NativeHostPool pool associated with the current thread and the host device. For managed arrays the global, static, thread local pool Pool is considered.
[ILNumerics Core Module]
See Also