[Presentation] A C++ template for decoupling the invocation of CUDA kernels from the nvcc compiler driver

I gave this talk (my first ever) last week at a C++ meetup in London
Find the code and slides here https://github.com/sola-aina/InvokeCudaKernel

The files must be saved as .cu files, or alternatively, the -x cu switch should be passed to the nvcc compiler driver to flag it for cuda specific processing.

The blanket statements about C++14 and which host compiler is selected by nvcc seem to be incorrect to me if CUDA 9 is in view. CUDA 9.2 supports gcc variants up through 7.3.1, and the CUDA 9.2 programming guide (and nvcc manual) specifically identify support for C++14.

Thanks for the corrections. I ought to have pointed out that these restrictions may not apply to all versions of CUDA. I’m still confined to CUDA 8 because of my ancient GPU, and could not compile cu files that use C++14 features such as generic lambdas. I’ll add the necessary caveats to the github page.