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
namestringThe parameter name.
typeTypeThe parameter type.
directionParameterDirectionThe 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
namestringThe parameter name.
typeTypeThe parameter type.
indexintThe parameter index.
isInputboolWhether this is an input parameter.
isOutputboolWhether this is an output parameter.
isConstantboolWhether this is a constant parameter.
Properties
Direction
Gets the parameter direction.
public ParameterDirection Direction { get; }
Property Value
Index
Gets the parameter index.
public int Index { get; }
Property Value
IsConstant
Gets whether this is a constant parameter that should never be null.
public bool IsConstant { get; }
Property Value
IsInput
Gets whether this is an input parameter.
public bool IsInput { get; }
Property Value
IsOutput
Gets whether this is an output parameter.
public bool IsOutput { get; }
Property Value
IsReadOnly
Gets whether this parameter is read-only.
public bool IsReadOnly { get; }
Property Value
MaxValue
Gets or sets the maximum value for numeric parameter validation.
public object? MaxValue { get; set; }
Property Value
MemorySpace
Gets or inits the memory space for this parameter.
public MemorySpace MemorySpace { get; init; }
Property Value
MinValue
Gets or sets the minimum value for numeric parameter validation.
public object? MinValue { get; set; }
Property Value
Name
Gets the parameter name.
public string Name { get; }
Property Value
Type
Gets the parameter type.
public Type Type { get; }