Reverted single-threaded implementation
CUDA work before using the GPU