Struct CudaStream
- Namespace
- DotCompute.Backends.CUDA.Types
- Assembly
- DotCompute.Backends.CUDA.dll
Represents a CUDA stream for asynchronous operations.
public struct CudaStream : IEquatable<CudaStream>
- Implements
- Inherited Members
Remarks
Initializes a new instance of the CudaStream struct.
Constructors
CudaStream(nint)
Represents a CUDA stream for asynchronous operations.
public CudaStream(nint handle)
Parameters
handlenintThe stream handle.
Remarks
Initializes a new instance of the CudaStream struct.
Properties
Default
Gets the default CUDA stream.
public static CudaStream Default { get; }
Property Value
Handle
Gets the stream handle.
public readonly nint Handle { get; }
Property Value
IsDefault
Gets a value indicating whether this is the default stream.
public bool IsDefault { get; }
Property Value
Methods
CreateNonBlocking()
Creates a new non-blocking stream.
public static CudaStream CreateNonBlocking()
Returns
- CudaStream
A new CUDA stream.
Equals(CudaStream)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(CudaStream other)
Parameters
otherCudaStreamAn object to compare with this object.
Returns
Equals(object?)
Indicates whether this instance and a specified object are equal.
public override bool Equals(object? obj)
Parameters
objobjectThe object to compare with the current instance.
Returns
- bool
true if
objand this instance are the same type and represent the same value; otherwise, false.
GetHashCode()
Returns the hash code for this instance.
public override int GetHashCode()
Returns
- int
A 32-bit signed integer that is the hash code for this instance.
ToString()
Returns the fully qualified type name of this instance.
public override string ToString()
Returns
- string
The fully qualified type name.
Operators
operator ==(CudaStream, CudaStream)
Determines whether two CudaStream instances are equal.
public static bool operator ==(CudaStream left, CudaStream right)
Parameters
leftCudaStreamrightCudaStream
Returns
operator !=(CudaStream, CudaStream)
Determines whether two CudaStream instances are not equal.
public static bool operator !=(CudaStream left, CudaStream right)
Parameters
leftCudaStreamrightCudaStream