ILNumerics Ultimate VSNativeHostHandle ClassILNumerics Ultimate VS Documentation
ILNumerics - Technical Application Development
Handle representing unmanaged host memory in a robust (self-disposing) way. Aligned in certain cases.

[ILNumerics Core Module]

Inheritance Hierarchy

SystemObject
  System.Runtime.ConstrainedExecutionCriticalFinalizerObject
    System.Runtime.InteropServicesCriticalHandle
      ILNumerics.Core.MemoryLayerMemoryHandle
        ILNumerics.Core.MemoryLayerNativeHostHandle

Namespace: ILNumerics.Core.MemoryLayer
Assembly: ILNumerics.Core (in ILNumerics.Core.dll) Version: 5.3.0.0 (5.3.7131.2749)
Syntax

public sealed class NativeHostHandle : MemoryHandle

The NativeHostHandle type exposes the following members.

Constructors

  NameDescription
Public methodNativeHostHandle
Create a new host memory handle. This will be used by P/Invoke methods having NativeHostHandle as return type.

[ILNumerics Core Module]

Top
Properties

  NameDescription
Public propertyHandle
The address originally provided by the OS in result of the memory allocation request. This address is not aligned and must be kept unchanged for freeing the handle later.

[ILNumerics Core Module]

Public propertyIsInvalid
Determine if this handle is a valid handle.

[ILNumerics Core Module]

(Inherited from MemoryHandle.)
Public propertyLength
Number of bytes referenced by this handle.

[ILNumerics Core Module]

(Inherited from MemoryHandle.)
Public propertyPointer
Address of the payload memory region for this handle. This respects alignment requirements and is different to Handle which points to the beginning of the memory region originally allocated from the OS.

[ILNumerics Core Module]

(Overrides MemoryHandlePointer.)
Top
Methods

  NameDescription
Public methodClear (Overrides MemoryHandleClear.)
Public methodClone (Overrides MemoryHandleClone.)
Public methodCopyTo
Copy memory.

[ILNumerics Core Module]

(Inherited from MemoryHandle.)
Public methodGetHashCode (Inherited from MemoryHandle.)
Public methodSet (Inherited from MemoryHandle.)
Top
Fields

  NameDescription
Public fieldReadyEvent
If not Zero this event can be used to wait for operations finishing writing to this buffer.
(Inherited from MemoryHandle.)
Top
Remarks

The pointer to native memory wrapped inside this handle will be acquired from the unmanaged heap. For performance reason the acquiring class / method is responsible for initializing new handles with required data: Length and Pointer.

In case of NativeHostPoolPointer will present the lowest address within the allocated memory region which fulfills the alignment and length requirements of Intel's OpenCL buffer sharing (CPU / Integrated GPU). See: MEMORY_ALIGNMENT_BYTES which determines the needed alignment (4K). The length of the buffer

Note, that alignment for NativeHostHandle is only guaranteed for handles pointing to memory regions larger than MEMORY_ALIGNMENT_BYTES.

[ILNumerics Core Module]

See Also

Reference