Skip to content

Comments

Add methods for checking coexistence, overlap, and prefix without overlap for AxisRef.#38134

Open
copybara-service[bot] wants to merge 1 commit intomainfrom
test_872818416
Open

Add methods for checking coexistence, overlap, and prefix without overlap for AxisRef.#38134
copybara-service[bot] wants to merge 1 commit intomainfrom
test_872818416

Conversation

@copybara-service
Copy link

Add methods for checking coexistence, overlap, and prefix without overlap for AxisRef.

This change introduces:

  • AxisRef::CanCoexist: Determines if two AxisRefs can be part of the same sharding.
  • AxisRef::Overlaps: Checks if two AxisRefs have an overlapping range.
  • AxisRef::GetPrefixWithoutOverlap: Returns the portion of an AxisRef that does not overlap with another.
  • SortAndMergeAxes: Sorts and merges a vector of AxisRefs.
  • TruncateAxesByRemovingOverlaps: Truncates a vector of AxisRefs based on overlaps with another set.

…rlap for AxisRef.

This change introduces:
-   `AxisRef::CanCoexist`: Determines if two AxisRefs can be part of the same sharding.
-   `AxisRef::Overlaps`: Checks if two AxisRefs have an overlapping range.
-   `AxisRef::GetPrefixWithoutOverlap`: Returns the portion of an AxisRef that does not overlap with another.
-   `SortAndMergeAxes`: Sorts and merges a vector of AxisRefs.
-   `TruncateAxesByRemovingOverlaps`: Truncates a vector of AxisRefs based on overlaps with another set.

PiperOrigin-RevId: 872818416
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.

0 participants