passing a pointer to kernel

global void calcAccMatrix(float *mat,int w, int h)


…further computations done using mat…


Is the following allowed??? when mat is returned back to the host function, wha value does the pointer hold??

no problem, mat is stored in shared memory (all function parameter are stored into shared memory).

compiler would use a 32-bit register to represent mat if on 32-bit system. So each thread has its “mat” pointer.

thanks man