-
Notifications
You must be signed in to change notification settings - Fork 74
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
Cereal for TestNode #419
Cereal for TestNode #419
Conversation
Finally ready for review when one of you get a chance. |
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 to me!
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.
👍
Thank you @dkeeney , this must have been a lot of interconnected work!
- please see the comments about commented-out tests
@@ -114,7 +114,7 @@ class Dimensions : public std::vector<UInt>, public Serializable { | |||
if (humanReadable && isInvalid()) ss << "(Invalid) "; | |||
return ss.str(); | |||
} | |||
|
|||
/**** | |||
CerealAdapter; |
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.
please rm if unused?
@@ -154,29 +154,21 @@ TEST_F(DimensionsTest, Overloads) { | |||
|
|||
} | |||
|
|||
// Dimensions object is treated as a vector<UInt32> by Cereal | |||
// so it is serializable without the save/load functions. | |||
/** |
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.
forgot to enable the test?
@@ -469,6 +502,12 @@ class Region : public Serializable { | |||
// common method used by both constructors | |||
// Can be called after nodespec_ has been set. | |||
void createInputsAndOutputs_(); | |||
void saveDims(std::map<std::string,Dimensions>& outDims, |
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.
nit, should have used saveDims_
, but that's ok.
This adds Cereal to the TestNode Region Implementation as the first plugin class.
However, a plugin cannot be tested without its corresponding Region class which wraps it so this includes the Region class as well. Instantiating a plugin using Cereal deserialization required some changes to the plugin interface, and corresponding changes to all plugins. As a consequence there are a lot of files changed but must of it are stubs and parallel routines for passing the Archive rather than a stream object.
Trying to keep from breaking the original save/load serialization was a challenge.