Conversation
…port The two splitbit b_complement[SL_MAX_SPLITS][SL_MAX_BINS] stack arrays in robinson_foulds_distance() and robinson_foulds_info() would overflow the stack when compiled against TreeTools with SL_MAX_TIPS = 32768 (128 GB). Replace with std::vector<splitbit> sized to actual dimensions (b.n_splits * n_bins). These are serial per-pair paths (reportMatching = TRUE), so heap allocation cost is negligible. Also upgrade assert() to static_assert() in tree_distances.h for the int16 width checks — these now fire at compile time rather than silently passing in release builds.
All 7 serial per-pair distance functions in tree_distances.cpp now check for user interrupt every 1024 iterations of the outer split loop. This allows Ctrl+C to break long-running single-pair computations on large trees (e.g. 25 000 tips) that previously ran uninterruptibly. The LAP solver already had interrupt support (allow_interrupt = true).
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #193 +/- ##
==========================================
+ Coverage 95.78% 95.92% +0.13%
==========================================
Files 57 57
Lines 5508 5549 +41
==========================================
+ Hits 5276 5323 +47
+ Misses 232 226 -6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Performance benchmark results
|
Performance benchmark results
|
Performance benchmark results
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…port
The two splitbit b_complement[SL_MAX_SPLITS][SL_MAX_BINS] stack arrays in robinson_foulds_distance() and robinson_foulds_info() would overflow the stack when compiled against TreeTools with SL_MAX_TIPS = 32768 (128 GB).
Replace with std::vector sized to actual dimensions (b.n_splits * n_bins). These are serial per-pair paths (reportMatching = TRUE), so heap allocation cost is negligible.
Also upgrade assert() to static_assert() in tree_distances.h for the int16 width checks — these now fire at compile time rather than silently passing in release builds.