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_r(arr,seed)RESULT(ans)REAL(SP),DIMENSION(:),INTENT(IN)::arrREAL(SP),OPTIONAL,INTENT(IN)::seedREAL(SP),DIMENSION(size(arr))::ansINTEGER(I4B)::n,jREAL(SP)::sdn=size(arr)if(n==0_i4b)RETURNsd=0.0_spif(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_r(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_r