Table of Contents

Interface IAcceleratorProvider

Namespace
DotCompute.Abstractions
Assembly
DotCompute.Abstractions.dll

Provides accelerator instances.

public interface IAcceleratorProvider

Properties

Name

Gets the name of this provider.

string Name { get; }

Property Value

string

SupportedTypes

Gets the types of accelerators this provider can create.

IReadOnlyList<AcceleratorType> SupportedTypes { get; }

Property Value

IReadOnlyList<AcceleratorType>

Methods

CreateAsync(AcceleratorInfo, CancellationToken)

Creates an accelerator instance.

ValueTask<IAccelerator> CreateAsync(AcceleratorInfo info, CancellationToken cancellationToken = default)

Parameters

info AcceleratorInfo

The accelerator information.

cancellationToken CancellationToken

Cancellation token.

Returns

ValueTask<IAccelerator>

The created accelerator instance.

DiscoverAsync(CancellationToken)

Discovers available accelerators.

ValueTask<IEnumerable<IAccelerator>> DiscoverAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Cancellation token.

Returns

ValueTask<IEnumerable<IAccelerator>>

A list of discovered accelerators.