ADR 0084: escher::flatten_rows leaves the library for the tests (carried item (c) of 0.4)#
Status: Accepted under delegation (2026-10-29; GOVERNANCE.md, “Delegation of technical ADRs”), technical scope only. The item is the carried item (c) of 0.4 (the author’s recorded instruction of 2026-10-23: “fix with their own gate readings”); its placement as the second commit of M11a step 2 is the orchestrator’s delegated reconciliation of 2026-10-27. Its reading follows HD16, decided by the author on 2026-10-28 (static evidence plus the escher-path host reading of ADR 0024).
Date: 2026-10-29
Deciders: the AI assistant, on the author’s behalf (M11a, step carried-host-incidence-slack)
Amends: ADR 0038 (the store port’s file list:
flatten.cppis no longer a library file).Builds on: ADR 0061 (D13; its table listed
flatten_rowsas a region that cannot throw), PLAN 4.7.4 (every OpenMP region takes the thread count of the resources).
Context#
dyng::detail::escher::flatten_rows (cpp/src/hypergraph/escher/flatten.cpp) is the port of
ESCHER-GPU@abcf9b2’s flatten2DVector (utils/flatten.cpp), the CBST construct layout of a list
of rows, made in M8a’s transplant (ADR 0038). Its row copy ran in #pragma omp parallel for schedule(dynamic, 1024) without num_threads: the only OpenMP region of cpp/src that did not
take the thread count of the resources (PLAN 4.7.4), so on a resources::openmp(k) or
sequential() handle it would run on the OpenMP default team (every hardware thread). It never
ran in the library: no library code calls it (the host store and the device store lay out their
rows themselves); its only caller is the unit test cpp/tests/hypergraph/escher/cbst_host_test.cpp
(cpp/tests/parity/escher/cbst_graph_test.cpp names it in a comment and computes the layout
itself). The two alternatives of the step: give it the resources’ thread count (if slack_csr
adopted it), or move it out of the library. The slack_csr store of 0.4 (ADR 0086) does not use
the CBST construct layout.
Decision#
flatten_rowsmoves tocpp/tests/support/escher_flatten.hpp(dyng::test::flatten_rows, header-only, with the provenance lines ofutils/flatten.cppandinclude/utils.hpp), with the same layout, the same 64-bit total, the samecapacity_errorbeyondmax_slots(at mostINT_MAX). The rows are written in order: the layout does not depend on the order, and a test helper needs no region.cbst_host_test.cppkeeps both of its tests (the layout; the limit), now on the helper.cpp/src/hypergraph/escher/flatten.{hpp,cpp}are removed and the module’s source list no longer namesflatten.cpp; the escher README’s padding rule 1 names the helper.The transplant check (
parity/escher_port/transplant.py --check --rev <c1>) compares the generated files with M8a’s transplant commit and is not affected;rename_map.tomlkeeps itsflatten.cppentry, which describes that commit.
The evidence (HD16)#
Check |
Before ( |
After |
|---|---|---|
|
|
no |
Calls of |
0 in each of the three builds |
(no symbol) |
|
no |
no |
|
one: |
none |
|
7 tests pass |
7 tests pass |
Nothing in the library called the function, so no behaviour of the library changes. The removed
object changes the code placement of libdyng.so (the R030 lesson: on this JCC-erratum CPU a
neutral change moves readings by 2-8 %): its timing reading is part of the ADR 0024 reading of
the escher path in M11a step 5 (hypergraph.build and .apply on escher storage on sequential
and openmp-8, hypergraph.apply and triad_count.update on cuda; the bar 1.02 of HD16, a region
above it located and listed for the author, the D14 path).
Consequences#
Every OpenMP region of
cpp/srctakes the thread count of the resources (PLAN 4.7.4).libdyngno longer exports a function that nothing calls.