Interface IGpuMemory<T>
- Namespace
- Orleans.GpuBridge.Abstractions.Memory
- Assembly
- Orleans.GpuBridge.Abstractions.dll
Represents GPU memory allocation
public interface IGpuMemory<T> : IDisposable where T : unmanaged
Type Parameters
T
- Inherited Members
Properties
DeviceIndex
Gets the device index this memory is allocated on
int DeviceIndex { get; }
Property Value
IsResident
Gets whether this memory is currently on the device
bool IsResident { get; }
Property Value
Length
Gets the number of elements in the memory
int Length { get; }
Property Value
SizeInBytes
Gets the size in bytes
long SizeInBytes { get; }
Property Value
Methods
AsMemory()
Gets memory as a span for CPU access
Memory<T> AsMemory()
Returns
- Memory<T>
CopyFromDeviceAsync(CancellationToken)
Copies data from device to CPU
ValueTask CopyFromDeviceAsync(CancellationToken ct = default)
Parameters
Returns
CopyToDeviceAsync(CancellationToken)
Copies data from CPU to device
ValueTask CopyToDeviceAsync(CancellationToken ct = default)