Skip to content

feat(hlscm): static Compute() overload with hierarchy tuning#97

Merged
csparker247 merged 2 commits into
developfrom
feat/hlscm-static-compute-tuning
Jun 15, 2026
Merged

feat(hlscm): static Compute() overload with hierarchy tuning#97
csparker247 merged 2 commits into
developfrom
feat/hlscm-static-compute-tuning

Conversation

@csparker247

Copy link
Copy Markdown
Member

Summary

  • Adds HierarchicalLSCM::Compute(mesh, PinMap, levelRatio, minCoarseVerts) — the static counterpart to configuring set_level_ratio() and set_min_coarse_vertices() on an instance. Validates the same constraints as the instance setters (levelRatio >= 2, minCoarseVerts >= 3) and forwards to ComputeImpl.
  • The original issue (feat: add static Compute() overloads accepting levelRatio and minCoarseVertices #68) also proposed an auto-pin shape Compute(mesh, levelRatio, minCoarseVerts). That signature collides with the still-present [[deprecated]] Compute(mesh, pin0Idx, pin1Idx) overload, so it is blocked on Remove 3.0-deprecated LSCM/HLSCM functions #96 (deprecated-function cleanup). Auto-pin users who need custom tuning continue to use the instance API.
  • Adapts to the PinMap interface introduced in PR feat(lscm): multi-pin UV constraints on ABLSCM and HLSCM #93Compute(mesh, pin0, pin1, levelRatio, minCoarseVerts) from the original issue became Compute(mesh, const PinMap&, levelRatio, minCoarseVerts).

Implementation notes

  • The new overload lives between the existing Compute(mesh, const PinMap&) and the deprecated 2-pin overload in HierarchicalLSCM.hpp.
  • single_include/OpenABF/OpenABF.hpp re-amalgamated.
  • conductor/tracks/A10/plan.md updated to record the PinMap adaptation and the Remove 3.0-deprecated LSCM/HLSCM functions #96 block on the auto-pin variant.

Test plan

  • OpenABF_TestParameterization — all 28 HLSCM tests pass, including two new tests:
    • HLSCM.StaticTuning_MatchesInstance — static overload output is bit-exact equal to instance-API output on a wavy 20×20 grid (forces multi-level hierarchy); pins land at their requested UVs.
    • HLSCM.StaticTuning_RejectsBadParameterslevelRatio < 2, minCoarseVerts < 3, and PinMap validation all throw std::invalid_argument.
  • Full ctest suite passes (6/6).
  • clang-format clean.

Closes track A10. Partially addresses #68 (blocked by #96).

🤖 Generated with Claude Code

Add `HierarchicalLSCM::Compute(mesh, PinMap, levelRatio, minCoarseVerts)`
so callers can use the static convenience API without constructing an
instance just to set non-default hierarchy parameters. Validates
`levelRatio >= 2` and `minCoarseVerts >= 3` to mirror the instance
setters.

The original GH issue (#68) also proposed an auto-pin variant
`Compute(mesh, levelRatio, minCoarseVerts)`. That signature collides
with the still-present `[[deprecated]] Compute(mesh, pin0Idx, pin1Idx)`
overload, so it is blocked on #96 (deprecated-function cleanup).

Tests cover static-vs-instance parity on a multi-level hierarchy and
the new parameter validation paths.

Closes track A10. Partially addresses #68 (blocked by #96).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@csparker247 csparker247 added the enhancement New feature or request label Jun 15, 2026
Address review feedback on PR #97:

- Reorder validation in the new static Compute() overload so
  ValidatePins runs before the levelRatio/minCoarseVerts checks,
  matching the existing Compute(mesh, PinMap) behavior.
- HLSCM.StaticTuning_MatchesInstance now probes BuildHierarchy with
  the test's chosen tuning and asserts >=2 levels before the static-
  vs-instance comparison, so a regression to single-level fallback
  surfaces explicitly rather than passing trivially.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@csparker247 csparker247 enabled auto-merge (squash) June 15, 2026 11:42
@csparker247 csparker247 merged commit bba44ef into develop Jun 15, 2026
16 checks passed
@csparker247 csparker247 deleted the feat/hlscm-static-compute-tuning branch June 15, 2026 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant