Can non-kernel functions access global memory?

Discussion created by edwen on Sep 15, 2010
Latest reply on Sep 15, 2010 by himanshu.gautam

My .cl is somehow like this:

void evaluation(float *L)


__kernel void memdata(__global float *d_v, __global float LC, const int num)

{ const int tid = get_global_id(0);

__global float *L_loc = LC + num*tid;




This always brings me a programbuild error. The reason I have to add "__global" in front of L_loc is because LC is in global memory, otherwise L_loc can't point to LC at all. However, "evaluation" is a non-kernel function, and it seems it can't reach global memory. Is that right?