Some C++ seems to work in CUDA, but I don’t believe it is officially supported, and some things do not work. Many simple things, such as overloaded operators, and inline constructors, etc… work. Anything that cannot be inlined will not work.
You can call host functions in your .cu file from functions in your .cpp file.
Declare the .cu function extern “C” , and in the .cpp file, include a prototype, also with extern “C”. (At least, I have to do this under Visual Studio to prevent name mangling.)
Example:
// in .cu file
extern "C" bool runKernel(float param) {
// code here
...
}
// in .cpp file: prototype
extern "C" bool runKernel(float param);