Struct OpenCLEventHandle
- Namespace
- DotCompute.Backends.OpenCL.Types.Native
- Assembly
- DotCompute.Backends.OpenCL.dll
OpenCL event handle.
public readonly struct OpenCLEventHandle : IEquatable<OpenCLEventHandle>
- Implements
- Inherited Members
Constructors
OpenCLEventHandle(nint)
Initializes a new instance of the OpenCLEventHandle struct.
public OpenCLEventHandle(nint handle)
Parameters
handlenintThe native handle value.
Fields
Handle
Gets the underlying native handle.
public readonly nint Handle
Field Value
Methods
Equals(OpenCLEventHandle)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(OpenCLEventHandle other)
Parameters
otherOpenCLEventHandleAn object to compare with this object.
Returns
- bool
true if the current object is equal to the other parameter; otherwise, false.
Equals(object?)
Determines whether the specified object is equal to the current object.
public override bool Equals(object? obj)
Parameters
objobjectThe object to compare with the current object.
Returns
- bool
true if the specified object is equal to the current object; otherwise, false.
FromIntPtr(nint)
Creates an event handle from an IntPtr.
public static OpenCLEventHandle FromIntPtr(nint handle)
Parameters
handlenint
Returns
GetHashCode()
Returns the hash code for this instance.
public override int GetHashCode()
Returns
- int
A 32-bit signed integer hash code.
ToIntPtr(OpenCLEventHandle)
Converts an event handle to an IntPtr.
public static nint ToIntPtr(OpenCLEventHandle evt)
Parameters
Returns
ToString()
Returns a string representation of the event handle.
public override string ToString()
Returns
Operators
operator ==(OpenCLEventHandle, OpenCLEventHandle)
Indicates whether two instances are equal.
public static bool operator ==(OpenCLEventHandle left, OpenCLEventHandle right)
Parameters
leftOpenCLEventHandleThe first instance to compare.
rightOpenCLEventHandleThe second instance to compare.
Returns
- bool
true if the instances are equal; otherwise, false.
implicit operator nint(OpenCLEventHandle)
Implicitly converts an event handle to an IntPtr.
public static implicit operator nint(OpenCLEventHandle evt)
Parameters
Returns
implicit operator OpenCLEventHandle(nint)
Implicitly converts an IntPtr to an event handle.
public static implicit operator OpenCLEventHandle(nint handle)
Parameters
handlenint
Returns
operator !=(OpenCLEventHandle, OpenCLEventHandle)
Indicates whether two instances are not equal.
public static bool operator !=(OpenCLEventHandle left, OpenCLEventHandle right)
Parameters
leftOpenCLEventHandleThe first instance to compare.
rightOpenCLEventHandleThe second instance to compare.
Returns
- bool
true if the instances are not equal; otherwise, false.