Hi,
It might be possible the following code?
device float var;
host void func1(){
float v=3;
cudaMemcpy(&var, &v, sizeof(float),cudaMemcpyHostToDevice);
}
global void func2(){
//Using var anyway…
}
The idea arises from using a global variable without calling
cudaMalloc. Is that possible?
Thanks!