qsort_vrtx Subroutine

private recursive subroutine qsort_vrtx(list)

Quicksort for long integer kinds.

Arguments

Type IntentOptional Attributes Name
integer(kind=long_k), intent(inout) :: list(:)

list to be sorted


Calls

proc~~qsort_vrtx~~CallsGraph proc~qsort_vrtx qsort_vrtx proc~qsort_vrtx->proc~qsort_vrtx proc~partition partition proc~qsort_vrtx->proc~partition

Called by

proc~~qsort_vrtx~~CalledByGraph proc~qsort_vrtx qsort_vrtx proc~qsort_vrtx->proc~qsort_vrtx proc~tem_calc_vrtx_coord tem_calc_vrtx_coord proc~tem_calc_vrtx_coord->proc~qsort_vrtx proc~hvs_output_init hvs_output_init proc~hvs_output_init->proc~tem_calc_vrtx_coord proc~tem_init_tracker tem_init_tracker proc~tem_init_tracker->proc~hvs_output_init

Source Code

  recursive subroutine qsort_vrtx( list )
    ! ---------------------------------------------------------------------------
    !> list to be sorted
    integer( kind=long_k ), intent(inout)  :: list(:)
    ! ---------------------------------------------------------------------------
    integer :: split
    ! ---------------------------------------------------------------------------

    ! recursive call of qsort
    if( size( list ) .gt. 1)then
      call partition( list, split )
      call qsort_vrtx( list( :split-1 ))
      call qsort_vrtx( list( split: ))
    end if

  end subroutine qsort_vrtx