Table of Contents

Class KernelParameter

Namespace
DotCompute.Abstractions.Kernels
Assembly
DotCompute.Abstractions.dll

Represents kernel parameter information with direction.

public class KernelParameter
Inheritance
KernelParameter
Inherited Members

Constructors

KernelParameter(string, Type, ParameterDirection)

Initializes a new instance of the KernelParameter class with direction.

public KernelParameter(string name, Type type, ParameterDirection direction)

Parameters

name string

The parameter name.

type Type

The parameter type.

direction ParameterDirection

The parameter direction.

Exceptions

ArgumentNullException

Thrown when name or type is null.

KernelParameter(string, Type, int, bool, bool, bool)

Initializes a new instance of the KernelParameter class with full details.

public KernelParameter(string name, Type type, int index, bool isInput = true, bool isOutput = false, bool isConstant = false)

Parameters

name string

The parameter name.

type Type

The parameter type.

index int

The parameter index.

isInput bool

Whether this is an input parameter.

isOutput bool

Whether this is an output parameter.

isConstant bool

Whether this is a constant parameter.

Properties

Direction

Gets the parameter direction.

public ParameterDirection Direction { get; }

Property Value

ParameterDirection

Index

Gets the parameter index.

public int Index { get; }

Property Value

int

IsConstant

Gets whether this is a constant parameter that should never be null.

public bool IsConstant { get; }

Property Value

bool

IsInput

Gets whether this is an input parameter.

public bool IsInput { get; }

Property Value

bool

IsOutput

Gets whether this is an output parameter.

public bool IsOutput { get; }

Property Value

bool

IsReadOnly

Gets whether this parameter is read-only.

public bool IsReadOnly { get; }

Property Value

bool

MaxValue

Gets or sets the maximum value for numeric parameter validation.

public object? MaxValue { get; set; }

Property Value

object

MemorySpace

Gets or inits the memory space for this parameter.

public MemorySpace MemorySpace { get; init; }

Property Value

MemorySpace

MinValue

Gets or sets the minimum value for numeric parameter validation.

public object? MinValue { get; set; }

Property Value

object

Name

Gets the parameter name.

public string Name { get; }

Property Value

string

Type

Gets the parameter type.

public Type Type { get; }

Property Value

Type