refactor(partition): ♻️ name the node-mask regimes instead of a bare bool - #252
Merged
Conversation
…bool
Replace `bool mask_is_private` with `enum class NodeMask { Shared, PerRank }`
across partition_cpusets and PartitionGroup. Type change only: Shared is the
old false, PerRank the old true, and no branch, default or assertion moves.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
diagonal-hamiltonian
requested review from
fpietra,
ludmilaasb and
robertodr
as code owners
August 20, 2026 09:07
robertodr
approved these changes
Aug 20, 2026
robertodr
enabled auto-merge (squash)
August 20, 2026 09:10
|
Docs preview: https://pr-252.monoprop-docs.pages.dev |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #252 +/- ##
=======================================
Coverage 97.70% 97.70%
=======================================
Files 14 14
Lines 742 742
Branches 98 98
=======================================
Hits 725 725
Misses 12 12
Partials 5 5
Flags with carried forward coverage won't be shown. Click here to find out more. |
|
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.



🤖 AI text below 🤖
Summary
Follow-up to #249, which shipped the cgroup placement fix with a
bool mask_is_privateparameter.This renames that parameter to
enum class NodeMask { Shared, PerRank }. No behaviour change.partition_cpusets(n, gi, gc, true)does not say at the call site which regimetruemeans, andthe safe default is spelled
false. The enum names both, and a third launcher regime would be anew enumerator rather than a second bool.
Changes
enum class NodeMask { Shared, PerRank }inCpuTopology.h.partition_cpusets's fourth parameter becomesNodeMask mask = NodeMask::Shared.PartitionGroup::node_mask_private_becomesNodeMask node_mask_;classify_node_masks_converts
masks_are_pairwise_disjoint'sboolat the call site. The predicate keeps itsboolreturn -- it answers a question about masks, not about policy.
/*mask_is_private=*/argument comments, which the enum value replaces.Every assertion and every test-case name is unchanged, and
grep -rn mask_is_private cpp/is empty.Checklist
docs/,CONTRIBUTING.md) if neededCHANGELOG/ release notes updated if applicableAI/LLM disclosure