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
handlenintThe native handle value.
Fields
Handle
Gets the underlying native handle.
public readonly nint Handle
Field Value
Methods
FromIntPtr(nint)
Creates a device ID from an IntPtr.
public static OpenCLDeviceId FromIntPtr(nint handle)
Parameters
handlenint
Returns
ToIntPtr(OpenCLDeviceId)
Converts a device ID to an IntPtr.
public static nint ToIntPtr(OpenCLDeviceId deviceId)
Parameters
deviceIdOpenCLDeviceId
Returns
ToString()
Returns a string representation of the device ID.
public override string ToString()
Returns
Operators
implicit operator nint(OpenCLDeviceId)
Implicitly converts a device ID to an IntPtr.
public static implicit operator nint(OpenCLDeviceId deviceId)
Parameters
deviceIdOpenCLDeviceId
Returns
implicit operator OpenCLDeviceId(nint)
Implicitly converts an IntPtr to a device ID.
public static implicit operator OpenCLDeviceId(nint handle)
Parameters
handlenint