Inplace equivalent of sort_ivec routine.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=ip), | intent(inout), | dimension(:) | :: | iv |
Vector to be reordered in place |
subroutine sort_ivec_inplace(iv)
!! Inplace equivalent of [[sort_ivec]] routine.
use mod_memory, only: mfree
implicit none
integer(ip), dimension(:), intent(inout) :: iv
!! Vector to be reordered in place
integer(ip), allocatable :: ov(:)
call sort_ivec(iv, ov)
iv = ov
call mfree('sort_ivec_inplace', ov)
end subroutine sort_ivec_inplace