Table of Contents

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

int

this[int]

Gets the argument at the specified index.

public KernelArgument this[int index] { get; }

Parameters

index int

Property Value

KernelArgument

Methods

AddBuffer(nint)

Adds a buffer argument.

public void AddBuffer(nint handle)

Parameters

handle nint

Buffer handle.

AddLocalMemory(nuint)

Adds a local memory argument.

public void AddLocalMemory(nuint sizeBytes)

Parameters

sizeBytes nuint

Size of local memory in bytes.

AddScalar<T>(T)

Adds a scalar argument.

public void AddScalar<T>(T value) where T : unmanaged

Parameters

value T

Scalar value.

Type Parameters

T

Scalar type (must be unmanaged).