The generic subroutine interface implementing the ORD_SORT
algorithm,
a translation to Fortran 2008, of the "Rust" sort
algorithm found in
slice.rs
https://github.com/rust-lang/rust/blob/90eb44a5897c39e3dff9c7e48e3973671dcd9496/src/liballoc/slice.rs#L2159
ORD_SORT
is a hybrid stable comparison algorithm combining merge sort
,
and insertion sort
.
(Specification)
It is always at worst O(N Ln(N)) in sorting random
data, having a performance about 25% slower than SORT
on such
data, but has much better performance than SORT
on partially
sorted data, having O(N) performance on uniformly non-increasing or
non-decreasing data.
bitset_64_ord_sort( array )
sorts the input ARRAY
of type type(bitset_64)
using a hybrid sort based on the "Rust" sort
algorithm found in slice.rs
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(bitset_64), | intent(inout) | :: | array(0:) | |||
type(bitset_64), | intent(out), | optional | :: | work(0:) | ||
logical, | intent(in), | optional | :: | reverse |
bitset_large_ord_sort( array )
sorts the input ARRAY
of type type(bitset_large)
using a hybrid sort based on the "Rust" sort
algorithm found in slice.rs
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(bitset_large), | intent(inout) | :: | array(0:) | |||
type(bitset_large), | intent(out), | optional | :: | work(0:) | ||
logical, | intent(in), | optional | :: | reverse |
char_ord_sort( array )
sorts the input ARRAY
of type character(len=*)
using a hybrid sort based on the "Rust" sort
algorithm found in slice.rs
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(inout) | :: | array(0:) | |||
character(len=len), | intent(out), | optional | :: | work(0:) | ||
logical, | intent(in), | optional | :: | reverse |
dp_ord_sort( array )
sorts the input ARRAY
of type real(dp)
using a hybrid sort based on the "Rust" sort
algorithm found in slice.rs
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(inout) | :: | array(0:) | |||
real(kind=dp), | intent(out), | optional | :: | work(0:) | ||
logical, | intent(in), | optional | :: | reverse |
int16_ord_sort( array )
sorts the input ARRAY
of type integer(int16)
using a hybrid sort based on the "Rust" sort
algorithm found in slice.rs
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int16), | intent(inout) | :: | array(0:) | |||
integer(kind=int16), | intent(out), | optional | :: | work(0:) | ||
logical, | intent(in), | optional | :: | reverse |
int32_ord_sort( array )
sorts the input ARRAY
of type integer(int32)
using a hybrid sort based on the "Rust" sort
algorithm found in slice.rs
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int32), | intent(inout) | :: | array(0:) | |||
integer(kind=int32), | intent(out), | optional | :: | work(0:) | ||
logical, | intent(in), | optional | :: | reverse |
int64_ord_sort( array )
sorts the input ARRAY
of type integer(int64)
using a hybrid sort based on the "Rust" sort
algorithm found in slice.rs
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int64), | intent(inout) | :: | array(0:) | |||
integer(kind=int64), | intent(out), | optional | :: | work(0:) | ||
logical, | intent(in), | optional | :: | reverse |
int8_ord_sort( array )
sorts the input ARRAY
of type integer(int8)
using a hybrid sort based on the "Rust" sort
algorithm found in slice.rs
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int8), | intent(inout) | :: | array(0:) | |||
integer(kind=int8), | intent(out), | optional | :: | work(0:) | ||
logical, | intent(in), | optional | :: | reverse |
sp_ord_sort( array )
sorts the input ARRAY
of type real(sp)
using a hybrid sort based on the "Rust" sort
algorithm found in slice.rs
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=sp), | intent(inout) | :: | array(0:) | |||
real(kind=sp), | intent(out), | optional | :: | work(0:) | ||
logical, | intent(in), | optional | :: | reverse |
string_type_ord_sort( array )
sorts the input ARRAY
of type type(string_type)
using a hybrid sort based on the "Rust" sort
algorithm found in slice.rs
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(string_type), | intent(inout) | :: | array(0:) | |||
type(string_type), | intent(out), | optional | :: | work(0:) | ||
logical, | intent(in), | optional | :: | reverse |