defining templated constant variables in cuda
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.
No comments:
Post a Comment