Table of Contents

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

int

Generation

Current generation counter.

public int Generation { get; init; }

Property Value

int

IsComplete

Indicates whether all participants have arrived.

public bool IsComplete { get; }

Property Value

bool

Mode

Synchronization mode being used.

public CrossGpuBarrierMode Mode { get; init; }

Property Value

CrossGpuBarrierMode

TotalCount

Total number of participants required.

public int TotalCount { get; init; }

Property Value

int

Methods

Equals(CrossGpuBarrierStatus)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(CrossGpuBarrierStatus other)

Parameters

other CrossGpuBarrierStatus

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.

Operators

operator ==(CrossGpuBarrierStatus, CrossGpuBarrierStatus)

Determines whether two CrossGpuBarrierStatus instances are equal.

public static bool operator ==(CrossGpuBarrierStatus left, CrossGpuBarrierStatus right)

Parameters

left CrossGpuBarrierStatus
right CrossGpuBarrierStatus

Returns

bool

operator !=(CrossGpuBarrierStatus, CrossGpuBarrierStatus)

Determines whether two CrossGpuBarrierStatus instances are not equal.

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

Parameters

left CrossGpuBarrierStatus
right CrossGpuBarrierStatus

Returns

bool