Struct P2PBatchReceiveResult<T>
- Namespace
- DotCompute.Abstractions.Messaging
- Assembly
- DotCompute.Abstractions.dll
Result of a P2P batch receive operation.
public readonly struct P2PBatchReceiveResult<T> where T : unmanaged
Type Parameters
TThe message type.
- Inherited Members
Properties
Count
Gets the number of messages received.
public int Count { get; }
Property Value
ErrorMessage
Gets the error message if the receive failed.
public string? ErrorMessage { get; init; }
Property Value
LatencyMicroseconds
Gets the receive latency in microseconds.
public double LatencyMicroseconds { get; init; }
Property Value
Messages
Gets the received messages.
public required ReadOnlyMemory<T> Messages { get; init; }
Property Value
Methods
Empty()
Creates an empty result.
public static P2PBatchReceiveResult<T> Empty()
Returns
Failure(string)
Creates a failed result.
public static P2PBatchReceiveResult<T> Failure(string errorMessage)
Parameters
errorMessagestring
Returns
WithMessages(ReadOnlyMemory<T>, double)
Creates a result with messages.
public static P2PBatchReceiveResult<T> WithMessages(ReadOnlyMemory<T> messages, double latencyUs)
Parameters
messagesReadOnlyMemory<T>latencyUsdouble