Table of Contents

Struct OpenCLDeviceId

Namespace
DotCompute.Backends.OpenCL.Types.Native
Assembly
DotCompute.Backends.OpenCL.dll

OpenCL device ID handle.

public readonly struct OpenCLDeviceId
Inherited Members

Constructors

OpenCLDeviceId(nint)

Initializes a new instance of the OpenCLDeviceId struct.

public OpenCLDeviceId(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 device ID from an IntPtr.

public static OpenCLDeviceId FromIntPtr(nint handle)

Parameters

handle nint

Returns

OpenCLDeviceId

ToIntPtr(OpenCLDeviceId)

Converts a device ID to an IntPtr.

public static nint ToIntPtr(OpenCLDeviceId deviceId)

Parameters

deviceId OpenCLDeviceId

Returns

nint

ToString()

Returns a string representation of the device ID.

public override string ToString()

Returns

string

Operators

implicit operator nint(OpenCLDeviceId)

Implicitly converts a device ID to an IntPtr.

public static implicit operator nint(OpenCLDeviceId deviceId)

Parameters

deviceId OpenCLDeviceId

Returns

nint

implicit operator OpenCLDeviceId(nint)

Implicitly converts an IntPtr to a device ID.

public static implicit operator OpenCLDeviceId(nint handle)

Parameters

handle nint

Returns

OpenCLDeviceId