Hello,
I try to build a simple OpenCL program for a lesson I have. I’ve done a little search but I haven’t figured out yet how to procceed. So my problem is this:
I want to have 2 functions in the device, one kernel that calls the other one that is not kernel. The thing is I want to pass pointer arguments, but I read that this is not possible.
__kernel void kernel_func(__global double *startpt, __global double *endpt) {
//something with startpt
normal_func(endpt);
}
double normal_func(double *endpt){
for(i = 0; i < 8; i++) endpt[i] = 1;
}
Also, I would prefer to have endpt as private to each thread and in the end of kernel_func perform a reduction by minimum to some of the values of endpt and return to device the endpt of one thread.
Any help would be appreciated. Even links.