Understanding #include in Nsight

I have a project with many source files (examples: main.cu, a.cu, b.cu, c.cu, d.cu). Each with functions and kernel calls (global and device).

In a header (cpu.h) all the structures to be used in the host side.
Another header (gpu.h) all the structures to be used in the device side.

  1. If I call kernel functions from main.cu, declared in a.cu. How do I #include those kernel functions declared in a.cu to use in main.cu, without doing the not recommended #include “a.cu”?

  2. Do I create a header a.h with forward declaration of the kernel function in a.cu? Example:
    extern “C” void functionA(type);

Where can I find some examples?

I mention Nsight Eclipse because I am having lots of trouble with it and multiple sources.

mrei, I replied on Stackoverflow (I saw your question there first and copying my reply here would require me redoing the formatting).

Link: http://stackoverflow.com/questions/19101763/how-to-include-several-source-files-in-nsight-eclipse

Does this answer your question?

I commented on Stackoverflow the parts I don’t get. Thanks a lot!