refactor CUDA code to separate files so that we can run on non-GPU node.