-
Notifications
You must be signed in to change notification settings - Fork 189
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
Databox runtime retrieval #5709
Databox runtime retrieval #5709
Conversation
/// A list of all the mutable tags that have subitems | ||
using mutable_item_parent_tags = | ||
tmpl::remove_if<mutable_item_creation_tags, | ||
tmpl::not_<tmpl::bind<detail::has_subitems, tmpl::_1>>>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[optional] remove_if<..., not_<...>>
-> filter<..., ...>
. Similar a few times below.
DataBox<tmpl::list<Tags...>>::reset_compute_item() { | ||
// reference items do not need to be reset | ||
SPECTRE_ALWAYS_INLINE bool DataBox<tmpl::list<Tags...>>::reset_compute_item() { | ||
// reference items do not need to be reset, but it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"but it" what?
*val = 2.5; | ||
*str = "My Sample String 2"; | ||
}, | ||
make_not_null(&db::as_access(box))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't have as_access
, if I'm understanding the comment above correctly.
constexpr bool using_db_access = std::is_same_v<std::decay_t<T>, db::Access>; | ||
// INFO("test mutate apply"); | ||
// auto box = db::create< | ||
// db::AddSimpleTags< |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no other requested changes
7d4b056
to
949c549
Compare
I rebased and pushed fixups. Thanks for the reviews! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you have my permission to squash (including the additional request)
// reference items do not need to be reset, but it still needs to be handled | ||
// here. Partly just so we get an error if we are calling this function | ||
// incorrectly and because we need to call this function during resets | ||
// to get dependency tracking correctly. When compute tags depend on reference |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
...tracking correct when compute tags...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I squashed this change into the fixup. Waiting for @wthrowe before squashing the fixups in
949c549
to
93f2a23
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Squash.
93f2a23
to
b4cffe3
Compare
Squashed! Thank you again for the reviews! |
Proposed changes
This adds a method of getting a type-erased DataBox. Some retrieval errors become runtime, but this will allow us to move more code into cpp files, which will hopefully decrease compile time.
Upgrade instructions
Code review checklist
make doc
to generate the documentation locally intoBUILD_DIR/docs/html
.Then open
index.html
.code review guide.
bugfix
ornew feature
if appropriate.Further comments