Compiling with nvcc
How nvcc splits host and device code.
Meet nvcc
The CUDA compiler is called nvcc. It takes your .cu file with mixed CPU and GPU code and turns it into one runnable program. 🛠️
Two Kinds of Code
A .cu file holds two worlds: host code that runs on the CPU and device code that runs on the GPU. nvcc must handle each one differently.