read_walker_block_buff Subroutine

private subroutine read_walker_block_buff(ds_ilut, ds_sgns, ds_gdata, block_start, block_size, bit_rep_width, temp_ilut, temp_sgns, gdata_buf)

Arguments

Type IntentOptional Attributes Name
integer(kind=hid_t), intent(in) :: ds_ilut
integer(kind=hid_t), intent(in) :: ds_sgns
integer(kind=hid_t), intent(in) :: ds_gdata
integer(kind=hsize_t), intent(in) :: block_start
integer(kind=hsize_t), intent(in) :: block_size
integer(kind=int32), intent(in) :: bit_rep_width
integer(kind=hsize_t), dimension(:, :) :: temp_ilut
integer(kind=hsize_t), dimension(:, :) :: temp_sgns
integer(kind=hsize_t), dimension(:, :) :: gdata_buf

Contents


Source Code

    subroutine read_walker_block_buff(ds_ilut, ds_sgns, ds_gdata, block_start, block_size, &
                                      bit_rep_width, temp_ilut, temp_sgns, gdata_buf)


        ! Read the walkers into the array spawnedparts2
        !
        ! N.B. This routine is quite sensitive to the particular structure
        !      of the bit representations determined in BitReps.F90
        !
        ! --> It would also be possible to read into scratch arrays, and then
        !     do some transferring.

        integer(hid_t), intent(in) :: ds_ilut, ds_sgns, ds_gdata
        integer(hsize_t), intent(in) :: block_start, block_size
        integer(int32), intent(in) :: bit_rep_width
        integer(hsize_t), dimension(:, :) :: temp_ilut, temp_sgns
        integer(hsize_t), dimension(:, :) :: gdata_buf
        integer :: gdata_size

#ifdef INT64_

        call read_2d_multi_chunk( &
            ds_ilut, temp_ilut, h5kind_to_type(int64, H5_INTEGER_KIND), &
            [int(bit_rep_width, hsize_t), block_size], &
            [0_hsize_t, block_start], &
            [0_hsize_t, 0_hsize_t])

        call read_2d_multi_chunk( &
            ds_sgns, temp_sgns, h5kind_to_type(dp, H5_REAL_KIND), &
            [int(tmp_lenof_sign, hsize_t), block_size], &
            [0_hsize_t, block_start], &
            [0_hsize_t, 0_hsize_t])

        gdata_size = size(gdata_buf, dim=1)
        if (gdata_size > 0) then
            call read_2d_multi_chunk( &
                ds_gdata, gdata_buf, h5kind_to_type(dp, H5_REAL_KIND), &
                [int(gdata_size, hsize_t), block_size], &
                [0_hsize_t, block_start], &
                [0_hsize_t, 0_hsize_t])
        end if

#else
        call stop_all("read_walker_block", "32-64bit conversion not yet implemented")
#endif

        ! TODO: Flags here!!!

    end subroutine read_walker_block_buff