Quicksort for long integer kinds.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=long_k), | intent(inout) | :: | list(:) |
list to be sorted |
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