Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix corner cases of combine_selection. #1038

Merged
merged 3 commits into from
Aug 20, 2024
Merged

Conversation

1uc
Copy link
Collaborator

@1uc 1uc commented Aug 5, 2024

No description provided.

@1uc 1uc mentioned this pull request Aug 5, 2024
@1uc 1uc marked this pull request as ready for review August 6, 2024 08:22
@@ -591,3 +591,54 @@ TEST_CASE("select_multiple_ors", "[hyperslab]") {
}
}
}

TEST_CASE("select_multiple_ors_edge_cases", "[hyperslab]") {
Copy link
Member

@alkino alkino Aug 6, 2024

Choose a reason for hiding this comment

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

what is the test here expecting not throw?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, these were to hunt down ways we can encounter a:

H5Scombine_select(lhs, Op::Or, rhs);

with invalid values for lhs and rhs. Note that only hyperslabs are valid. Critically, neither NONE nor ALL are considered a hyperslabs. There seems to be two ways we can end up with NONE selection by combining hyperslabs:

  1. We set the counts to {0, 0}.
  2. We use AND with two hyperslabs that have an empty intersection.

Case 1 can happen for lhs and rhs. Case 2 can only happen to lhs (but never rhs) when we combine a long chain with the existing slab.

I've been unable to create an ALL from RegularHyperSlab.

Copy link

codecov bot commented Aug 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.99%. Comparing base (e9492c1) to head (86cee41).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1038      +/-   ##
==========================================
+ Coverage   86.88%   86.99%   +0.10%     
==========================================
  Files         101      101              
  Lines        6008     6058      +50     
==========================================
+ Hits         5220     5270      +50     
  Misses        788      788              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@1uc 1uc merged commit a6e17bd into master Aug 20, 2024
37 checks passed
@1uc 1uc deleted the 1uc/fix-hyperslab-selection branch August 20, 2024 07:40
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.

3 participants