-
Notifications
You must be signed in to change notification settings - Fork 35
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 auxiliary extensible params and state #1278
Conversation
e8200a5
to
918da58
Compare
918da58
to
56e237f
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.
Nice! LGTM, just a few minor comments.
src/corecel/data/UserInterface.cc
Outdated
{ | ||
//---------------------------------------------------------------------------// | ||
//! Default destructor. | ||
UserStateInterface::~UserStateInterface() = default; |
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.
Same here, is the out-of-line definition needed?
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.
This looks great, thanks @sethrj! The only thing I'm a little unsure about is the name User
; it definitely fits for the diagnostics, but maybe not as much when we're using this for the optical data.
Apparently 'aux.*' is verboten: https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file
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.
A couple User
s left (in case you want to replace them in #1280).
@@ -54,6 +55,7 @@ class CoreParams final : public ParamsDataInterface<CoreParamsData> | |||
using SPConstWentzelOKVI = std::shared_ptr<WentzelOKVIParams const>; | |||
using SPActionRegistry = std::shared_ptr<ActionRegistry>; | |||
using SPOutputRegistry = std::shared_ptr<OutputRegistry>; | |||
using SPUserRegistry = std::shared_ptr<AuxParamsRegistry>; |
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.
using SPUserRegistry = std::shared_ptr<AuxParamsRegistry>; | |
using SPAuxRegistry = std::shared_ptr<AuxParamsRegistry>; |
@@ -73,6 +74,7 @@ class GlobalTestBase : public Test | |||
|
|||
using SPActionRegistry = SP<ActionRegistry>; | |||
using SPOutputRegistry = SP<OutputRegistry>; | |||
using SPUserRegistry = SP<AuxParamsRegistry>; |
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.
using SPUserRegistry = SP<AuxParamsRegistry>; | |
using SPAuxRegistry = SP<AuxParamsRegistry>; |
For #886 it would be good to start storing state data alongside the core state rather than using the hacky stream store to make the params class mutable.
UserParamsInterface
UserParamsInterface
has a function for the params to create a state (it can be called multiple times with a memspace, stream ID, and size)UserParamsRegistry
holds an array of user params, each associated with aUserId
UserStateVec
is created alongside the core state and it holds the stream-local state corresponding to each user paramsUserStateData
helper class can wrap aFooStateData
(collection group)get
helper function for getting states from a userA follow-up PR refactors the optical data using this new change set.
Closes #392 .
Non-critical follow-on work: how to combine and output params data with the results of multiple states. Currently the states are unique pointers owned by the core state and created when we build the stepper, and outputs are usually shared pointers that are registered when the params are created. Maybe we should punt on the output for now (so we can get this into the optical state) and consider having a separate "multithread output" class, or using actions to integrate over the streams at the end of a run, or something...
The action diagnostic execution kernel looks like this: