Revisit pPhiPhaseSum/gPhiPhaseSum to look at single temporary allocation
It may be better to make a temporary 4D view allocation for pPhiPhaseSum and gPhiPhaseSum just for the portion of the code where it's needed.
It may be better to make a temporary 4D view allocation for pPhiPhaseSum and gPhiPhaseSum just for the portion of the code where it's needed.