I was browsing a piece of code for reduction, and a device function was declared as
template <unsigned int BLOCKSIZE, class T> __device__ static void reduceOne(int tid, T *s_A);
How does this differ from:
template <class T> __device__ static void reduceOne(unsigned int BLOCKSIZE, int tid, T *s_A);
And why is the former preferred over the ladder?
Edit: so the first one is resolved at compile time, and BLOCKSIZE must be a constant