In my older CUDA project I had the globals:
__device__ uint8_t dev_intersect;
__constant__ uint8_t dev_flags;
… and used them this way:
cudaGetSymbolAddress((void**)&ptr_dev_intersect,"dev_intersect");
cudaMemcpyToSymbol("dev_flags",&flags,sizeof(flags));
Now, since CUDA 5.0 (and newer) the symbols must be passed directly (without string), so I define the globals this way:
__device__ uint8_t *dev_intersect;
__constant__ uint8_t *dev_flags;
…and call the functions this way:
cudaGetSymbolAddress((void**)&ptr_dev_intersect,dev_intersect);
cudaMemcpyToSymbol(dev_flags,&flags,sizeof(flags));
Am I doing it right so far? I’m asking you, because when I update the code, I start getting other errors, which makes me kinda suspicious. Thanks for any help.