Plain insertion sort. a is at most a few hundred cells in every
realistic setup-time call (and correctness, not speed, is what
matters for a diagnostic median) — no need for anything fancier.
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.
Variables
Type
Visibility
Attributes
Name
Initial
integer,
private
::
i
integer,
private
::
j
real(kind=wp),
private
::
key
Source Code
pure subroutine sort_real(a)!! Plain insertion sort. `a` is at most a few hundred cells in every!! realistic setup-time call (and correctness, not speed, is what!! matters for a diagnostic median) — no need for anything fancier.real(wp),intent(inout)::a(:)integer::i,jreal(wp)::keydo i=2,size(a)key=a(i)j=i-1do while(j>=1)if(a(j)<=key)exita(j+1)=a(j)j=j-1end doa(j+1)=keyend do end subroutine sort_real