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

core: Simplify IO variable and attribute storage #2350

Merged
merged 7 commits into from
Jun 29, 2020

Conversation

bradking
Copy link
Collaborator

Flatten IO variable and attribute storage maps. Replace each two-layer map (and intermediate index) with one direct map. Map directly from the variable name (or attribute name) to the corresponding Variable<T> (or Attribute<T>) instance. Avoid using per-type maps by mapping to unique_ptr<VariableBase> (or unique_ptr<AttributeBase>) and statically downcast as needed.

This removes several uses of ADIOS2_FOREACH_* macros and likely enables removal of many more in future work.

Most of the implementation is common to all `Attribute<T>`.
Move it to `AttributeBase` and use virtual dispatch to get
the `T`-specific part.
Replace the per-type attribute map storing `Attribute<T>` with a single
map storing `unique_ptr<AttributeBase>` and downcast as needed.
Replace the per-type variable map storing `Variable<T>` with a single
map storing `unique_ptr<VariableBase>` and downcast as needed.
Replace the two-layer map and intermediate index with one direct map.
@chuckatkins chuckatkins merged commit 48dd42a into ornladios:master Jun 29, 2020
@bradking bradking deleted the io-storage branch June 29, 2020 14:34
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