2nd week passing by while I am still trying to migrate my app to latest SDK :-)
Currently I’ve faced strange issue: constant get shifted by 1 byte (i.e. small values are multiplied by 256).
That is totally crazy :-) Any ideas how this might happen?
I set it like this:
int test[4];
test[0]=123;
test[1]=234;
test[2]=345;
test[3]=456;
cudaMemcpyToSymbol(target_hash, test, sizeof(int)*4, cudaMemcpyHostToDevice);
Damn, guys, looks like I’ll win free ticket to mental hospital with CUDA :-)
This works perfect: cudaMemcpyToSymbol(“target_hash”, hash_i, sizeof(int)*4);
This have 1 byte shift: cudaMemcpyToSymbol(“target_hash”, hash_i, sizeof(int)*4, cudaMemcpyHostToDevice);