I have something like either:
__constant__ double PNT[ NUMCOORDS ];
__device__ double PNT[ NUMCOORDS ];
depending upon some preprocessor selections. I then use this variable:
cudaMemcpyToSymbol("PNT", point, pntSize)
However, sometimes (and I really CAN'T say when which really confuses me) I get the error message:
duplicate global variable looked up by string name
when checking for CUDA errors. I tried replacing "PNT"
with PNT
and strangely, this works:
cudaMemcpyToSymbol(PNT, point, pntSize)
Shound I use this solution in practice (instead of using a string "PNT"
)?