I have a question in regards of launching a different kernel within a currently running kernel. Let's say I have some piece of kernel code as the following:
__kernel void kernel_one (args...)
// Do some computation of kernel_one
__kernel void kernel_two (args...)
// Do some computation of kernel_two
kernel_one (args...) // Then launch kernel_one to do some different computation
Apparently this can be done in NVidia's CUDA using the __device__ prefixed in front of the name kernel_one. Is there an OpenCL equivalent to this?
Thanks in advanced
you can call another kernel in kernel. then they act as normal function. refer to section 6.7.1
also calling kernel which has __local variables is implemetation defined. on AMD IIRC it lead to error or bad results.