Skip to content

Fix use-after-move bug and optimize graph object passing in min_fill_…#15

Open
khalidDaoud wants to merge 4 commits intokit-algo:masterfrom
twinfer:master
Open

Fix use-after-move bug and optimize graph object passing in min_fill_…#15
khalidDaoud wants to merge 4 commits intokit-algo:masterfrom
twinfer:master

Conversation

@khalidDaoud
Copy link

Fix use-after-move bug and optimize graph object passing in min_fill_in.h

  • Fix undefined behavior in compute_cch_graph_order where tail was accessed after std::move due to indeterminate argument evaluation order.
  • Add missing std::move calls to avoid unnecessary deep copies of large graph structures during nested dissection.

…in.h

- Fix undefined behavior in `compute_cch_graph_order` where `tail` was accessed after `std::move` due to indeterminate argument evaluation order.
- Add missing `std::move` calls to avoid unnecessary deep copies of large graph structures during nested dissection.
- the basic factory's select_source_target_pairs method ignores the GeoPos argument and falls back to random selection, we enabled GeoPos
- Use O(N) single-pass linear scan to find geometric extremes instead of sorting, avoiding O(N) memory overhead.
- Fixes heap corruption/OOM on planet-scale graphs while maintaining high-quality geometric cuts.
Re-enable the optimization with conservative limit

  In min_fill_in.h:300-305, change:
  // if (big.size() == 1 && small.size() < 200000) {
  to:
  if (big.size() == 1 && small.size() < 10000) {  // Much smaller to prevent stack overflow
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