Hi All,
I would like to define a set of arrays that I will pass to some kernel. Since I might have many of them, it might be simpler to organized them in a struct. I would then like to do something like :
[codebox]
struct data{
float *val;
};
device data mydata;
global void init(float *in){
mydata.val = in;
}
global void kernel(float *out){
int tid = threadIdx.x;
out[tid] = (mydata.val)[tid];
}
[/codebox]
But this is not working. Is there a simple way to store the address of a global mem object in a device struct?
thanks