moving towards modularizing the CUDA code and always picking a matching kernel for the target hardware. Compilation only tested on Windows.