Support reading Array/Matrix/Tensor<int> in OptionsAdios2#3207
Merged
Conversation
- Replaces half-implemented integrated tests - Ensure `engine` is always created before use - Ensure `io` is always created before use
bendudson
reviewed
Nov 21, 2025
| } | ||
| if (type == adios2::GetType<long double>()) { | ||
| return readVariable<long double>(reader, io, name, type); | ||
| } |
Contributor
There was a problem hiding this comment.
Why no macro magic? This feels like there must be a better solution e.g. visitor pattern, but this will work.
Member
Author
There was a problem hiding this comment.
Oh, I didn't really mean to leave this in, I was just searching for a neater non-macro solution, but didn't find one. Here's where template for would be really useful!
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.
Although writing was supported, we didn't actually support reading these types. I've refactored the implementation to reduce a lot of duplication in calculating/setting the Adios2 starts/counts etc.
Also fixes a bug with reading/writing
FieldPerpI've also replaced the integrated test with a more comprehensive unit test. We still don't test in parallel, but this is better than nothing.
Some of this would be nicer with C++26's
template for. Maybe we can use that in a few years.