I am doing a project with cuda and I found that the constants I defined in the .h file can’t be read by the host and device code so I have to put every delaration in each file.
The kernel file doesn’t accept #define M N format, so I have to do this like int M = N;
Is that possible to use #define thing?
Another question is I have to use random function in the kernel file, but the kernel file doesn’t accept srand(m), rand(), how to make it possible to use host funtion in device code?
Thanks in advance.