<commit_before>module proc_pointers

use const, only: i0, p, dp, lint
use determinants, only: det_info
use excitations, only: excit

implicit none

! Note that Intel compilers (at least 11.1) don't like having using a variable
! that's imported as a array size in abstract interfaces.

abstract interface
    subroutine i_decoder(f,d)
        use basis, only: basis_length
        import :: i0, det_info
        implicit none
        integer(i0), intent(in) :: f(basis_length)
        type(det_info), intent(inout) :: d
    end subroutine i_decoder
    subroutine i_update_proj_energy(idet)
        implicit none
        integer, intent(in) :: idet
    end subroutine i_update_proj_energy
    subroutine i_update_dmqmc_estimators(idet,excitation)
        import :: excit
        implicit none
        integer, intent(in) :: idet
        type(excit), intent(in) :: excitation
    end subroutine i_update_dmqmc_estimators
    subroutine i_spawner(d, parent_sign, nspawned, connection)
        import :: det_info, excit
        implicit none
        type(det_info), intent(in) :: d
        integer, intent(in) :: parent_sign
        integer, intent(out) :: nspawned
        type(excit), intent(out) :: connection
    end subroutine i_spawner
    subroutine i_gen_excit(d, pgen, connection, hmatel)
        import :: det_info, excit, p
        implicit none
        type(det_info), intent(in) :: d
        real(p), intent(out) :: pgen, hmatel
        type(excit), intent(out) :: connection
    end subroutine i_gen_excit
    subroutine i_gen_excit_finalise(d, connection, hmatel)
        import :: det_info, excit, p
        implicit none
        type(det_info), intent(in) :: d
        type(excit), intent(inout) :: connection
        real(p), intent(out) :: hmatel
    end subroutine i_gen_excit_finalise
    subroutine i_death(mat, pop, tot_pop, ndeath)
        import :: p, lint
        implicit none
        real(p), intent(in) :: mat
        integer, intent(inout) :: pop, ndeath
        integer(lint), intent(inout) :: tot_pop
    end subroutine i_death
    function i_sc0(f) result(hmatel)
        use basis, only: basis_length
        import :: p, i0
        implicit none
        real(p) :: hmatel
        integer(i0), intent(in) :: f(basis_length)
    end function i_sc0
    subroutine i_set_parent_flag(pop, f, flag)
        use basis, only: basis_length
        import :: i0
        implicit none
        integer, intent(in) :: pop
        integer(i0), intent(in) :: f(basis_length)
        integer, intent(out) :: flag
    end subroutine i_set_parent_flag
    subroutine i_create_spawned_particle(d, connection, nspawned, spawned_pop)
        import :: excit, det_info
        implicit none
        type(det_info), intent(in) :: d
        type(excit), intent(in) :: connection
        integer, intent(in) :: nspawned, spawned_pop
    end subroutine i_create_spawned_particle
    subroutine i_create_spawned_particle_dm(f1, f2, connection, nspawned, spawning_end)
        use basis, only: basis_length
        import :: excit, i0
        implicit none
        integer(i0), intent(in) :: f1(basis_length)
        integer(i0), intent(in) :: f2(basis_length)
        type(excit), intent(in) :: connection
        integer, intent(in) :: nspawned, spawning_end
    end subroutine i_create_spawned_particle_dm
    subroutine i_trial_fn(cdet, connection, hmatel)
        import :: det_info, excit, p
        type(det_info), intent(in) :: cdet
        type(excit), intent(in) :: connection
        real(p) :: hmatel
    end subroutine i_trial_fn

    ! generic procedures...
    subroutine i_sub()
    end subroutine i_sub

end interface

procedure(i_decoder), pointer :: decoder_ptr => null()
procedure(i_update_proj_energy), pointer :: update_proj_energy_ptr => null()
procedure(i_update_dmqmc_estimators), pointer :: update_dmqmc_energy_ptr => null()
procedure(i_update_dmqmc_estimators), pointer :: update_dmqmc_energy_squared_ptr => null()
procedure(i_update_dmqmc_estimators), pointer :: update_dmqmc_stag_mag_ptr => null()
procedure(i_update_dmqmc_estimators), pointer :: update_dmqmc_correlation_ptr => null()
procedure(i_spawner), pointer :: spawner_ptr => null()
procedure(i_gen_excit), pointer :: gen_excit_ptr => null()
procedure(i_gen_excit), pointer :: gen_excit_init_ptr => null()<commit_msg>minor bug fix (compile-time error): specify interface correctly.<commit_after>module proc_pointers

use const, only: i0, p, dp, lint
use determinants, only: det_info
use excitations, only: excit

implicit none

! Note that Intel compilers (at least 11.1) don't like having using a variable
! that's imported as a array size in abstract interfaces.

abstract interface
    subroutine i_decoder(f,d)
        use basis, only: basis_length
        import :: i0, det_info
        implicit none
        integer(i0), intent(in) :: f(basis_length)
        type(det_info), intent(inout) :: d
    end subroutine i_decoder
    subroutine i_update_proj_energy(idet)
        implicit none
        integer, intent(in) :: idet
    end subroutine i_update_proj_energy
    subroutine i_update_dmqmc_estimators(idet,excitation)
        import :: excit
        implicit none
        integer, intent(in) :: idet
        type(excit), intent(in) :: excitation
    end subroutine i_update_dmqmc_estimators
    subroutine i_spawner(d, parent_sign, nspawned, connection)
        import :: det_info, excit
        implicit none
        type(det_info), intent(in) :: d
        integer, intent(in) :: parent_sign
        integer, intent(out) :: nspawned
        type(excit), intent(out) :: connection
    end subroutine i_spawner
    subroutine i_gen_excit(d, pgen, connection, hmatel)
        import :: det_info, excit, p
        implicit none
        type(det_info), intent(in) :: d
        real(p), intent(out) :: pgen, hmatel
        type(excit), intent(out) :: connection
    end subroutine i_gen_excit
    subroutine i_gen_excit_finalise(d, connection, hmatel)
        import :: det_info, excit, p
        implicit none
        type(det_info), intent(in) :: d
        type(excit), intent(inout) :: connection
        real(p), intent(out) :: hmatel
    end subroutine i_gen_excit_finalise
    subroutine i_death(mat, pop, tot_pop, ndeath)
        import :: p, lint
        implicit none
        real(p), intent(in) :: mat
        integer, intent(inout) :: pop, ndeath
        integer(lint), intent(inout) :: tot_pop
    end subroutine i_death
    function i_sc0(f) result(hmatel)
        use basis, only: basis_length
        import :: p, i0
        implicit none
        real(p) :: hmatel
        integer(i0), intent(in) :: f(basis_length)
    end function i_sc0
    subroutine i_set_parent_flag(pop, f, flag)
        use basis, only: basis_length
        import :: i0
        implicit none
        integer, intent(in) :: pop
        integer(i0), intent(in) :: f(basis_length)
        integer, intent(out) :: flag
    end subroutine i_set_parent_flag
    subroutine i_create_spawned_particle(d, connection, nspawned, spawned_pop)
        import :: excit, det_info
        implicit none
        type(det_info), intent(in) :: d
        type(excit), intent(in) :: connection
        integer, intent(in) :: nspawned, spawned_pop
    end subroutine i_create_spawned_particle
    subroutine i_create_spawned_particle_dm(f1, f2, connection, nspawned, spawning_end)
        use basis, only: basis_length
        import :: excit, i0
        implicit none
        integer(i0), intent(in) :: f1(basis_length)
        integer(i0), intent(in) :: f2(basis_length)
        type(excit), intent(in) :: connection
        integer, intent(in) :: nspawned, spawning_end
    end subroutine i_create_spawned_particle_dm
    subroutine i_trial_fn(cdet, connection, hmatel)
        import :: det_info, excit, p
        type(det_info), intent(in) :: cdet
        type(excit), intent(in) :: connection
        real(p), intent(inout) :: hmatel
    end subroutine i_trial_fn

    ! generic procedures...
    subroutine i_sub()
    end subroutine i_sub

end interface

procedure(i_decoder), pointer :: decoder_ptr => null()
procedure(i_update_proj_energy), pointer :: update_proj_energy_ptr => null()
procedure(i_update_dmqmc_estimators), pointer :: update_dmqmc_energy_ptr => null()
procedure(i_update_dmqmc_estimators), pointer :: update_dmqmc_energy_squared_ptr => null()
procedure(i_update_dmqmc_estimators), pointer :: update_dmqmc_stag_mag_ptr => null()
procedure(i_update_dmqmc_estimators), pointer :: update_dmqmc_correlation_ptr => null()
procedure(i_spawner), pointer :: spawner_ptr => null()
procedure(i_gen_excit), pointer :: gen_excit_ptr => null()
procedure(i_gen_excit), pointer :: gen_excit_init_ptr => null()
{'fraction_non_alphanumeric': 0.0976733471550334, 'fraction_numerical': 0.004376871688551025, 'mean_word_length': 3.317752362008951, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4587499', 'n_tokens_mistral': 2896, 'n_tokens_neox': 2828, 'n_words': 695}