Templatizing kernel size

I am trying to make the separable convolution sample work with arbitrary kernel radi. Using a compile time template seems like the right way to go, the only problem is that the d_Kernel constant is a global variable. Putting it in a struct or class seems to not compile, so how could i templatize it. Does it have to be a global variable? Can it be inside the function that calls the kernels? If so then how would the kernel be able to access it?

I think you need to post more information.

If it’s a template parameter to the kernel function, then the kernel code can access it just like a regular function parameter.

Mark