Forking CUDA source tree from C. Not from C++, because it becomes way too overcomplicated for little practical benefit, IMO.
Changing compiler to nvcc
Adding control sum and reference result
Compiling relocatable device code, duplicating definitions in GPU memory
Adding CUDA error check macro
Adding initialization of GPU data
Turning diffusion operator into 1-thread GPU kernel
Simplier way to update the number of FLOPs
Dividing diffusion kernel into parallel interior points processing kernel and single-threaded boundary points processing kernel. Optimal block size is determined with modified Thrust calculator.
Rewriting diffusion boundaries as parallel kernels
Fusing pairs of boundary kernels
Determine grids only once