Class P2PTransferScheduler
- Namespace
- DotCompute.Core.Memory
- Assembly
- DotCompute.Core.dll
Advanced P2P transfer scheduler that optimizes bandwidth usage and coordinates transfers. Implements bandwidth-optimal scheduling, concurrent transfer management, and synchronization.
public sealed class P2PTransferScheduler : IAsyncDisposable
- Inheritance
-
P2PTransferScheduler
- Implements
- Inherited Members
Constructors
P2PTransferScheduler(ILogger)
Initializes a new instance of the P2PTransferScheduler class.
public P2PTransferScheduler(ILogger logger)
Parameters
loggerILoggerThe logger.
Properties
PendingTransferCount
Gets the number of pending transfers.
public int PendingTransferCount { get; }
Property Value
Methods
DisposeAsync()
Gets dispose asynchronously.
public ValueTask DisposeAsync()
Returns
- ValueTask
The result of the operation.
GetStatistics()
Gets comprehensive transfer statistics.
public TransferStatistics GetStatistics()
Returns
ScheduleP2PTransferAsync<T>(IUnifiedMemoryBuffer<T>, IUnifiedMemoryBuffer<T>, int, int, int, TransferStrategy, CancellationToken)
Schedules a P2P-optimized transfer with bandwidth management.
public ValueTask ScheduleP2PTransferAsync<T>(IUnifiedMemoryBuffer<T> sourceBuffer, IUnifiedMemoryBuffer<T> targetBuffer, int sourceOffset, int targetOffset, int elementCount, TransferStrategy strategy, CancellationToken cancellationToken = default) where T : unmanaged
Parameters
sourceBufferIUnifiedMemoryBuffer<T>targetBufferIUnifiedMemoryBuffer<T>sourceOffsetinttargetOffsetintelementCountintstrategyTransferStrategycancellationTokenCancellationToken
Returns
Type Parameters
T
WaitForDeviceTransfersAsync(string, CancellationToken)
Waits for all pending transfers to a specific device to complete.
public ValueTask WaitForDeviceTransfersAsync(string deviceId, CancellationToken cancellationToken)
Parameters
deviceIdstringcancellationTokenCancellationToken