I am looking for a way to execute a kernel from OpenCL platform, just like clEnqueueNDRangeKernel command from host side. Please help.
you mean execute another kernel within kernel? that is not currently possible. you can only call kernel instaide another kernel when it behaves as normal function.
What nou is saying is correct.
Please refer section 6.7.1 in OpenCL spec.
I am pasting it for your convenience.
The __kernel (or kernel) qualifier declares a function to be a kernel that can be executed by an application on an OpenCL device(s). The following rules apply to functions that are declared with this qualifier:
It can be executed on the device only
It can be called by the host
It is just a regular function call if a __kernel function is called by another kernel function.
So, I can only call another kernel with just 1 work-tem, unlike clEnqueueNDRangeKernel command with multi work-items running parallely. Hope the next version of OpenCL work that out.