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.
Where possible, edges connecting nodes are
given different colours to make them easier to distinguish in
large graphs.
Source Code
recursive subroutine QSort(nA,A,B)! DUMMY ARGUMENTSinteger,intent(in)::nAinteger(ESMF_KIND_I4),intent(inout)::A(:,:)real(ESMF_KIND_R8),intent(inout)::B(:)! LOCAL VARIABLESinteger::left,rightreal(ESMF_KIND_R8)::random,tempRinteger(ESMF_KIND_I4)::tempI(2),pivotinteger::marker! If there's more than one entry in the array, then sortif(nA>1)then call random_number(random)! random pivor (not best performance, but avoids worst-case)pivot=A(2,int(random*real(nA-1))+1)left=0right=nA+1do while(left<right)right=right-1do while(A(2,right)>pivot)right=right-1end doleft=left+1do while(A(2,left)<pivot)left=left+1end do if(left<right)thentempI=A(:,left)A(:,left)=A(:,right)A(:,right)=tempItempR=B(left)B(left)=B(right)B(right)=tempRend if end do if(left==right)thenmarker=left+1elsemarker=leftend if call QSort(marker-1,A(:,:marker-1),B(:marker-1))call QSort(nA-marker+1,A(:,marker:),B(marker:))end ifend subroutine QSort