Table of Contents

Struct CrossGpuBarrierResult

Namespace
DotCompute.Abstractions.Barriers
Assembly
DotCompute.Abstractions.dll

Result of barrier synchronization operation.

public readonly struct CrossGpuBarrierResult : IEquatable<CrossGpuBarrierResult>
Implements
Inherited Members

Properties

ArrivalTimestamps

HLC timestamps of each participant's arrival. Indexed by GPU ID (0-based).

[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[]

ErrorMessage

Error message if barrier failed (null if successful).

public string? ErrorMessage { get; init; }

Property Value

string

ReleaseTimestamp

Release timestamp (max HLC of all participant arrivals). Provides total ordering for post-barrier operations.

public HlcTimestamp ReleaseTimestamp { get; init; }

Property Value

HlcTimestamp

Success

Indicates whether the barrier completed successfully.

public bool Success { get; init; }

Property Value

bool

WaitTime

Total time spent waiting at the barrier.

public TimeSpan WaitTime { get; init; }

Property Value

TimeSpan

Methods

Equals(CrossGpuBarrierResult)

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

public bool Equals(CrossGpuBarrierResult other)

Parameters

other CrossGpuBarrierResult

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 ==(CrossGpuBarrierResult, CrossGpuBarrierResult)

Determines whether two CrossGpuBarrierResult instances are equal.

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

Parameters

left CrossGpuBarrierResult
right CrossGpuBarrierResult

Returns

bool

operator !=(CrossGpuBarrierResult, CrossGpuBarrierResult)

Determines whether two CrossGpuBarrierResult instances are not equal.

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

Parameters

left CrossGpuBarrierResult
right CrossGpuBarrierResult

Returns

bool