Table of Contents

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

handle nint

The native handle value.

Fields

Handle

Gets the underlying native handle.

public readonly nint Handle

Field Value

nint

Methods

FromIntPtr(nint)

Creates a context handle from an IntPtr.

public static OpenCLContextHandle FromIntPtr(nint handle)

Parameters

handle nint

Returns

OpenCLContextHandle

ToIntPtr(OpenCLContextHandle)

Converts a context handle to an IntPtr.

public static nint ToIntPtr(OpenCLContextHandle context)

Parameters

context OpenCLContextHandle

Returns

nint

ToString()

Returns a string representation of the context handle.

public override string ToString()

Returns

string

Operators

implicit operator nint(OpenCLContextHandle)

Implicitly converts a context handle to an IntPtr.

public static implicit operator nint(OpenCLContextHandle context)

Parameters

context OpenCLContextHandle

Returns

nint

implicit operator OpenCLContextHandle(nint)

Implicitly converts an IntPtr to a context handle.

public static implicit operator OpenCLContextHandle(nint handle)

Parameters

handle nint

Returns

OpenCLContextHandle