I have currently a huge part of my project written in c++ and now I want to integrate that project with CUDA.
So, I want to call cuda specific functions from the main.cpp file of my project. Now, if I compile this .cpp file using the g++ compiler, it gives error saying that it does not understand the global, device identifiers. And if I compile it using the nvcc compiler, it straight away rejects it saying the file extension is not cu.
(Now, I cannot afford to rename this .cpp file to .cu)
What should I do?