ILNumerics Ultimate VS

ManagedHostHandle<T> Class

ILNumerics Ultimate VS Documentation
ILNumerics - Technical Application Development
A handle for managed reference type arrays. This class enables one to handle /store managed arrays with the same API as unmanaged memory.

[ILNumerics Core Module]

Inheritance Hierarchy

System.Object
  System.Runtime.ConstrainedExecution.CriticalFinalizerObject
    System.Runtime.InteropServices.CriticalHandle
      ILNumerics.Core.MemoryLayer.MemoryHandle
        ILNumerics.Core.MemoryLayer.ManagedHostHandle<T>

Namespace:  ILNumerics.Core.MemoryLayer
Assembly:  ILNumerics.Core (in ILNumerics.Core.dll) Version: 5.5.0.0 (5.5.7503.3146)
Syntax

public sealed class ManagedHostHandle<T> : MemoryHandle

Type Parameters

T
The type of references hold in the internal HostArray.

The ManagedHostHandle<T> type exposes the following members.

Constructors

  NameDescription
Public methodManagedHostHandle<T>(T[])
Create a managed host handle based on an existing managed Array.

[ILNumerics Core Module]

Public methodManagedHostHandle<T>(UIntPtr, Boolean)
Create a new managed memory handle on the host, capable of storing length of type T.

[ILNumerics Core Module]

Top
Properties

  NameDescription
Public propertyIsInvalid
Determine if this handle is a valid handle. Returns false, preventing from finalization.

[ILNumerics Core Module]

(Overrides MemoryHandle.IsInvalid.)
Public propertyLength
Number of bytes referenced by this handle.

[ILNumerics Core Module]

(Inherited from MemoryHandle.)
Public propertyPointer
Acquire a pointer to the first element of the HostArray.

[ILNumerics Core Module]

(Overrides MemoryHandle.Pointer.)
Top
Methods

  NameDescription
Public methodClear (Overrides MemoryHandle.Clear().)
Public methodClone (Overrides MemoryHandle.Clone().)
Public methodCopyTo
Copy elements.

[ILNumerics Core Module]

(Overrides MemoryHandle.CopyTo(UInt32, MemoryHandle, UInt32, UInt64, IntPtr).)
Public methodGetHashCode (Inherited from MemoryHandle.)
Public methodSet (Overrides MemoryHandle.Set(MemoryHandle, UInt64, UInt64, UInt32).)
Top
Remarks

Since most computational arrays in ILNumerics host struct (value type) elements, managed heap memory is rarely used. One important example is are cell arrays, which hold reference types as elements. These element arrays are allocated on the managed heap by use of ManagedHostHandle<T>.

[ILNumerics Core Module]

See Also

Reference