parquet_debug_use_fortran_sort_engine Subroutine

public subroutine parquet_debug_use_fortran_sort_engine(on)

Test-only switch routing pf_argsort and friends to the Fortran engine, or back to C++.

Binds the oracle before it selects, so the C++ engine can never be selected unbound. That is why this procedure lives here and not beside dbg_fortran_engine: importing this module is the only way to reach it, and reaching it is the only way to clear the flag.

Both engines answer identically -- that is what the conformance tests assert -- so this changes timing and nothing else, which is exactly why it is a debug hook rather than a setting (parquet_settings admits a knob only when it changes how fast, how large or how loud the library runs, never what it ANSWERS).

Arguments

Type IntentOptional Attributes Name
logical, intent(in) :: on

.true. selects the Fortran engine.


Source Code

    subroutine parquet_debug_use_fortran_sort_engine(on)
        logical, intent(in) :: on !! .true. selects the Fortran engine.

        call parquet_argsort_bind_oracle(oracle_argsort, oracle_partial, oracle_nth, &
            oracle_is_sorted, oracle_runs, oracle_search, oracle_merge)
        ! The C++ engine reads the mirrored performance knobs and is not downstream of any reader or
        ! writer open, so this is where its copy is made current. See parquet_push_settings_to_cpp.
        call parquet_push_settings_to_cpp()
        call parquet_argsort_select_engine(on)
    end subroutine parquet_debug_use_fortran_sort_engine