CUDA programmers should not be manually putting defines like this:
DEVICE_FUNCTIONS_H
in their code. Such practices may break existing mechanisms (as you have discovered). In this case, if your project defines that, then when the CUDA compiler automatically includes device_functions.h (one of the CUDA header files) it won’t have the desired effect, because that define will trip up the include guards in that file, resulting in a situation that was as if that file had not been included in your project (and it is mandatory for CUDA).
If your code does not run correctly, you’ll probably need to debug it.
Ah I see. Thank you for your reply. I will leave that out! Without it, although my code will compile, I have many intelsense errors, mainly things that are defined in device_functions.h, as well as syncthreads and atomicInc. Right clicking on ‘go to definition’ takes me to the function definition, so can I ignore this as an intelsense issue, rather than a code one? Thanks again.
Yes, you can ignore things that are intellisense errors that relate to CUDA and do not prevent you from successfully compiling your code.
Again, if building your project that way results in a successful compile, but a program that does not give you the expected results, the only advice I can offer is to follow usual debugging methods.