Table of Contents

Interface IComputeBuffer<T>

Namespace
Orleans.GpuBridge.Runtime.BackendProviders.Interfaces
Assembly
Orleans.GpuBridge.Runtime.dll

Compute buffer interface for GPU memory management.

public interface IComputeBuffer<T> : IDisposable where T : unmanaged

Type Parameters

T

The unmanaged element type stored in the buffer.

Inherited Members

Properties

Size

Gets the number of elements in the buffer.

int Size { get; }

Property Value

int

Usage

Gets the intended usage pattern for this buffer.

BufferUsage Usage { get; }

Property Value

BufferUsage

Methods

CopyTo(IComputeBuffer<T>)

Copies the contents of this buffer to another compute buffer.

void CopyTo(IComputeBuffer<T> destination)

Parameters

destination IComputeBuffer<T>

The target buffer to copy data to.

Read(Span<T>)

Reads data from the compute buffer to the host.

void Read(Span<T> data)

Parameters

data Span<T>

The destination span to receive the data.

Write(ReadOnlySpan<T>)

Writes data from the host to the compute buffer.

void Write(ReadOnlySpan<T> data)

Parameters

data ReadOnlySpan<T>

The source data to write.