Hi all,
Is there something tricky/special about CUDA memory management when called from member functions in c++?
I’m rewriting one of the cuda examples into c++ object oriented code.
There is a (global) variable in a cu file.
device unsigned int blockCounter;
when I call into one of the functions in the same cu file:
unsigned int hBlockCounter = 0;//1.6.18 cudaMemcpyToSymbol
cutilSafeCall( cudaMemcpyToSymbol(blockCounter, &hBlockCounter, sizeof(unsigned int), 0, cudaMemcpyHostToDevice ) );
from a static member function, it worked. But when I call it from a member method in an object, I get a cudaErrorInvalidSymbol error.
What could be wrong?
Thanks!