Table of Contents

Class BaseDeviceBuffer<T>

Namespace
DotCompute.Memory
Assembly
DotCompute.Memory.dll

Base class for device-specific memory buffers (GPU memory).

public abstract class BaseDeviceBuffer<T> : BaseMemoryBuffer<T>, IUnifiedMemoryBuffer<T>, IUnifiedMemoryBuffer, IAsyncDisposable, IDisposable where T : unmanaged

Type Parameters

T
Inheritance
BaseDeviceBuffer<T>
Implements
Inherited Members
Extension Methods

Constructors

BaseDeviceBuffer(long, nint)

Initializes a new instance of the BaseDeviceBuffer<T> class.

protected BaseDeviceBuffer(long sizeInBytes, nint devicePointer)

Parameters

sizeInBytes long
devicePointer nint

Properties

DevicePointer

public override nint DevicePointer { get; }

Property Value

nint

IsDisposed

Gets whether the buffer has been disposed.

public override bool IsDisposed { get; }

Property Value

bool

MemoryType

public override MemoryType MemoryType { get; }

Property Value

MemoryType

Methods

MarkDisposed()

Marks the buffer as disposed.

protected bool MarkDisposed()

Returns

bool