How do I implement templated constant variable in cuda
. I have a struct
template<typename T> mystruct{ T d1; T d2[10];}
I want to have a constant variable with the above struct
and use a code something like below (code may not be correct at this point)
template<typename T> __constant__ mystruct<T> const_data;
after this within main I want to copy some
mystruct<float> data;
into const_data
and eventually access it within device code. It would be kind if someone points out how to achieve this. Thanks in advance.