Show / Hide Table of Contents

Class MainMemoryMarshaler

Marshaler to main memory - to be used for OMP and AVX flavors

Usage example:

\begin{lstlisting}[style=customcs]

[DllImport("{DLL name}.dll", EntryPoint = "{EntryPointName}", CallingConvention = CallingConvention.Cdecl)] private static extern int methodName ( [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(MainMemoryMarshaler))] TypeToBemarshaled param);

\end{lstlisting}

Inheritance
System.Object
AbstractNativeMarshaler
MainMemoryMarshaler
Implements
System.Runtime.InteropServices.ICustomMarshaler
Inherited Members
AbstractNativeMarshaler.cleanUpNativeData
AbstractNativeMarshaler.IsCleanUpNativeData()
AbstractNativeMarshaler.CreatingThreadId
AbstractNativeMarshaler.MarshalNativeToManaged(IntPtr)
AbstractNativeMarshaler.CleanUpNativeData(IntPtr)
AbstractNativeMarshaler.CleanUpManagedData(Object)
AbstractNativeMarshaler.GetNativeDataSize()
AbstractNativeMarshaler.NbelementsInGhost
AbstractNativeMarshaler.Free()
AbstractNativeMarshaler.RegisterDLL(String)
AbstractNativeMarshaler.IsClean()
AbstractNativeMarshaler.AutoRegister(Assembly, Type)
AbstractNativeMarshaler.GetHandleDelegate(Delegate)
AbstractNativeMarshaler.CopyToSymbol(String, IntPtr, IntPtr, IntPtr, IntPtr)
AbstractNativeMarshaler.Flavor
AbstractNativeMarshaler.SetCustomMarshaler(Type, IHybCustomMarshaler)
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Hybridizer.Runtime.CUDAImports
Assembly: Hybridizer.Runtime.CUDAImports.dll
Syntax
public class MainMemoryMarshaler : AbstractNativeMarshaler, ICustomMarshaler

Properties

Instance

current instance

Declaration
public static MainMemoryMarshaler Instance { get; set; }
Property Value
Type Description
MainMemoryMarshaler

Methods

Create(HybridizerFlavor)

Create an instance of MainMemoryMarshaler for the given flavor

Declaration
public static MainMemoryMarshaler Create(HybridizerFlavor flavor)
Parameters
Type Name Description
HybridizerFlavor flavor
Returns
Type Description
MainMemoryMarshaler

GetInstance(String)

Singleton implementation

Declaration
public static ICustomMarshaler GetInstance(string cookie)
Parameters
Type Name Description
System.String cookie
Returns
Type Description
System.Runtime.InteropServices.ICustomMarshaler

MarshalManagedToNative(Object)

Marshals Managed to Native

Declaration
public override IntPtr MarshalManagedToNative(object managedObj)
Parameters
Type Name Description
System.Object managedObj
Returns
Type Description
System.IntPtr
Overrides
AbstractNativeMarshaler.MarshalManagedToNative(Object)

Implements

System.Runtime.InteropServices.ICustomMarshaler
Back to top Generated by DocFX