I wrote some CUDA code not including any CUDA header files like cuda.h. And I used some CUDA functions like cudaMalloc(). But the code could be compiled and run successfully.
Does NVCC include header files automatically? Is there any document to mention this feature?
nvcc automatically includes CUDA-specific header files when handling code in .cu files. You still need to include the standard C/C++ header files and header files for any libraries delivered with CUDA, if you use functions exported by these header files.
Thanks for your reply. I think that is the answer I want.