Adding cuda reduction and MPI halo exchange code to the cuda code generator