Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/sst/core/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ sst_core_sources = \
serialization/serializer.cc \
serialization/statics.cc \
serialization/impl/mapper.cc \
serialization/impl/serialize_array.cc \
sstinfo.h \
interfaces/TestEvent.cc \
interfaces/stdMem.cc \
Expand Down
11 changes: 2 additions & 9 deletions src/sst/core/serialization/impl/mapper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@

#include <iostream>

namespace SST {
namespace Core {
namespace Serialization {
namespace pvt {
namespace SST::Core::Serialization::pvt {

void
ser_mapper::map_primitive(const std::string& name, ObjectMap* map)
Expand Down Expand Up @@ -83,8 +80,4 @@ ser_mapper::setNextObjectReadOnly()
next_item_read_only = true;
}


} // namespace pvt
} // namespace Serialization
} // namespace Core
} // namespace SST
} // namespace SST::Core::Serialization::pvt
37 changes: 37 additions & 0 deletions src/sst/core/serialization/impl/serialize_array.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
// Copyright 2009-2025 NTESS. Under the terms
// of Contract DE-NA0003525 with NTESS, the U.S.
// Government retains certain rights in this software.
//
// Copyright (c) 2009-2025, NTESS
// All rights reserved.
//
// This file is part of the SST software package. For license
// information, see the LICENSE file in the top level directory of the
// distribution.

#include "sst_config.h"

#include "sst/core/serialization/serialize.h"

namespace SST::Core::Serialization::pvt {

void
serialize_array(
serializer& ser, void* data, size_t size, void serialize_array_element(serializer& ser, void* data, size_t index))
{
for ( size_t index = 0; index < size; ++index )
serialize_array_element(ser, data, index);
}

void
serialize_array_map(
serializer& ser, void* data, size_t size, ObjectMap* map,
void serialize_array_map_element(serializer& ser, void* data, size_t index, const std::string& name))
{
ser.mapper().map_hierarchy_start(ser.getMapName(), map);
for ( size_t index = 0; index < size; ++index )
serialize_array_map_element(ser, data, index, std::to_string(index));
ser.mapper().map_hierarchy_end();
}

} // namespace SST::Core::Serialization::pvt
Loading
Loading