cancel
Showing results for 
Search instead for 
Did you mean: 

OpenCL

notooth
Journeyman III

Execute a kernel from OpenCL platform?

Hi everyone,

I am looking for a way to execute a kernel from OpenCL platform, just like clEnqueueNDRangeKernel command from host side. Please help.

0 Kudos
Reply
3 Replies
nou
Exemplar

Re: Execute a kernel from OpenCL platform?

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.

0 Kudos
Reply
himanshu_gautam
Grandmaster

Re: Execute a kernel from OpenCL platform?

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.

0 Kudos
Reply
notooth
Journeyman III

Re: Execute a kernel from OpenCL platform?

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.

0 Kudos
Reply