Table of Contents

Class UnifiedMemoryService

Namespace
DotCompute.Runtime.Services.Memory
Assembly
DotCompute.Runtime.dll

Implementation of unified memory service

public class UnifiedMemoryService : IUnifiedMemoryService
Inheritance
UnifiedMemoryService
Implements
Inherited Members

Constructors

UnifiedMemoryService(ILogger<UnifiedMemoryService>)

Implementation of unified memory service

public UnifiedMemoryService(ILogger<UnifiedMemoryService> logger)

Parameters

logger ILogger<UnifiedMemoryService>

Methods

AllocateUnifiedAsync(long, params string[])

Gets allocate unified asynchronously.

public Task<IUnifiedMemoryBuffer> AllocateUnifiedAsync(long sizeInBytes, params string[] acceleratorIds)

Parameters

sizeInBytes long

The size in bytes.

acceleratorIds string[]

The accelerator ids.

Returns

Task<IUnifiedMemoryBuffer>

The result of the operation.

GetCoherenceStatus(IUnifiedMemoryBuffer)

Gets the coherence status.

public MemoryCoherenceStatus GetCoherenceStatus(IUnifiedMemoryBuffer buffer)

Parameters

buffer IUnifiedMemoryBuffer

The buffer.

Returns

MemoryCoherenceStatus

The coherence status.

MigrateAsync(IUnifiedMemoryBuffer, string, string)

Gets migrate asynchronously.

public Task MigrateAsync(IUnifiedMemoryBuffer buffer, string sourceAcceleratorId, string targetAcceleratorId)

Parameters

buffer IUnifiedMemoryBuffer

The buffer.

sourceAcceleratorId string

The source accelerator identifier.

targetAcceleratorId string

The target accelerator identifier.

Returns

Task

The result of the operation.

SynchronizeCoherenceAsync(IUnifiedMemoryBuffer, params string[])

Gets synchronize coherence asynchronously.

public Task SynchronizeCoherenceAsync(IUnifiedMemoryBuffer buffer, params string[] acceleratorIds)

Parameters

buffer IUnifiedMemoryBuffer

The buffer.

acceleratorIds string[]

The accelerator ids.

Returns

Task

The result of the operation.