Skip to content

feat(triangulation): restore optional parallel insertion and removal - #121

Merged
acgetchell merged 2 commits into
mainfrom
fix/74-parallel-triangulation
Jul 23, 2026
Merged

feat(triangulation): restore optional parallel insertion and removal#121
acgetchell merged 2 commits into
mainfrom
fix/74-parallel-triangulation

Conversation

@acgetchell

@acgetchell acgetchell commented Jul 23, 2026

Copy link
Copy Markdown
Owner
  • add an opt-in CGAL/TBB production configuration
  • preserve lock-grid ownership across copies, moves, swaps, and snapshots
  • align Codecov line accounting with LCOV coverage

Summary by CodeRabbit

  • New Features

    • Added an opt-in build option to enable CGAL parallel triangulation via TBB.
    • Preserved lock-grid ownership/behavior across triangulation construction, copy, move, and detaching.
    • Added a dedicated parallel triangulation test run (including ASan parallel scenarios).
  • Documentation

    • Updated CI/CTest expectations and reference-suite entry counts.
    • Refined Coverage/Codecov guidance and clarified sanitizer behavior for parallel vs sequential runs.
  • Tests

    • Added a parallel triangulation test covering correctness and lock ownership semantics.
    • Added a public API compile-time compatibility check.
  • Chores

    • Updated Codecov parsing to treat partial LCOV branch hits as hits.

- add an opt-in CGAL/TBB production configuration
- preserve lock-grid ownership across copies, moves, swaps, and snapshots
- align Codecov line accounting with LCOV coverage
@acgetchell acgetchell self-assigned this Jul 23, 2026
@acgetchell
acgetchell enabled auto-merge July 23, 2026 01:45
@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 16f647dd-f504-49cb-a505-6711de405d34

📥 Commits

Reviewing files that changed from the base of the PR and between d4dabbe and 35b241e.

📒 Files selected for processing (4)
  • CMakeLists.txt
  • CMakePresets.json
  • README.md
  • tests/CMakeLists.txt

Walkthrough

The PR adds opt-in CGAL TBB support for parallel triangulation, introduces lock-grid-owning triangulation state, updates foliated triangulation operations and snapshots, adds dedicated tests, and aligns CTest, README, and Codecov configuration.

Changes

Parallel triangulation support

Layer / File(s) Summary
Build and test target wiring
CMakeLists.txt, CMakePresets.json, src/CMakeLists.txt, tests/CMakeLists.txt
Adds opt-in CGAL TBB configuration, removes direct TBB linkage from existing targets, enables the path in the ASAN preset, and registers a dedicated parallel triangulation test.
Lock-grid ownership state
include/Foliated_triangulation.hpp
Adds locking-box helpers and Delaunay_state to own, validate, transfer, and detach CGAL lock data structures.
Foliated triangulation integration
include/Foliated_triangulation.hpp
Routes construction, mutation, validation, collection, swapping, and snapshots through the wrapped triangulation state.
Parallel validation and contracts
tests/Parallel_triangulation_test.cpp, tests/Public_api_consumer.cpp, README.md, .codecov.yml
Adds compile-time and runtime ownership tests, updates documented CTest and sanitizer behavior, validates the public construction API, and configures LCOV partials as hits.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant ASAN
  participant CMake
  participant DelaunayState
  participant FoliatedTriangulation
  participant ParallelTest
  ASAN->>CMake: enable ENABLE_PARALLEL_TRIANGULATION
  CMake->>DelaunayState: configure CGAL::TBB_support
  ParallelTest->>DelaunayState: construct and transfer lock-owned state
  DelaunayState->>FoliatedTriangulation: provide wrapped triangulation
  FoliatedTriangulation->>DelaunayState: create detached snapshot
  ParallelTest->>FoliatedTriangulation: validate ownership and snapshot state
Loading

Possibly related issues

Possibly related PRs

Poem

Lock grids hold the points in place,
TBB gives threads a faster pace.
States move safely, snapshots clear,
Tests make every binding dear.
Parallel paths now build and run—
Triangulation’s work is done!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly reflects the main change: restoring optional parallel triangulation insertion and removal.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/74-parallel-triangulation

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 Checkov (3.3.8)
CMakePresets.json

Traceback (most recent call last):
File "/usr/local/bin/checkov", line 2, in
from checkov.main import Checkov
ModuleNotFoundError: No module named 'checkov'


Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@CMakeLists.txt`:
- Around line 138-144: Make the CGAL TBB dependency conditional on
ENABLE_PARALLEL_TRIANGULATION: move the CGAL::TBB_support availability guard and
any TBB discovery or parallel-test wiring into that option’s branch, while
allowing configuration to proceed without TBB when parallel triangulation is
disabled. Preserve the existing fatal error when parallel triangulation is
explicitly enabled but CGAL::TBB_support is unavailable.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: ee19c531-5c80-4b47-9a22-68486c7094c4

📥 Commits

Reviewing files that changed from the base of the PR and between c7d6a35 and d4dabbe.

📒 Files selected for processing (8)
  • .codecov.yml
  • CMakeLists.txt
  • README.md
  • include/Foliated_triangulation.hpp
  • src/CMakeLists.txt
  • tests/CMakeLists.txt
  • tests/Parallel_triangulation_test.cpp
  • tests/Public_api_consumer.cpp
💤 Files with no reviewable changes (1)
  • src/CMakeLists.txt

Comment thread CMakeLists.txt Outdated
- discover and register CGAL/TBB support only for parallel configurations
- retain parallel coverage under AddressSanitizer while TSAN covers the sequential path
@acgetchell
acgetchell merged commit a86decf into main Jul 23, 2026
13 checks passed
@acgetchell
acgetchell deleted the fix/74-parallel-triangulation branch July 23, 2026 03:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant