@@ -199,8 +199,8 @@ ComponentInfo::~ComponentInfo()
199199void
200200ComponentInfo::serialize_comp (SST::Core::Serialization::serializer& ser)
201201{
202- ser& component;
203- ser& link_map;
202+ SST_SER ( component) ;
203+ SST_SER ( link_map) ;
204204 for ( auto it = subComponents.begin (); it != subComponents.end (); ++it ) {
205205 it->second .serialize_comp (ser);
206206 }
@@ -219,21 +219,21 @@ ComponentInfo::serialize_order(SST::Core::Serialization::serializer& ser)
219219
220220 // Serialize all my data except the component and link_map
221221
222- ser& const_cast <ComponentId_t&>(id_);
223- ser& parent_info;
224- ser& const_cast <std::string&>(name);
225- ser& const_cast <std::string&>(type);
222+ SST_SER ( const_cast <ComponentId_t&>(id_) );
223+ SST_SER ( parent_info) ;
224+ SST_SER ( const_cast <std::string&>(name) );
225+ SST_SER ( const_cast <std::string&>(type) );
226226
227227 // Not used after construction, no need to serialize
228- // ser& params;
228+ // SST_SER( params) ;
229229
230- ser& defaultTimeBase;
230+ SST_SER ( defaultTimeBase) ;
231231
232- // ser& coordinates;
233- ser& subIDIndex;
234- ser& const_cast <std::string&>(slot_name);
235- ser& slot_num;
236- ser& share_flags;
232+ // SST_SER( coordinates) ;
233+ SST_SER ( subIDIndex) ;
234+ SST_SER ( const_cast <std::string&>(slot_name) );
235+ SST_SER ( slot_num) ;
236+ SST_SER ( share_flags) ;
237237
238238 // Serialize statistic data structures - only needed for late stat registration
239239 // No one else has these pointers so serialize the data structure & reallocate on UNPACK
@@ -243,39 +243,39 @@ ComponentInfo::serialize_order(SST::Core::Serialization::serializer& ser)
243243 std::map<std::string, StatisticId_t> enabled_stat_names;
244244 bool is_null = true ;
245245
246- ser& is_null;
246+ SST_SER ( is_null) ;
247247 if ( !is_null ) {
248- ser& stat_configs;
248+ SST_SER ( stat_configs) ;
249249 stat_configs_ = new std::map<StatisticId_t, ConfigStatistic>(stat_configs);
250250 }
251251
252- ser& is_null;
252+ SST_SER ( is_null) ;
253253 if ( !is_null ) {
254- ser& all_stat_config;
254+ SST_SER ( all_stat_config) ;
255255 all_stat_config_ = new ConfigStatistic (all_stat_config);
256256 }
257257
258- ser& is_null;
258+ SST_SER ( is_null) ;
259259 if ( !is_null ) {
260- ser& enabled_stat_names;
260+ SST_SER ( enabled_stat_names) ;
261261 enabled_stat_names_ = new std::map<std::string, StatisticId_t>(enabled_stat_names);
262262 }
263263 }
264264 else {
265265 bool is_null = stat_configs_ == nullptr ;
266- ser& is_null;
267- if ( !is_null ) ser& (*stat_configs_);
266+ SST_SER ( is_null) ;
267+ if ( !is_null ) SST_SER (*stat_configs_);
268268
269269 is_null = all_stat_config_ == nullptr ;
270- ser& is_null;
271- if ( !is_null ) ser& (*all_stat_config_);
270+ SST_SER ( is_null) ;
271+ if ( !is_null ) SST_SER (*all_stat_config_);
272272
273273 is_null = enabled_stat_names_ == nullptr ;
274- ser& is_null;
275- if ( !is_null ) ser& (*enabled_stat_names_);
274+ SST_SER ( is_null) ;
275+ if ( !is_null ) SST_SER (*enabled_stat_names_);
276276 }
277277
278- ser& statLoadLevel; // Potentially needed for late stat registration
278+ SST_SER ( statLoadLevel) ; // Potentially needed for late stat registration
279279
280280 // For SubComponents map, need to serialize map by hand since we
281281 // we will need to use the track non-pointer as pointer feature in
@@ -284,48 +284,7 @@ ComponentInfo::serialize_order(SST::Core::Serialization::serializer& ser)
284284 // own SubCompenents that will need to point to the data location
285285 // in the map.
286286
287- // ser& subComponents;
288- switch ( ser.mode () ) {
289- case SST::Core::Serialization::serializer::SIZER:
290- {
291- size_t size = subComponents.size ();
292- ser& size;
293- for ( auto it = subComponents.begin (); it != subComponents.end (); ++it ) {
294- // keys are const values - annoyingly
295- ser& const_cast <ComponentId_t&>(it->first );
296- ser | it->second ;
297- }
298- break ;
299- }
300- case SST::Core::Serialization::serializer::PACK:
301- {
302- size_t size = subComponents.size ();
303- ser& size;
304- for ( auto it = subComponents.begin (); it != subComponents.end (); ++it ) {
305- // keys are const values - annoyingly
306- ser& const_cast <ComponentId_t&>(it->first );
307- ser | it->second ;
308- }
309- break ;
310- }
311- case SST::Core::Serialization::serializer::UNPACK:
312- {
313- size_t size;
314- ser& size;
315- for ( size_t i = 0 ; i < size; ++i ) {
316- ComponentId_t key;
317- ser& key;
318-
319- auto p = subComponents.emplace (key, ComponentInfo {});
320-
321- ser | p.first ->second ;
322- }
323- break ;
324- }
325- case SST::Core::Serialization::serializer::MAP:
326- // Add your code here
327- break ;
328- }
287+ SST_SER (subComponents, SerOption::as_ptr_elem);
329288
330289 // Only the parent Component will call serialize_comp directly.
331290 // This function will walk the hierarchy and call it on all of its
0 commit comments