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 TaggedTuple support to pypp #5748

Merged
merged 4 commits into from
Feb 19, 2024

Conversation

nilsdeppe
Copy link
Member

Proposed changes

This will be used for simplifying our python tests of boundary conditions.

Upgrade instructions

Code review checklist

  • The code is documented and the documentation renders correctly. Run
    make doc to generate the documentation locally into BUILD_DIR/docs/html.
    Then open index.html.
  • The code follows the stylistic and code quality guidelines listed in the
    code review guide.
  • The PR lists upgrade instructions and is labeled bugfix or
    new feature if appropriate.

Further comments

@nilsdeppe nilsdeppe requested a review from kidder February 9, 2024 14:47
Copy link
Member

@kidder kidder 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 that you can squash any changes if you decide to address it in any way

using packed_container = tuples::TaggedTuple<Tags...>;
// This assumes the first member of the TaggedTuple sets the packed
// type. I'm (Nils Deppe) not sure how else to handle this right now.
using packed_type =
Copy link
Member

Choose a reason for hiding this comment

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

so does this mean the tagged tuple must have the same packed_type for each element? Is there a way to static_assert this?

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't know how to check it (easily?) since other types are okay, as long as they aren't packed. I.e. if you want to pass in or out an int or double that's fine, it just can't be the first entry in the tuple. I don't know exactly how to assert this check since it's not different packed types that are bad.

Copy link
Member

Choose a reason for hiding this comment

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

okay, then I am fine with the PR being merged

@nilsdeppe nilsdeppe merged commit edea672 into sxs-collaboration:develop Feb 19, 2024
22 checks passed
@nilsdeppe nilsdeppe deleted the mhd_sound_speed_hll branch February 19, 2024 22:18
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.

2 participants