Weird function names when compiling with nvcc -cub

When I compile a kernel with nvcc -cubin the names of the resulting functions in the module always look like Z10testKerneliiPfjS_S. Can I avoid this by using some compiler option or do I have to change it manually?

Thanks in advance!

I guess that was done for a purpose. There are alot of autogenerated stubs e.t.c all have to have different names.

Also, I haven’t seen such option in documentation.

Put

extern “C”

before your kernel function definition.

For example,

extern “C”

global void your_function(…)

Thanks a lot. It works! :)