Class BasePinnedBuffer<T>
- Namespace
- DotCompute.Memory
- Assembly
- DotCompute.Memory.dll
Base class for pinned memory buffers (CPU memory pinned for GPU access).
public abstract class BasePinnedBuffer<T> : BaseMemoryBuffer<T>, IUnifiedMemoryBuffer<T>, IUnifiedMemoryBuffer, IAsyncDisposable, IDisposable where T : unmanaged
Type Parameters
T
- Inheritance
-
BasePinnedBuffer<T>
- Implements
- Inherited Members
- Extension Methods
Constructors
BasePinnedBuffer(T[])
Initializes a new instance of the BasePinnedBuffer<T> class.
protected BasePinnedBuffer(T[] array)
Parameters
arrayT[]
Properties
DevicePointer
public override nint DevicePointer { get; }
Property Value
IsDisposed
Gets whether the buffer has been disposed.
public override bool IsDisposed { get; }
Property Value
MemoryType
public override MemoryType MemoryType { get; }
Property Value
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public override void Dispose()
DisposeAsync()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources asynchronously.
public override ValueTask DisposeAsync()
Returns
- ValueTask
A task that represents the asynchronous dispose operation.