Moving main iterations loop to GPU, which completes the full-GPU solution.