Altera_Forum
Honored Contributor
11 years agoError in writing opencl kernel
hi ,
I am writing the OpenCL on de5. But inside my kernel function , I want to pass a parameter of structure type to other function to do compute . It seems that it can not work. A simple example as below : typedef struct { int count; } cnt; void funcA(cnt * cnt_temp) { } __kernel void photon(__global cnt * temp) { int gid = get_global_id(0); funcA(&temp); } But in general opencl , this syntax can work ! So , doesn't it pass a address to a function ? thanks.