gdata_io_t Derived Type

type, public :: gdata_io_t


Contents

Source Code


Components

Type Visibility Attributes Name Initial
integer, private :: gdata_size = 0
integer, private :: fvals_start
integer, private :: fvals_end
integer, private :: max_ratio_start
integer, private :: max_ratio_end
integer, private :: apvals_start
integer, private :: apvals_end

Type-Bound Procedures

procedure, public, :: init_gdata_io

  • private subroutine init_gdata_io(this, t_aas, t_ms, t_ap, fvals_size_in, max_ratio_size_in, apvals_size_in)

    Arguments

    Type IntentOptional Attributes Name
    class(gdata_io_t) :: this
    logical, intent(in) :: t_aas
    logical, intent(in) :: t_ms
    logical, intent(in) :: t_ap
    integer, intent(in) :: fvals_size_in
    integer, intent(in) :: max_ratio_size_in
    integer, intent(in) :: apvals_size_in

procedure, public, :: t_io

  • private function t_io(this) result(t_do_io)

    Arguments

    Type IntentOptional Attributes Name
    class(gdata_io_t), intent(in) :: this

    Return Value logical

procedure, public, :: entry_size

  • private function entry_size(this) result(e_size)

    Arguments

    Type IntentOptional Attributes Name
    class(gdata_io_t), intent(in) :: this

    Return Value integer

procedure, public, :: read_gdata

  • private subroutine read_gdata(this, gdata_buf, ndets, initial)

    Arguments

    Type IntentOptional Attributes Name
    class(gdata_io_t), intent(in) :: this
    real(kind=dp), intent(in) :: gdata_buf(:,:)
    integer, intent(in) :: ndets
    integer, intent(in), optional :: initial

procedure, public, :: write_gdata

  • private subroutine write_gdata(this, gdata_buf, ndets, initial, offset_)

    Arguments

    Type IntentOptional Attributes Name
    class(gdata_io_t), intent(inout) :: this
    real(kind=dp), intent(out) :: gdata_buf(:,:)
    integer, intent(in) :: ndets
    integer, intent(in), optional :: initial
    integer, intent(in), optional :: offset_

procedure, public, :: read_gdata_hdf5

  • private subroutine read_gdata_hdf5(this, gdata_buf, pos)

    Arguments

    Type IntentOptional Attributes Name
    class(gdata_io_t), intent(in) :: this
    integer(kind=hsize_t), intent(in) :: gdata_buf(:)
    integer, intent(in) :: pos

procedure, public, :: write_gdata_hdf5

  • private subroutine write_gdata_hdf5(this, gdata_buf, pos)

    Arguments

    Type IntentOptional Attributes Name
    class(gdata_io_t), intent(in) :: this
    integer(kind=hsize_t), intent(out) :: gdata_buf(:)
    integer, intent(in) :: pos

procedure, public, :: clone_gdata

  • private subroutine clone_gdata(this, gdata_buf, tmp_fvals_size, fvals_size, tmp_apvals_size, apvals_size, nsigns)

    Arguments

    Type IntentOptional Attributes Name
    class(gdata_io_t), intent(inout) :: this
    integer(kind=hsize_t), intent(inout), allocatable :: gdata_buf(:,:)
    integer, intent(in) :: tmp_fvals_size
    integer, intent(in) :: fvals_size
    integer, intent(in) :: tmp_apvals_size
    integer, intent(in) :: apvals_size
    integer(kind=int64), intent(in) :: nsigns

Source Code

    type gdata_io_t
        ! The gdata_io_t type does the transfer of global determinant data (gdata)
        ! to and from a popsfile. It contains the information on how the data is
        ! arranged in the popsfile and is the interface between the popsfile modules
        ! and the global_determinant_data module
        ! The read/write buffers themselves are not part of this class and are at
        ! the responsibility of the popsfile modules
        private
        ! size of the buffer per entry used for global data i/o
        integer :: gdata_size = 0
        ! ranges to read/write the data to in the buffer
        integer :: fvals_start, fvals_end
        integer :: max_ratio_start, max_ratio_end
        integer :: apvals_start, apvals_end
    contains
        ! initialization routine
        procedure :: init_gdata_io
        ! size per entry
        procedure :: entry_size, t_io
        ! write the read data to the global det data
        procedure :: write_gdata, read_gdata
#ifdef USE_HDF_
        ! hdf5 currently uses another output format
        procedure :: write_gdata_hdf5, read_gdata_hdf5
        ! isolate the dynamically sized part (i.e. the part depending on the number of runs
        procedure :: clone_gdata
#endif
    end type gdata_io_t