hi
certainly a stupid error but i have execution error qhen initialyzing device constant in the following code
In a strange way, error occurs when initialyzing third constant : “invalid argument”
NB : i read other similar problems in forums and i tried following solution without succes
constant is in the same file scope as cudaMemcpyToSymbol
add device before constant has no effect
cudaMemcpyToSymbol(M_DIM_COL_cm,…) instead of cudaMemcpyToSymbol(“M_DIM_COL_cm”…) : nothing better
#define DIM 3000
unsigned int M_DIM_LIG=DIM;
unsigned int M_DIM_COL=DIM;
unsigned int N_DIM_COL=DIM;
constant unsigned int N_DIM_COL_cm;
constant unsigned int M_DIM_LIG_cm;
constant unsigned int M_DIM_COL_cm;
…
int _tmain(int argc, _TCHAR* argv)
{…
CUDA_SAFE_CALL(cudaMemcpyToSymbol(“M_DIM_LIG_cm”,&M_DIM_LIG, sizeof(M_DIM_LIG),cudaMemcpyHostToDevice ));
CUDA_SAFE_CALL(cudaMemcpyToSymbol(N_DIM_COL_cm,&N_DIM_COL, sizeof(N_DIM_COL),cudaMemcpyHostToDevice ));
CUDA_SAFE_CALL(cudaMemcpyToSymbol(“M_DIM_COL_cm”,&M_DIM_COL, sizeof(M_DIM_COL),cudaMemcpyHostToDevice ));