Wiring Up the Host Side
Alloc, copy, launch, copy back, free.
The Host Has a Job Too
The kernel does the math, but the host CPU sets everything up. Its job is allocate, copy in, launch, copy back, and free. 🧩
Two Sets of Pointers
You keep host pointers for CPU arrays and separate device pointers for GPU buffers. A common habit is naming them h_A and d_A.
float *h_A, *h_B, *h_C;
float *d_A, *d_B, *d_C;All lessons in this course
- The Vector Add Kernel
- Wiring Up the Host Side
- Verifying the Result on the CPU
- Timing Your First Speedup