GPU code into a single file for master branch