Hi,
I have multiple files and each of them uses a value in the constant memory. Is it necessary to declare the constant symbol in all files where I am accessing this value? I am compiling files with -rdc=true option.
Thank you in advance.
Somebody answered my question here:
http://stackoverflow.com/questions/18213988/cuda-constant-memory-symbols
So at first you need to create a header file and declare the symbol:
// constant.cuh
extern __constant__ var_type var_name;
then define only once the symbol in a .cu file:
// constant.cu
__constant__ var_type var_name;
If you need this symbol in other .cu files, just include the header.