ILGPU  0.9.0
ILGPU.Runtime.CPU.CPUAcceleratorTask Class Reference

Represents a single CPU-accelerator task. More...

Public Member Functions

 CPUAcceleratorTask (CPUKernelExecutionHandler kernelExecutionDelegate, KernelConfig userConfig, RuntimeKernelConfig config)
 Constructs a new accelerator task. More...
 
void Execute (CPURuntimeGroupContext groupContext, int runtimeThreadOffset, int groupSize, int chunkSize, int chunkOffset, int targetDimension)
 Executes this task inside the runtime system. More...
 

Static Public Member Functions

static ConstructorInfo GetTaskConstructor (Type taskType)
 Gets a task-specific constructor. More...
 

Public Attributes

int GroupDimSize => GroupDim.Size
 Returns the group dimension size. More...
 
int UserRuntimeDimension => UserGridDim.Size * GroupDimSize
 Returns the runtime-defined kernel dimension. More...
 
int RuntimeDimension => GridDim.Size * GroupDimSize
 Returns the runtime-defined kernel dimension. More...
 

Properties

Index3 UserGridDim [get]
 Returns the grid dimension that was specified by the user. More...
 
int UserDimension [get]
 Returns the user-defined kernel dimension. More...
 
Index3 GridDim [get]
 Returns the current grid dimension. More...
 
Index3 GroupDim [get]
 Returns the current group dimension. More...
 
RuntimeSharedMemoryConfig SharedMemoryConfig [get]
 Returns the shared memory config to use. More...
 
CPUKernelExecutionHandler KernelExecutionDelegate [get]
 Returns the associated kernel-execution delegate. More...
 

Detailed Description

Represents a single CPU-accelerator task.

Constructor & Destructor Documentation

ILGPU.Runtime.CPU.CPUAcceleratorTask.CPUAcceleratorTask ( CPUKernelExecutionHandler  kernelExecutionDelegate,
KernelConfig  userConfig,
RuntimeKernelConfig  config 
)

Constructs a new accelerator task.

Parameters
kernelExecutionDelegateThe execution method.
userConfigThe user-defined grid configuration.
configThe global task configuration.

Member Function Documentation

void ILGPU.Runtime.CPU.CPUAcceleratorTask.Execute ( CPURuntimeGroupContext  groupContext,
int  runtimeThreadOffset,
int  groupSize,
int  chunkSize,
int  chunkOffset,
int  targetDimension 
)

Executes this task inside the runtime system.

Parameters
groupContextThe current group context.
runtimeThreadOffsetThe thread offset within the current group (WarpId * WarpSize + WarpThreadIdx).
groupSizeThe group size in the scope of the runtime system.
chunkSizeThe size of a grid-index chunk to process.
chunkOffsetThe offset of the current processing chunk.
targetDimensionThe target kernel dimension.
static ConstructorInfo ILGPU.Runtime.CPU.CPUAcceleratorTask.GetTaskConstructor ( Type  taskType)
static

Gets a task-specific constructor.

Parameters
taskTypeThe task type.
Returns
The constructor to create a new task instance.

Member Data Documentation

int ILGPU.Runtime.CPU.CPUAcceleratorTask.GroupDimSize => GroupDim.Size

Returns the group dimension size.

int ILGPU.Runtime.CPU.CPUAcceleratorTask.RuntimeDimension => GridDim.Size * GroupDimSize

Returns the runtime-defined kernel dimension.

int ILGPU.Runtime.CPU.CPUAcceleratorTask.UserRuntimeDimension => UserGridDim.Size * GroupDimSize

Returns the runtime-defined kernel dimension.

Property Documentation

Index3 ILGPU.Runtime.CPU.CPUAcceleratorTask.GridDim
get

Returns the current grid dimension.

Index3 ILGPU.Runtime.CPU.CPUAcceleratorTask.GroupDim
get

Returns the current group dimension.

CPUKernelExecutionHandler ILGPU.Runtime.CPU.CPUAcceleratorTask.KernelExecutionDelegate
get

Returns the associated kernel-execution delegate.

RuntimeSharedMemoryConfig ILGPU.Runtime.CPU.CPUAcceleratorTask.SharedMemoryConfig
get

Returns the shared memory config to use.

int ILGPU.Runtime.CPU.CPUAcceleratorTask.UserDimension
get

Returns the user-defined kernel dimension.

Index3 ILGPU.Runtime.CPU.CPUAcceleratorTask.UserGridDim
get

Returns the grid dimension that was specified by the user.


The documentation for this class was generated from the following file: