Table of Contents

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

handle nint

The 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

CudaStream

Handle

Gets the stream handle.

public readonly nint Handle { get; }

Property Value

nint

IsDefault

Gets a value indicating whether this is the default stream.

public bool IsDefault { get; }

Property Value

bool

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

other CudaStream

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(object?)

Indicates whether this instance and a specified object are equal.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current instance.

Returns

bool

true if obj and 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

left CudaStream
right CudaStream

Returns

bool

operator !=(CudaStream, CudaStream)

Determines whether two CudaStream instances are not equal.

public static bool operator !=(CudaStream left, CudaStream right)

Parameters

left CudaStream
right CudaStream

Returns

bool