Forces the Feistel round count. Test-only. n <= 0 restores the compiled-in value.
Public because it has to be: the value lives in Fortran, and this module reaches no bind(C)
surface, so the C++-side debug-hook convention the rest of the library uses is unavailable
here. See CLAUDE.md, "A Fortran-side debug hook has to be PUBLIC, so prefer a C++ one".
It is load-bearing rather than convenient, and that is a consequence of the exact path.
Every m small enough to enumerate all m! permutations of is also small enough to be
answered exactly, so the shipped kernel is uniform by construction at exactly the sizes an
exhaustive test can reach -- and an exhaustive test that can only ever confirm a construction
proves nothing about the round count. Forcing the count (with
parquet_debug_set_perm_force_feistel, which sends those sizes back through the network) is
the only way a test can still show that 16 rounds is clean where 4, 8 and 12 are not.
It is excluded from README.md's API overview, no library code calls it, and it has no
counterpart in the public contract: pf_random_perm_algorithm names the compiled-in count,
and this does not change that string.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | n |
rounds to force; |
subroutine parquet_debug_set_perm_rounds(n) integer, intent(in) :: n !! rounds to force; `<= 0` restores the default if (n <= 0) then perm_dbg_rounds = 0 else perm_dbg_rounds = min(n, perm_rounds) end if end subroutine parquet_debug_set_perm_rounds