Writing kernels

These kernel language constructs are intended to be used as part of @kernel functions and not valid outside that context.

Constant arguments

Kernel functions allow for input arguments to be marked with the @Const macro. It informs the compiler that the memory accessed through that marked input argument, will not be written to as part of the kernel. This has the implication that input arguments are not allowed to alias each other. If you are used to CUDA C this is similar to const restrict.


There are several @index variants.

Local memory, variable lifetime and private memory

@localmem, @synchronize, @private

Launching kernels

Kernel dependencies