I have a CUDA kernel that takes in (C++) template argument for important information such the size of an array I want to initialize in the kernel stack. It used to work fine when my host program is written in C/C++ that I can easily pass it as a template argument. For example:
template global void foo()
Now I moved to MATLAB’s Parallel Computation Toolbox, where I can compile my CUDA kernel into PTX and call it from MATLAB (where my host code is):
The problem is that there’s no way to enter the template arguments from MATLAB. Any ideas I can use templates to pass template arguments into the kernel from non C/C++ host environment?