PDA

View Full Version : Basic question



sajis997
11-12-2012, 08:09 AM
Hi forum,

I am going through a kernel function definition which in turn is calling another without any __kernel declaration . Should this one be running over the gpu or cpu ? I believe it will be running on CPU ?
What do you folks say?

for example :




__kernel void hello_kernel(....)
{
call_another(...);
}


static void call_another(...)
{

}



Regards
Sajjad

chippies
11-12-2012, 11:34 AM
The function call_another will get executed on the GPU, assuming you are using a GPU as your OpenCL device. Since GPUs don't really understand function calls, call_another will actually be inlined in the kernel.