GBTOlib: library for evaluation of molecular integrals in mixed Gaussian / B-spline basis 111
Loading...
Searching...
No Matches
sort_gbl Module Reference

Data Types

interface  cfp_sort_float_int_1d
interface  sort_int_1d

Functions/Subroutines

subroutine, public sort_float (n, d2, arr)
 todo OpenMP parallelize the routines below
subroutine, public heap_sort_int_float (n, arr, brr)
 Heap-sorts the first n elements of the array arr and simultaneously the array brr. Array arr(:) is the list of integers and the array brr(:) is the list of floats.
subroutine, public sort_int_float (n, d2, arr, brr)
 Sorts the first n elements of the array arr and simultaneously the array brr. Array arr(:,d2) is the list of integers and the array brr(:,d2) is the list of floats.
subroutine, public sort_float_int (n, d2, arr, brr)
 Sorts the first n elements of the array arr and simultaneously the array brr. Array arr(:,d2) is the list of floats and the array brr(:,d2) is the list of integers.
subroutine, public sort_int_int (n, d2, arr, brr)
 Sorts the first n elements of the array arr and simultaneously the array brr. Array arr(:,d2) is the list of integers and the array brr(:,d2) is the list of integers.
subroutine, public multiway_merge_float_int (nelem, reals, ints, sizes, scratch_prefix_opt)
 Merge sorted arrays.

Function/Subroutine Documentation

◆ heap_sort_int_float()

subroutine, public sort_gbl::heap_sort_int_float ( integer n,
integer, dimension(:), intent(inout) arr,
real(kind=cfp), dimension(:), intent(inout) brr )

Heap-sorts the first n elements of the array arr and simultaneously the array brr. Array arr(:) is the list of integers and the array brr(:) is the list of floats.

◆ multiway_merge_float_int()

subroutine, public sort_gbl::multiway_merge_float_int ( integer, intent(in) nelem,
real(cfp), dimension(:), intent(inout) reals,
integer, dimension(:), intent(inout) ints,
integer, dimension(:), intent(in) sizes,
character(len=*), intent(in), optional scratch_prefix_opt )

Merge sorted arrays.

Authors
J Benda
Date
2025

On input, this subroutine expect real and integer arrays reals and ints of length n that consist of consecutive chunks presorted (in acending way) on ints. The subroutine will make a copy of both these arrays and then perform multiway merge of the presorted chunks into the original storage.

If non-empty scratch_prefix_opt is provided on input, the copy of the arrays will be mapped to disk prefixed with the given location. Anonymous mapping (i.e., plain allocation) is used otherwise.

Parameters
[in]nelemLength of the arrays floats and ints.
[in,out]realsArray of reals.
[in,out]intsArray if integers.
[in]sizesLengths of presorted chunks (according to ints).
[in]scratch_prefix_optOptional prefix of temporary scratch files.

◆ sort_float()

subroutine, public sort_gbl::sort_float ( integer n,
integer d2,
real(kind=cfp), dimension(:,:), intent(inout) arr )

todo OpenMP parallelize the routines below

Sorts the first n elements of the floating point array arr(:,d2).

◆ sort_float_int()

subroutine, public sort_gbl::sort_float_int ( integer n,
integer d2,
real(kind=cfp), dimension(:,:), intent(inout) arr,
integer, dimension(:,:), intent(inout) brr )

Sorts the first n elements of the array arr and simultaneously the array brr. Array arr(:,d2) is the list of floats and the array brr(:,d2) is the list of integers.

◆ sort_int_float()

subroutine, public sort_gbl::sort_int_float ( integer n,
integer d2,
integer, dimension(:,:), intent(inout) arr,
real(kind=cfp), dimension(:,:), intent(inout) brr )

Sorts the first n elements of the array arr and simultaneously the array brr. Array arr(:,d2) is the list of integers and the array brr(:,d2) is the list of floats.

◆ sort_int_int()

subroutine, public sort_gbl::sort_int_int ( integer n,
integer d2,
integer, dimension(:,:), intent(inout) arr,
integer, dimension(:,:), intent(inout) brr )

Sorts the first n elements of the array arr and simultaneously the array brr. Array arr(:,d2) is the list of integers and the array brr(:,d2) is the list of integers.