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

Add Contains to Sparse Pack #983

Merged
merged 6 commits into from
Dec 13, 2023
Merged

Add Contains to Sparse Pack #983

merged 6 commits into from
Dec 13, 2023

Conversation

Yurlungur
Copy link
Collaborator

@Yurlungur Yurlungur commented Dec 12, 2023

PR Summary

Syntactic sugar for

bool var_v_is_in_pack = (pack.GetUpperBoundHost(0, v()) >= 0);

This was suggested by @brryan in a downstream PR in Phoebus. I think it helps clarify the cases when we pack on many variables, of which only some are present.

PR Checklist

  • Code passes cpplint
  • New features are documented.
  • Adds a test for any bugs fixed. Adds tests for new features.
  • Code is formatted
  • Changes are summarized in CHANGELOG.md
  • Change is breaking (API, behavior, ...)
    • Change is additionally added to CHANGELOG.md in the breaking section
    • PR is marked as breaking
    • Short summary API changes at the top of the PR (plus optionally with an automated update/fix script)
  • CI has been triggered on Darwin for performance regression tests.
  • Docs build
  • (@lanl.gov employees) Update copyright on changed files

@Yurlungur Yurlungur self-assigned this Dec 12, 2023
@Yurlungur Yurlungur changed the title Add Exists to Sparse Pack Add Contains to Sparse Pack Dec 12, 2023
Copy link
Collaborator

@brryan brryan left a comment

Choose a reason for hiding this comment

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

One question but LGTM and I'll approve now.

src/interface/sparse_pack.hpp Outdated Show resolved Hide resolved
Copy link
Collaborator

@lroberts36 lroberts36 left a comment

Choose a reason for hiding this comment

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

This is a nice feature

src/interface/sparse_pack.hpp Outdated Show resolved Hide resolved
Copy link
Collaborator

@lroberts36 lroberts36 left a comment

Choose a reason for hiding this comment

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

LGTM

@Yurlungur Yurlungur enabled auto-merge December 12, 2023 23:31
@Yurlungur Yurlungur merged commit ba8a587 into develop Dec 13, 2023
49 checks passed
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.

4 participants