Routine for sorting an array

source: dbcsr_array_sort.FLoading...

Sorts an array inplace using a combination of merge- and bubble-sort. It also returns the indices, which the elements had before the sort.

REAL(real_8), |
INTENT(inout) |
:: | arr(1:n) | the array to sort | |

INTEGER, |
INTENT(in) |
:: | n | length of array | |

INTEGER, |
INTENT(out) |
:: | indices(1:n) | returns elements-indices before the sort |

INTEGER(int_4), |
INTENT(inout) |
:: | arr(1:n) | the array to sort | |

INTEGER, |
INTENT(in) |
:: | n | length of array | |

INTEGER, |
INTENT(out) |
:: | indices(1:n) | returns elements-indices before the sort |

INTEGER(int_8), |
INTENT(inout) |
:: | arr(1:n) | the array to sort | |

INTEGER, |
INTENT(in) |
:: | n | length of array | |

INTEGER, |
INTENT(out) |
:: | indices(1:n) | returns elements-indices before the sort |

REAL(real_4), |
INTENT(inout) |
:: | arr(1:n) | the array to sort | |

INTEGER, |
INTENT(in) |
:: | n | length of array | |

INTEGER, |
INTENT(out) |
:: | indices(1:n) | returns elements-indices before the sort |