I have problems,when I tried to use constant memory and I wrote following code
__constant__ int M;
int M_Host = 5;
cudaMemcpyToSymbol(&M,&M_Host , sizeof(M));
In my kernel, I found M didn’ get any value from “cudaMemcpyToSymbol” and my compilation is successful. Does anybody know what happened??
And I did another tests, if I wrote follows, “M” can work in kernel… I’m confused.
constant int M = 5;