Class KernelArgument
- Namespace
- DotCompute.Backends.OpenCL.Execution
- Assembly
- DotCompute.Backends.OpenCL.dll
Represents a single kernel argument.
public sealed class KernelArgument
- Inheritance
-
KernelArgument
- Inherited Members
Properties
BufferHandle
Gets the buffer handle (if buffer argument).
public nint BufferHandle { get; }
Property Value
IsBuffer
Gets whether this is a buffer argument.
public bool IsBuffer { get; }
Property Value
IsLocalMemory
Gets whether this is a local memory argument.
public bool IsLocalMemory { get; }
Property Value
LocalMemorySize
Gets the local memory size (if local memory argument).
public nuint LocalMemorySize { get; }
Property Value
ScalarData
Gets the scalar data (if scalar argument).
public IReadOnlyList<byte> ScalarData { get; }
Property Value
Size
Gets the size of the argument in bytes.
public int Size { get; }
Property Value
Methods
Buffer(nint)
Creates a buffer argument.
public static KernelArgument Buffer(nint handle)
Parameters
handlenint
Returns
LocalMemory(nuint)
Creates a local memory argument.
public static KernelArgument LocalMemory(nuint sizeBytes)
Parameters
sizeBytesnuint
Returns
Scalar<T>(T)
Creates a scalar argument.
public static KernelArgument Scalar<T>(T value) where T : unmanaged
Parameters
valueT
Returns
Type Parameters
T