Some changes for CUDA arithmetic