Class KernelArguments
- Namespace
- DotCompute.Backends.OpenCL.Execution
- Assembly
- DotCompute.Backends.OpenCL.dll
Container for kernel arguments with type-safe handling.
public sealed class KernelArguments
- Inheritance
-
KernelArguments
- Inherited Members
Properties
Count
Gets the number of arguments.
public int Count { get; }
Property Value
this[int]
Gets the argument at the specified index.
public KernelArgument this[int index] { get; }
Parameters
indexint
Property Value
Methods
AddBuffer(nint)
Adds a buffer argument.
public void AddBuffer(nint handle)
Parameters
handlenintBuffer handle.
AddLocalMemory(nuint)
Adds a local memory argument.
public void AddLocalMemory(nuint sizeBytes)
Parameters
sizeBytesnuintSize of local memory in bytes.
AddScalar<T>(T)
Adds a scalar argument.
public void AddScalar<T>(T value) where T : unmanaged
Parameters
valueTScalar value.
Type Parameters
TScalar type (must be unmanaged).