Moving model to CUDA in C++

@goldsborough Thank you for the clarifications, and especially for the PR!