Struct OpenCLContextHandle
- Namespace
- DotCompute.Backends.OpenCL.Types.Native
- Assembly
- DotCompute.Backends.OpenCL.dll
OpenCL context handle.
public readonly struct OpenCLContextHandle
- Inherited Members
Constructors
OpenCLContextHandle(nint)
Initializes a new instance of the OpenCLContextHandle struct.
public OpenCLContextHandle(nint handle)
Parameters
handlenintThe native handle value.
Fields
Handle
Gets the underlying native handle.
public readonly nint Handle
Field Value
Methods
FromIntPtr(nint)
Creates a context handle from an IntPtr.
public static OpenCLContextHandle FromIntPtr(nint handle)
Parameters
handlenint
Returns
ToIntPtr(OpenCLContextHandle)
Converts a context handle to an IntPtr.
public static nint ToIntPtr(OpenCLContextHandle context)
Parameters
contextOpenCLContextHandle
Returns
ToString()
Returns a string representation of the context handle.
public override string ToString()
Returns
Operators
implicit operator nint(OpenCLContextHandle)
Implicitly converts a context handle to an IntPtr.
public static implicit operator nint(OpenCLContextHandle context)
Parameters
contextOpenCLContextHandle
Returns
implicit operator OpenCLContextHandle(nint)
Implicitly converts an IntPtr to a context handle.
public static implicit operator OpenCLContextHandle(nint handle)
Parameters
handlenint