Forum Discussion
Altera_Forum
Honored Contributor
11 years agoHi,
you need to add __global to the parameter on the function to indicate it is global memory space. Also, you don't need address(&) of temp in the kernel function because the kernel argument is already a pointer here is a modified version of the code: typedef struct { int count; } cnt; -void funcA(cnt * cnt_temp) +void funcA(__global cnt * cnt_temp) { } __kernel void photon(__global cnt * temp) { int gid = get_global_id(0); -funcA(&temp); +funcA(temp); }