Class AcceleratorExtensions
- Namespace
- DotCompute.Core.Extensions
- Assembly
- DotCompute.Core.dll
Extension methods for IAccelerator interface to provide additional functionality.
public static class AcceleratorExtensions
- Inheritance
-
AcceleratorExtensions
- Inherited Members
Methods
AcceleratorType(IAccelerator)
Gets the accelerator type (legacy property name for backward compatibility).
public static AcceleratorType AcceleratorType(this IAccelerator accelerator)
Parameters
acceleratorIAcceleratorThe accelerator instance.
Returns
- AcceleratorType
The accelerator type.
CreateGraph(IAccelerator)
Creates a graph for batching operations (if supported by the backend).
public static object? CreateGraph(this IAccelerator accelerator)
Parameters
acceleratorIAcceleratorThe accelerator instance.
Returns
- object
A graph object if supported, otherwise null.
Remarks
This is a compatibility method for CUDA graph functionality. Not all backends support graph creation.
GetMemoryStatistics(IAccelerator)
Gets memory statistics for the accelerator (if supported).
public static MemoryStatistics GetMemoryStatistics(this IAccelerator accelerator)
Parameters
acceleratorIAcceleratorThe accelerator instance.
Returns
- MemoryStatistics
Memory statistics if supported, otherwise default values.