Struct CrossGpuBarrierStatus
- Namespace
- DotCompute.Abstractions.Barriers
- Assembly
- DotCompute.Abstractions.dll
Current status of a cross-GPU barrier.
public readonly struct CrossGpuBarrierStatus : IEquatable<CrossGpuBarrierStatus>
- Implements
- Inherited Members
Properties
ArrivalTimestamps
HLC timestamps of participants that have arrived. Sparse array indexed by GPU ID.
[SuppressMessage("Performance", "CA1819:Properties should not return arrays", Justification = "Array provides optimal performance for GPU memory transfers")]
public required HlcTimestamp?[] ArrivalTimestamps { get; init; }
Property Value
- HlcTimestamp?[]
ArrivedCount
Number of participants that have arrived so far.
public int ArrivedCount { get; init; }
Property Value
Generation
Current generation counter.
public int Generation { get; init; }
Property Value
IsComplete
Indicates whether all participants have arrived.
public bool IsComplete { get; }
Property Value
Mode
Synchronization mode being used.
public CrossGpuBarrierMode Mode { get; init; }
Property Value
TotalCount
Total number of participants required.
public int TotalCount { get; init; }
Property Value
Methods
Equals(CrossGpuBarrierStatus)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(CrossGpuBarrierStatus other)
Parameters
otherCrossGpuBarrierStatusAn 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.
Operators
operator ==(CrossGpuBarrierStatus, CrossGpuBarrierStatus)
Determines whether two CrossGpuBarrierStatus instances are equal.
public static bool operator ==(CrossGpuBarrierStatus left, CrossGpuBarrierStatus right)
Parameters
leftCrossGpuBarrierStatusrightCrossGpuBarrierStatus
Returns
operator !=(CrossGpuBarrierStatus, CrossGpuBarrierStatus)
Determines whether two CrossGpuBarrierStatus instances are not equal.
public static bool operator !=(CrossGpuBarrierStatus left, CrossGpuBarrierStatus right)
Parameters
leftCrossGpuBarrierStatusrightCrossGpuBarrierStatus