Hi everybody! I’m developing a C++/CUDA library and I have to deal with two separate compilations every time causing linking errors - unresolved external symbol. The problem is, in some cases, that nvcc doesn’t instantiate all the possible specializations of the involved template function and at linking time there’s no way to resolve the reference. I thought about it and I found two ways to (possibly) resolve this problem:
- Specializing every template with every possible data type (a waist of both time & space)
- Using some #pragma directive to tell nvcc to specialize a template with some particular data types.
So, now the question: is there anything similar to #pragma instantiate in CUDA C? Can I tell the compiler to compile with the right data types? Is there any other solution to my problem? Thank you all.