-
Notifications
You must be signed in to change notification settings - Fork 94
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
Generalize serialize to support more containers in a generalized way, and store mapping name in a stack stored in the serializer #1271
Generalize serialize to support more containers in a generalized way, and store mapping name in a stack stored in the serializer #1271
Conversation
CLANG-FORMAT TEST - PASSED |
CMAKE-FORMAT TEST - PASSED |
Status Flag 'Pre-Test Inspection' - - This Pull Request Requires Inspection... The code must be inspected by a member of the Team before Testing/Merging |
CLANG-FORMAT TEST - PASSED |
CMAKE-FORMAT TEST - PASSED |
Status Flag 'Pre-Test Inspection' - - This Pull Request Requires Inspection... The code must be inspected by a member of the Team before Testing/Merging |
CLANG-FORMAT TEST - PASSED |
CMAKE-FORMAT TEST - PASSED |
Status Flag 'Pre-Test Inspection' - - This Pull Request Requires Inspection... The code must be inspected by a member of the Team before Testing/Merging |
CLANG-FORMAT TEST - PASSED |
CMAKE-FORMAT TEST - PASSED |
This change now requires the macro to have a semicolon.
If we want to keep it this way, which would be my preference as well, the documentation should also reflect this change: |
@leekillough I am unable to compile sst-elements with these changes. Can you check on your side? |
CLANG-FORMAT TEST - PASSED |
CMAKE-FORMAT TEST - PASSED |
CLANG-FORMAT TEST - PASSED |
CMAKE-FORMAT TEST - PASSED |
Status Flag 'Pre-Test Inspection' - - This Pull Request Requires Inspection... The code must be inspected by a member of the Team before Testing/Merging |
Status Flag 'Pre-Test Inspection' - SUCCESS: The last commit to this Pull Request has been INSPECTED by label AT: PRE-TEST INSPECTED! Autotester is Removing Label; this inspection will remain valid until a new commit to source branch is performed. |
Status Flag 'Pull Request AutoTester' - Testing Jenkins Projects: Pull Request Auto Testing STARTING (click to expand)Build InformationTest Name: SST__AutotestGen2_NewFW_sst-test_OMPI-4.1.4_PY3.6_sst-elements
Build InformationTest Name: SST__AutotestGen2_NewFW_sst-test_OMPI-4.1.4_PY3.6_sst-elements_MR-2
Build InformationTest Name: SST__AutotestGen2_NewFW_sst-test_OMPI-4.1.4_PY3.6_sst-elements_MT-2
Build InformationTest Name: SST__AutotestGen2_NewFW_sst-test_OMPI-4.1.4_PY3.6_sst-macro_withsstcore
Build InformationTest Name: SST__AutotestGen2_NewFW_sst-test_OMPI-4.1.4_PY3.6_sst-core_Make-Dist
Build InformationTest Name: SST__AutotestGen2_NewFW_sst-test_Clang-Format_sst-core
Build InformationTest Name: SST__AutotestGen2_NewFW_OSX-14-XC15-ARM2_OMPI-4.1.6_PY3.10_sst-elements
Build InformationTest Name: SST__AutotestGen2_NewFW_OSX-14-XC15-ARM2_OMPI-4.1.6_PY3.10_sst-macro_withsstcore
Using Repos:
Pull Request Author: leekillough |
Status Flag 'Pull Request AutoTester' - Jenkins Testing: all Jobs PASSED Pull Request Auto Testing has PASSED (click to expand)Build InformationTest Name: SST__AutotestGen2_NewFW_sst-test_OMPI-4.1.4_PY3.6_sst-elements
Build InformationTest Name: SST__AutotestGen2_NewFW_sst-test_OMPI-4.1.4_PY3.6_sst-elements_MR-2
Build InformationTest Name: SST__AutotestGen2_NewFW_sst-test_OMPI-4.1.4_PY3.6_sst-elements_MT-2
Build InformationTest Name: SST__AutotestGen2_NewFW_sst-test_OMPI-4.1.4_PY3.6_sst-macro_withsstcore
Build InformationTest Name: SST__AutotestGen2_NewFW_sst-test_OMPI-4.1.4_PY3.6_sst-core_Make-Dist
Build InformationTest Name: SST__AutotestGen2_NewFW_sst-test_Clang-Format_sst-core
Build InformationTest Name: SST__AutotestGen2_NewFW_OSX-14-XC15-ARM2_OMPI-4.1.6_PY3.10_sst-elements
Build InformationTest Name: SST__AutotestGen2_NewFW_OSX-14-XC15-ARM2_OMPI-4.1.6_PY3.10_sst-macro_withsstcore
|
Status Flag 'Pre-Merge Inspection' - - This Pull Request Requires Inspection... The code must be inspected by a member of the Team before Testing/Merging |
All Jobs Finished; status = PASSED, However Inspection must be performed before merge can occur... |
5 similar comments
All Jobs Finished; status = PASSED, However Inspection must be performed before merge can occur... |
All Jobs Finished; status = PASSED, However Inspection must be performed before merge can occur... |
All Jobs Finished; status = PASSED, However Inspection must be performed before merge can occur... |
All Jobs Finished; status = PASSED, However Inspection must be performed before merge can occur... |
All Jobs Finished; status = PASSED, However Inspection must be performed before merge can occur... |
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.
@@ -71,7 +71,7 @@ SimpleDebugger::cmd_pwd(std::vector<std::string>& UNUSED(tokens)) | |||
void | |||
SimpleDebugger::cmd_ls(std::vector<std::string>& UNUSED(tokens)) | |||
{ | |||
std::vector<std::pair<std::string, SST::Core::Serialization::ObjectMap*>> vars = obj_->getVariables(); | |||
auto& vars = obj_->getVariables(); |
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 use auto here, but we can change it back in a future PR so we can get the majority of the changes merged.
Status Flag 'Pre-Merge Inspection' - SUCCESS: The last commit to this Pull Request has been INSPECTED AND APPROVED by [ feldergast ]! |
Status Flag 'Pull Request AutoTester' - Pull Request MUST BE MERGED MANUALLY BY Project Team - This Repo does not support Automerge |
In addition to the comments here, this PR:
serializer
class. The names can be pushed on and popped off the stack to support multiple recursion levels of serialization. A name will be pushed on the stack when theSST_SER()
macro is called, and then when serializations occur recursively, they will push another name (or no name if the current top name should be retained), etc., and when a serialization ends, the stack will be popped. The name does not need to be passed through the serialization function arguments, and the functions do not need to be duplicated with and without the name arguments.ser.getMapName()
will return the last name pushed on the stack. (Another name for these map name functions can be used if desired.)serialize_impl
to support more containers in a generalized wayserialize_impl
template for user-defined non-polymorphic classes much shorter, using the same code for pointers and non-pointersserialize_insertable.h
andserialize_utility.h
to support all sequenced and associative containers in one specializationstd::vector
,std::vector<bool>
,std::list
,std::deque
,std::map
,std::multimap
,std::set
,std::multiset
,std::unordered_map
,std::unordered_multimap
,std::unordered_set
,std::unordered_multiset
serialize_impl
partial specialization is selected based on the existence of class types and methods it depends on, such asvalue_type
,begin()
,end()
,push_back()
andinsert()
, rather than listing specific classes by nameserialize_adapter.h
to supportstd::stack
,std::queue
andstd::priority_queue
adapter classes as a pass-through serialization of the underlying containerserialize_tuple.h
to supportstd::tuple
andstd::pair
.