parallelize another outer loop in the main calculation on the CUDA version