Compiling with nvcc and keeping the function name.


during my tests to use CUDA in C# implementations I’m using the driver API to have better access to the compiled .cubin file.
As you write in your documentation there is a method to get the kernel function-pointer by name. The problem is, that the name is not fix in the cubin file and changes everytime a parameter or a code has changed. Is there a way to keep the name of the function constant so that I can rely on the function name?


This is from the C++ name mangling. Declare the global fuction:

extern "C" void __global__ kernel(..)

to avoid it.

Hello MisterAnderson42,

works great. Thank you very much for your quick help.