datastructs_kinds_mod Module

Module providing kind parameters and utility functions for numerical types.

Includes: - Predefined kind parameters for real and integer types - Utility subroutines like swap for integers and reals - Functions for formatting and parsing data Single precision real (≈32 bits), range: -3.40282347E+38 to 3.40282347E+38, smallest positive: 1.17549435E-38 Double precision real (≈64 bits), range: -1.7976931348623157E+308 to 1.7976931348623157E+308, smallest positive: 2.2250738585072014E-308 Quadruple precision real (≈128 bits) 1-byte integer, range: -128 to 127 2-byte integer, range: -32768 to 32767 4-byte integer, range: -2147483648 to 2147483647 8-byte integer, range: -9223372036854775808 to 9223372036854775807


Uses

  • module~~datastructs_kinds_mod~~UsesGraph module~datastructs_kinds_mod datastructs_kinds_mod iso_fortran_env iso_fortran_env module~datastructs_kinds_mod->iso_fortran_env

Used by

  • module~~datastructs_kinds_mod~~UsedByGraph module~datastructs_kinds_mod datastructs_kinds_mod module~datastructs_hash_mod datastructs_hash_mod module~datastructs_hash_mod->module~datastructs_kinds_mod module~datastructs_histograms_mod datastructs_histograms_mod module~datastructs_histograms_mod->module~datastructs_kinds_mod module~datastructs_lists_dynamical_list_mod datastructs_lists_dynamical_list_mod module~datastructs_lists_dynamical_list_mod->module~datastructs_kinds_mod module~datastructs_lists_fixed_list_mod datastructs_lists_fixed_list_mod module~datastructs_lists_fixed_list_mod->module~datastructs_kinds_mod module~datastructs_lists_mod datastructs_lists_mod module~datastructs_lists_mod->module~datastructs_kinds_mod module~datastructs_lists_mod->module~datastructs_lists_dynamical_list_mod module~datastructs_lists_mod->module~datastructs_lists_fixed_list_mod module~datastructs_maxheap_mod datastructs_maxheap_mod module~datastructs_lists_mod->module~datastructs_maxheap_mod module~datastructs_logger_mod datastructs_logger_mod module~datastructs_logger_mod->module~datastructs_kinds_mod module~datastructs_maxheap_mod->module~datastructs_kinds_mod module~datastructs_measures_mod datastructs_measures_mod module~datastructs_measures_mod->module~datastructs_kinds_mod module~datastructs_samplers_base_mod datastructs_samplers_base_mod module~datastructs_samplers_base_mod->module~datastructs_kinds_mod module~datastructs_samplers_btree_mod datastructs_samplers_btree_mod module~datastructs_samplers_btree_mod->module~datastructs_kinds_mod module~datastructs_samplers_btree_mod->module~datastructs_samplers_base_mod module~datastructs_samplers_mod datastructs_samplers_mod module~datastructs_samplers_mod->module~datastructs_kinds_mod module~datastructs_samplers_mod->module~datastructs_samplers_base_mod module~datastructs_samplers_rejection_maxheap_composition_mod datastructs_samplers_rejection_maxheap_composition_mod module~datastructs_samplers_rejection_maxheap_composition_mod->module~datastructs_kinds_mod module~datastructs_samplers_rejection_maxheap_composition_mod->module~datastructs_lists_mod module~datastructs_samplers_rejection_maxheap_composition_mod->module~datastructs_samplers_base_mod module~datastructs_samplers_rejection_maxheap_composition_mod->module~datastructs_samplers_btree_mod module~datastructs_samplers_rejection_maxheap_mod datastructs_samplers_rejection_maxheap_mod module~datastructs_samplers_rejection_maxheap_composition_mod->module~datastructs_samplers_rejection_maxheap_mod module~datastructs_samplers_rejection_maxheap_mod->module~datastructs_kinds_mod module~datastructs_samplers_rejection_maxheap_mod->module~datastructs_lists_mod module~datastructs_samplers_rejection_maxheap_mod->module~datastructs_samplers_base_mod module~datastructs_samplers_rejection_maxheap_two_classes_mod datastructs_samplers_rejection_maxheap_two_classes_mod module~datastructs_samplers_rejection_maxheap_two_classes_mod->module~datastructs_kinds_mod module~datastructs_samplers_rejection_maxheap_two_classes_mod->module~datastructs_lists_mod module~datastructs_samplers_rejection_maxheap_two_classes_mod->module~datastructs_samplers_base_mod module~datastructs_samplers_rejection_maxheap_two_classes_mod->module~datastructs_samplers_rejection_maxheap_mod module~datastructs_samplers_rejection_mod datastructs_samplers_rejection_mod module~datastructs_samplers_rejection_mod->module~datastructs_kinds_mod module~datastructs_samplers_rejection_mod->module~datastructs_lists_mod module~datastructs_samplers_rejection_mod->module~datastructs_samplers_base_mod module~datastructs_samplers_rejection_two_classes_mod datastructs_samplers_rejection_two_classes_mod module~datastructs_samplers_rejection_two_classes_mod->module~datastructs_kinds_mod module~datastructs_samplers_rejection_two_classes_mod->module~datastructs_lists_mod module~datastructs_samplers_rejection_two_classes_mod->module~datastructs_samplers_base_mod module~datastructs_samplers_rejection_two_classes_mod->module~datastructs_samplers_rejection_mod module~datastructs_mod datastructs_mod module~datastructs_mod->module~datastructs_hash_mod module~datastructs_mod->module~datastructs_histograms_mod module~datastructs_mod->module~datastructs_lists_mod module~datastructs_mod->module~datastructs_logger_mod module~datastructs_mod->module~datastructs_measures_mod module~datastructs_mod->module~datastructs_samplers_base_mod module~datastructs_mod->module~datastructs_samplers_mod proc~choose_sampler choose_sampler proc~choose_sampler->module~datastructs_samplers_btree_mod proc~choose_sampler->module~datastructs_samplers_rejection_maxheap_composition_mod proc~choose_sampler->module~datastructs_samplers_rejection_maxheap_mod proc~choose_sampler->module~datastructs_samplers_rejection_maxheap_two_classes_mod proc~choose_sampler->module~datastructs_samplers_rejection_mod proc~choose_sampler->module~datastructs_samplers_rejection_two_classes_mod

Variables

Type Visibility Attributes Name Initial
character(len=*), public, parameter :: fmt_general = '(*(g0,x))'

Default output formats for write operations General format

character(len=*), public, parameter :: fmt_comma = '(*(g0,","))'

Comma-separated


Interfaces

public interface swap

Generic interface for swapping values of different types.

  • private subroutine swap_int(a, b)

    Swap two integer values.

    Arguments

    Type IntentOptional Attributes Name
    integer(kind=i4), intent(inout) :: a

    First integer

    integer(kind=i4), intent(inout) :: b

    Second integer

  • private subroutine swap_real(a, b)

    Swap two real (double precision) values.

    Arguments

    Type IntentOptional Attributes Name
    real(kind=dp), intent(inout) :: a

    First real

    real(kind=dp), intent(inout) :: b

    Second real


Functions

public function choose_fmt_based_on(filename) result(fmt)

Select a format string based on the file extension.

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: filename

Input filename

Return Value character(len=:), allocatable

Chosen format

public function count_integers_from_string(str) result(count)

Count the number of integers in a string separated by spaces or commas.

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: str

Input string

Return Value integer(kind=i4)

Number of integers found


Subroutines

public subroutine list_ranges()

Print ranges for supported numeric types.

Arguments

None