Class KernelArguments
- Namespace
- DotCompute.Runtime.Services.Types
- Assembly
- DotCompute.Runtime.dll
Represents arguments to be passed to a kernel for execution.
public class KernelArguments
- Inheritance
-
KernelArguments
- Inherited Members
Properties
Buffers
Gets or sets the memory buffers to be passed to the kernel.
public IList<IUnifiedMemoryBuffer> Buffers { get; init; }
Property Value
Configuration
Gets or sets the execution configuration (grid size, block size, etc.).
public ExecutionConfiguration? Configuration { get; init; }
Property Value
ScalarArguments
Gets or sets the scalar arguments to be passed to the kernel.
public IList<object> ScalarArguments { get; init; }
Property Value
TotalArgumentCount
Gets the total number of arguments.
public int TotalArgumentCount { get; }
Property Value
Methods
Create(IEnumerable<IUnifiedMemoryBuffer>?, IEnumerable<object>?, ExecutionConfiguration?)
Creates a new instance with the specified buffers and scalars.
public static KernelArguments Create(IEnumerable<IUnifiedMemoryBuffer>? buffers = null, IEnumerable<object>? scalars = null, ExecutionConfiguration? configuration = null)
Parameters
buffersIEnumerable<IUnifiedMemoryBuffer>scalarsIEnumerable<object>configurationExecutionConfiguration
Returns
ValidateTypes(Type[])
Validates that the arguments match expected parameter types.
public bool ValidateTypes(Type[] expectedTypes)
Parameters
expectedTypesType[]