Class AcceleratorRuntime
- Namespace
- DotCompute.Runtime
- Assembly
- DotCompute.Runtime.dll
Main runtime for accelerator management and execution
[SuppressMessage("Performance", "CA1848:Use the LoggerMessage delegates", Justification = "Simple logging in runtime layer")]
public class AcceleratorRuntime : IDisposable, IAsyncDisposable
- Inheritance
-
AcceleratorRuntime
- Implements
- Inherited Members
- Extension Methods
Constructors
AcceleratorRuntime(IServiceProvider, ILogger<AcceleratorRuntime>)
Main runtime for accelerator management and execution
public AcceleratorRuntime(IServiceProvider serviceProvider, ILogger<AcceleratorRuntime> logger)
Parameters
serviceProviderIServiceProviderloggerILogger<AcceleratorRuntime>
Methods
Dispose()
Disposes of the runtime and all managed accelerators synchronously
public void Dispose()
Dispose(bool)
Protected implementation of Dispose pattern
protected virtual void Dispose(bool disposing)
Parameters
disposingbool
DisposeAsync()
Disposes of the runtime and all managed accelerators asynchronously
public ValueTask DisposeAsync()
Returns
DisposeAsyncCoreAsync()
Protected async implementation of Dispose pattern
protected virtual ValueTask DisposeAsyncCoreAsync()
Returns
GetAccelerator(string)
Get accelerator by type
public IAccelerator? GetAccelerator(string deviceType)
Parameters
deviceTypestring
Returns
GetAccelerators()
Get all available accelerators
public IReadOnlyList<IAccelerator> GetAccelerators()
Returns
InitializeAsync()
Initialize the runtime and discover available accelerators
public Task InitializeAsync()