Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
RECURSIVE FUNCTION cumsum_i(arr,seed)RESULT(ans)INTEGER(I4B),DIMENSION(:),INTENT(IN)::arrINTEGER(I4B),OPTIONAL,INTENT(IN)::seedINTEGER(I4B),DIMENSION(size(arr))::ansINTEGER(I4B)::n,j,sdn=size(arr)if(n==0_i4b)RETURNsd=0_i4bif(present(seed))sd=seedans(1)=arr(1)+sdif(n<NPAR_CUMSUM)then do j=2,nans(j)=ans(j-1)+arr(j)end do elseans(2:n:2)=cumsum_i(arr(2:n:2)+arr(1:n-1:2),sd)ans(3:n:2)=ans(2:n-1:2)+arr(3:n:2)end if END FUNCTION cumsum_i