dbcsr_toollib Module

Tools usually found in a standard library.



Contents


Variables

TypeVisibilityAttributesNameInitial
character(len=*), private, parameter:: moduleN ='dbcsr_toollib'

Interfaces

public interface swap

  • private elemental subroutine iswap(a, b)

    Swaps two integers

    Arguments

    TypeIntentOptionalAttributesName
    integer, intent(inout) :: a

    Integers to swap Integers to swap

    integer, intent(inout) :: b

    Integers to swap Integers to swap

  • private elemental subroutine bswap(a, b)

    Swaps two logicals

    Arguments

    TypeIntentOptionalAttributesName
    logical, intent(inout) :: a

    Logicals to swap Logicals to swap

    logical, intent(inout) :: b

    Logicals to swap Logicals to swap

public interface sort

  • public subroutine dbcsr_1d_i4_sort(arr, n, indices)

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

    Arguments

    TypeIntentOptionalAttributesName
    integer(kind=int_4), intent(inout), dimension(1:n):: arr

    the array to sort

    integer, intent(in) :: n

    length of array

    integer, intent(out), dimension(1:n):: indices

    returns elements-indices before the sort

  • public subroutine dbcsr_1d_i8_sort(arr, n, indices)

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

    Arguments

    TypeIntentOptionalAttributesName
    integer(kind=int_8), intent(inout), dimension(1:n):: arr

    the array to sort

    integer, intent(in) :: n

    length of array

    integer, intent(out), dimension(1:n):: indices

    returns elements-indices before the sort

  • public subroutine dbcsr_1d_s_sort(arr, n, indices)

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

    Arguments

    TypeIntentOptionalAttributesName
    real(kind=real_4), intent(inout), dimension(1:n):: arr

    the array to sort

    integer, intent(in) :: n

    length of array

    integer, intent(out), dimension(1:n):: indices

    returns elements-indices before the sort

  • public subroutine dbcsr_1d_d_sort(arr, n, indices)

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

    Arguments

    TypeIntentOptionalAttributesName
    real(kind=real_8), intent(inout), dimension(1:n):: arr

    the array to sort

    integer, intent(in) :: n

    length of array

    integer, intent(out), dimension(1:n):: indices

    returns elements-indices before the sort


Functions

public elemental function make_coordinate_tuple(most, least) result(tuple)

Arguments

TypeIntentOptionalAttributesName
integer, intent(in) :: most
integer, intent(in) :: least

Return Value integer(kind=int_8)

public elemental function gcd(a, b)

Arguments

TypeIntentOptionalAttributesName
integer, intent(in) :: a
integer, intent(in) :: b

Return Value integer

public elemental function lcm(a, b)

Arguments

TypeIntentOptionalAttributesName
integer, intent(in) :: a
integer, intent(in) :: b

Return Value integer

public function joaat_hash(key) result(hash_index)

generates the hash of a string and the index in the table

Read more…

Arguments

TypeIntentOptionalAttributesName
integer, intent(in), DIMENSION(:):: key

Return Value integer

public function atoi(a)

Arguments

TypeIntentOptionalAttributesName
character(len=*), intent(in) :: a

Return Value integer

public function atol(a)

Arguments

TypeIntentOptionalAttributesName
character(len=*), intent(in) :: a

Return Value logical

public function ator(a)

Arguments

TypeIntentOptionalAttributesName
character(len=*), intent(in) :: a

Return Value real(kind=real_8)


Subroutines

private elemental subroutine iswap(a, b)

Swaps two integers

Arguments

TypeIntentOptionalAttributesName
integer, intent(inout) :: a

Integers to swap Integers to swap

integer, intent(inout) :: b

Integers to swap Integers to swap

private elemental subroutine bswap(a, b)

Swaps two logicals

Arguments

TypeIntentOptionalAttributesName
logical, intent(inout) :: a

Logicals to swap Logicals to swap

logical, intent(inout) :: b

Logicals to swap Logicals to swap

public subroutine dbcsr_unpack_i8_2i4(merged, array_upper, array_lower)

Splits an array of int8 values into two int4 arrays.

Arguments

TypeIntentOptionalAttributesName
integer(kind=int_8), intent(in), DIMENSION(:):: merged

array of merged values

integer(kind=int_4), intent(out), DIMENSION(:):: array_upper

array to fill with the upper bytes of the merged values array to fill with the lower bytes of the merged values

integer(kind=int_4), intent(out), DIMENSION(:):: array_lower

array to fill with the upper bytes of the merged values array to fill with the lower bytes of the merged values

public pure subroutine ordered_search(array, key, loc, found, lb, ub)

search a value in an ordered array of indices

Arguments

TypeIntentOptionalAttributesName
integer, intent(in), DIMENSION(:):: array
integer, intent(in) :: key
integer, intent(out) :: loc
logical, intent(out) :: found
integer, intent(in), optional :: lb
integer, intent(in), optional :: ub