CUDA C++
CUDA C++ extends C++ with facilities for defining device functions, launching kernels and managing GPU execution. It exposes the SIMT thread, block and grid model.
How it works
Host code runs on the CPU and submits device work. Kernel code uses built-in indices to determine each thread’s work. Qualifiers and APIs describe where functions execute and where data is stored, while the compiler builds the host and device portions.
Work through an example
A vector-add implementation needs both the element calculation and a valid launch, allocation and completion sequence. Correct kernel arithmetic cannot repair a host that reads the output before the device finishes.
Where the term can mislead
A kernel launch is not a normal synchronous function call. Check launch errors and eventual execution errors at the appropriate boundaries.
Connect the idea
Take it into practice
Continue with the existing concept, apply it to an interview problem, or follow a course lesson. Access requirements are shown before you open a page.
New to GPUs? Start with the free execution-model concept.
Sources and scope
Examples here are teaching calculations, not measured GPU performance. Consult the linked documentation for the exact device, instruction and tool version. Source review: 25 October 2026.
