Table of Contents

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

IList<IUnifiedMemoryBuffer>

Configuration

Gets or sets the execution configuration (grid size, block size, etc.).

public ExecutionConfiguration? Configuration { get; init; }

Property Value

ExecutionConfiguration

ScalarArguments

Gets or sets the scalar arguments to be passed to the kernel.

public IList<object> ScalarArguments { get; init; }

Property Value

IList<object>

TotalArgumentCount

Gets the total number of arguments.

public int TotalArgumentCount { get; }

Property Value

int

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

buffers IEnumerable<IUnifiedMemoryBuffer>
scalars IEnumerable<object>
configuration ExecutionConfiguration

Returns

KernelArguments

ValidateTypes(Type[])

Validates that the arguments match expected parameter types.

public bool ValidateTypes(Type[] expectedTypes)

Parameters

expectedTypes Type[]

Returns

bool