Files to accompany the October 4th 2021 blog post:
Folding a Global Linear Id from CUDA Dimensions and Indices
Paul Keir
https://pkeir.github.io/blog/2021/10/04/folding-a-linear-index-for-cuda
To compile, pick one of the following:
nvcc -x cu -std=c++17 main.cpp
g++ -std=c++17 main.cpp
clang++ -std=c++17 main.cpp