March 2020
Intermediate to advanced
406 pages
8h 39m
English
After we have all of our CUDA dependencies installed and running, we can start out with a simple CUDA C++ program:
#include <cstdlib>#include <iostream>const int ELEMENTS = 1 << 20;
Our multiply function is wrapped in a __global__ specifier. This allows nvcc, the CUDA-specific C++ compiler, to run a particular function on the GPU. This multiply function is relatively straightforward: it takes the a and b arrays, multiplies them together using ...
Read now
Unlock full access