Simplifying 2nd CUDA exercise