coder.gpu.kernelfun
Pragma that maps function to GPU kernels
Syntax
Description
coder.gpu.kernelfun()
is a global-level pragma that attempts
to map all the computation within the function it
resides in on to the GPU. Loops within this function are parallelized into GPU
kernels only if they pass the parallel-loop analysis check. This analysis tries to
prove that every loop iteration is independent of each other.
This pragma does not require any input parameters. It generates kernels whose dimensions are computed automatically based on loop parameters.
This function is a code generation function. It has no effect in MATLAB®.
Examples
Version History
Introduced in R2017b
See Also
Apps
Functions
codegen
|coder.gpu.kernel
|gpucoder.stencilKernel
|coder.gpu.constantMemory
|gpucoder.reduce
|gpucoder.sort
|coder.gpu.nokernel