Add command line arguments to GPU implementation
Fix integer overflow issues with CPU and GPU implementations