parquet_debug_random_bulk_threads Function

public function parquet_debug_random_bulk_threads(n, threads) result(nth)

Exposes random_threads for testing. Test-only; no library code calls it.

Public because the rule it reports lives behind a private procedure in a module with no bind(C) surface, so the C++-side debug-hook convention this library prefers is unavailable here -- the same position parquet_debug_string_bulk_threads is in, and this mirrors it deliberately rather than inventing a second shape. See CLAUDE.md, "A Fortran-side debug hook has to be PUBLIC, so prefer a C++ one".

It RE-COMPUTES the rule rather than reporting what a call did, which is the same limitation the string-column hook has and is worth stating: it can assert that parquet_set_random_parallel_min_elements changes the answer, and it cannot assert that the fill went on to honour that answer. The bit-identity of the 1-thread and N-thread results is what the suite checks instead, and bench/probe_random_perm.f90 --mode=floor is what shows the threading actually happens. See feature_risks.md Risk-111.

Arguments

Type IntentOptional Attributes Name
integer(kind=int64), intent(in) :: n

elements a bulk call would produce

integer, intent(in), optional :: threads

the caller's request, if any

Return Value integer


Source Code

    integer function parquet_debug_random_bulk_threads(n, threads) result(nth)
        integer(int64), intent(in) :: n             !! elements a bulk call would produce
        integer, intent(in), optional :: threads    !! the caller's request, if any
        nth = random_threads(n, threads)
    end function parquet_debug_random_bulk_threads