diff --git a/src/sst/core/baseComponent.cc b/src/sst/core/baseComponent.cc index d098fad82..1d90a4ed6 100644 --- a/src/sst/core/baseComponent.cc +++ b/src/sst/core/baseComponent.cc @@ -919,9 +919,7 @@ BaseComponent::serialize_order(SST::Core::Serialization::serializer& ser) } } -namespace Core { -namespace Serialization { -namespace pvt { +namespace Core::Serialization::pvt { static const long null_ptr_id = -1; @@ -997,9 +995,6 @@ SerializeBaseComponentHelper::map_basecomponent(serializable_base*& s, serialize ser.mapper().map_hierarchy_end(); // obj_map } -} // namespace pvt -} // namespace Serialization -} // namespace Core - +} // namespace Core::Serialization::pvt } // namespace SST diff --git a/src/sst/core/baseComponent.h b/src/sst/core/baseComponent.h index fa075693d..1d41faeda 100644 --- a/src/sst/core/baseComponent.h +++ b/src/sst/core/baseComponent.h @@ -49,13 +49,9 @@ class TimeConverter; class UnitAlgebra; -namespace Core { -namespace Serialization { -namespace pvt { +namespace Core::Serialization::pvt { class SerializeBaseComponentHelper; -} // namespace pvt -} // namespace Serialization -} // namespace Core +} /** * Main component object for the simulation. @@ -1117,11 +1113,9 @@ class SubComponentSlotInfo } }; -namespace Core { -namespace Serialization { +namespace Core::Serialization { namespace pvt { - class SerializeBaseComponentHelper { public: @@ -1169,8 +1163,7 @@ class serialize_impl -namespace SST { -namespace Core { +namespace SST::Core { class PythonConfigGraphOutput : public ConfigGraphOutput { @@ -51,7 +50,6 @@ class PythonConfigGraphOutput : public ConfigGraphOutput std::map linkMap; }; -} // namespace Core -} // namespace SST +} // namespace SST::Core #endif // SST_CORE_PYTHON_CONFIG_OUTPUT_H diff --git a/src/sst/core/cfgoutput/xmlConfigOutput.h b/src/sst/core/cfgoutput/xmlConfigOutput.h index 10254feb6..2cb9efa2a 100644 --- a/src/sst/core/cfgoutput/xmlConfigOutput.h +++ b/src/sst/core/cfgoutput/xmlConfigOutput.h @@ -16,8 +16,7 @@ #include "sst/core/configGraph.h" #include "sst/core/configGraphOutput.h" -namespace SST { -namespace Core { +namespace SST::Core { class XMLConfigGraphOutput : public ConfigGraphOutput { @@ -30,7 +29,6 @@ class XMLConfigGraphOutput : public ConfigGraphOutput void generateXML(const std::string& indent, const ConfigLink* link, const ConfigComponentMap_t& compMap) const; }; -} // namespace Core -} // namespace SST +} // namespace SST::Core #endif // SST_CORE_XML_CONFIG_OUTPUT_H diff --git a/src/sst/core/componentInfo.h b/src/sst/core/componentInfo.h index 4e246ee35..81f865de2 100644 --- a/src/sst/core/componentInfo.h +++ b/src/sst/core/componentInfo.h @@ -34,13 +34,9 @@ class ConfigStatistic; class Simulation_impl; class TimeConverter; -namespace Core { -namespace Serialization { -namespace pvt { +namespace Core::Serialization::pvt { class SerializeBaseComponentHelper; -} // namespace pvt -} // namespace Serialization -} // namespace Core +} // namespace Core::Serialization::pvt class ComponentInfo { @@ -52,8 +48,7 @@ class ComponentInfo static const uint64_t SHARE_PORTS = 0x1; static const uint64_t SHARE_STATS = 0x2; static const uint64_t INSERT_STATS = 0x4; - - static const uint64_t SHARE_NONE = 0x0; + static const uint64_t SHARE_NONE = 0x0; private: // Mask to make sure users are only setting the flags that are diff --git a/src/sst/core/config.cc b/src/sst/core/config.cc index 0fc3be1ec..31454ce50 100644 --- a/src/sst/core/config.cc +++ b/src/sst/core/config.cc @@ -25,8 +25,6 @@ #include #include -using namespace std; - namespace SST { //// Helper class for setting options @@ -1197,7 +1195,7 @@ Config::checkArgsAfterParsing() bool -Config::setOptionFromModel(const string& entryName, const string& value) +Config::setOptionFromModel(const std::string& entryName, const std::string& value) { // Check to make sure option is settable in the SDL file if ( getAnnotation(entryName, 'S') ) { return setOptionExternal(entryName, value); } diff --git a/src/sst/core/configBase.cc b/src/sst/core/configBase.cc index f5cf196ed..50794a0ee 100644 --- a/src/sst/core/configBase.cc +++ b/src/sst/core/configBase.cc @@ -29,8 +29,6 @@ #define E_OK 0 #endif -using namespace std; - namespace SST { bool @@ -431,7 +429,7 @@ ConfigBase::parseCmdLine(int argc, char* argv[], bool ignore_unknown) bool -ConfigBase::setOptionExternal(const string& entryName, const string& value) +ConfigBase::setOptionExternal(const std::string& entryName, const std::string& value) { // NOTE: print outs in this function will not be suppressed for ( auto& option : options ) { diff --git a/src/sst/core/configGraph.cc b/src/sst/core/configGraph.cc index 300403bb0..4d516f703 100644 --- a/src/sst/core/configGraph.cc +++ b/src/sst/core/configGraph.cc @@ -26,8 +26,6 @@ #include #include -using namespace std; - namespace { // bool zero_latency_warning = false; @@ -931,7 +929,7 @@ ConfigGraph::findStatistic(StatisticId_t id) const ConfigGraph* ConfigGraph::getSubGraph(uint32_t start_rank, uint32_t end_rank) { - set rank_set; + std::set rank_set; for ( uint32_t i = start_rank; i <= end_rank; i++ ) { rank_set.insert(i); } @@ -1392,7 +1390,7 @@ PartitionComponent::print(std::ostream& os, const PartitionGraph* graph) const for ( ComponentIdMap_t::const_iterator git = group.begin(); git != group.end(); ++git ) { os << *git << " "; } - os << ")" << endl; + os << ")" << std::endl; os << " weight = " << weight << std::endl; os << " rank = " << rank.rank << std::endl; os << " thread = " << rank.thread << std::endl; diff --git a/src/sst/core/configShared.cc b/src/sst/core/configShared.cc index d5c6c1e8b..edd61472e 100644 --- a/src/sst/core/configShared.cc +++ b/src/sst/core/configShared.cc @@ -17,8 +17,6 @@ #include -using namespace std; - namespace SST { ConfigShared::ConfigShared(bool suppress_print, bool include_libpath, bool include_env, bool include_verbose) : diff --git a/src/sst/core/eli/attributeInfo.h b/src/sst/core/eli/attributeInfo.h index 0c476a15b..8c26e0bea 100644 --- a/src/sst/core/eli/attributeInfo.h +++ b/src/sst/core/eli/attributeInfo.h @@ -18,8 +18,7 @@ #include #include -namespace SST { -namespace ELI { +namespace SST::ELI { template struct GetAttributes @@ -70,8 +69,7 @@ class ProvidesAttributes std::vector attributes_; }; -} // namespace ELI -} // namespace SST +} // namespace SST::ELI // clang-format off #define SST_ELI_DOCUMENT_ATTRIBUTES(...) \ diff --git a/src/sst/core/eli/categoryInfo.h b/src/sst/core/eli/categoryInfo.h index 039c60677..b6d5db90b 100644 --- a/src/sst/core/eli/categoryInfo.h +++ b/src/sst/core/eli/categoryInfo.h @@ -19,8 +19,7 @@ #include #include -namespace SST { -namespace ELI { +namespace SST::ELI { class ProvidesCategory { @@ -61,7 +60,6 @@ class ProvidesCategory #define SST_ELI_CATEGORY_INFO(cat) \ static uint32_t ELI_getCategory() { return cat; } -} // namespace ELI -} // namespace SST +} // namespace SST::ELI #endif diff --git a/src/sst/core/eli/defaultInfo.h b/src/sst/core/eli/defaultInfo.h index 4ca0ec9b6..617675df3 100644 --- a/src/sst/core/eli/defaultInfo.h +++ b/src/sst/core/eli/defaultInfo.h @@ -17,8 +17,7 @@ #include #include -namespace SST { -namespace ELI { +namespace SST::ELI { class ProvidesDefaultInfo { @@ -73,8 +72,7 @@ class ProvidesDefaultInfo std::string alias_; }; -} // namespace ELI -} // namespace SST +} // namespace SST::ELI #define SST_ELI_INSERT_COMPILE_INFO() \ static const std::string& ELI_getCompileDate() \ diff --git a/src/sst/core/eli/elementbuilder.h b/src/sst/core/eli/elementbuilder.h index c72e12b12..16e0510fa 100644 --- a/src/sst/core/eli/elementbuilder.h +++ b/src/sst/core/eli/elementbuilder.h @@ -16,8 +16,7 @@ #include -namespace SST { -namespace ELI { +namespace SST::ELI { template struct Builder @@ -333,8 +332,7 @@ struct CtorList } }; -} // namespace ELI -} // namespace SST +} // namespace SST::ELI #define ELI_CTOR(...) std::tuple<__VA_ARGS__> #define ELI_DEFAULT_CTOR() std::tuple<> diff --git a/src/sst/core/eli/elementinfo.cc b/src/sst/core/eli/elementinfo.cc index 95bda20c2..152a16fe6 100644 --- a/src/sst/core/eli/elementinfo.cc +++ b/src/sst/core/eli/elementinfo.cc @@ -19,12 +19,11 @@ #include #include -namespace SST { +namespace SST::ELI { /************************************************************************** BaseElementInfo class functions **************************************************************************/ -namespace ELI { void force_instantiate_bool(bool UNUSED(b), const char* UNUSED(name)) @@ -135,5 +134,4 @@ ProvidesParams::init() } } -} // namespace ELI -} // namespace SST +} // namespace SST::ELI diff --git a/src/sst/core/eli/elibase.cc b/src/sst/core/eli/elibase.cc index 0bd58c005..54df12df1 100644 --- a/src/sst/core/eli/elibase.cc +++ b/src/sst/core/eli/elibase.cc @@ -13,12 +13,11 @@ #include "sst/core/eli/elibase.h" -namespace SST { +namespace SST::ELI { /************************************************************************** BaseElementInfo class functions **************************************************************************/ -namespace ELI { std::unique_ptr LoadedLibraries::loaders_ {}; @@ -48,5 +47,4 @@ LoadedLibraries::isLoaded(const std::string& name) } } -} // namespace ELI -} // namespace SST +} // namespace SST::ELI diff --git a/src/sst/core/eli/interfaceInfo.h b/src/sst/core/eli/interfaceInfo.h index 047b8a394..2ef2d1a1a 100644 --- a/src/sst/core/eli/interfaceInfo.h +++ b/src/sst/core/eli/interfaceInfo.h @@ -15,8 +15,7 @@ #include #include -namespace SST { -namespace ELI { +namespace SST::ELI { class ProvidesInterface { @@ -40,8 +39,7 @@ class ProvidesInterface std::string iface_; }; -} // namespace ELI -} // namespace SST +} // namespace SST::ELI #define SST_ELI_INTERFACE_INFO(interface) \ static const std::string ELI_getInterface() { return interface; } diff --git a/src/sst/core/eli/paramsInfo.h b/src/sst/core/eli/paramsInfo.h index 69e279ca6..d3881d5db 100644 --- a/src/sst/core/eli/paramsInfo.h +++ b/src/sst/core/eli/paramsInfo.h @@ -17,8 +17,7 @@ #include #include -namespace SST { -namespace ELI { +namespace SST::ELI { template struct GetParams @@ -77,8 +76,7 @@ class ProvidesParams std::vector params_; }; -} // namespace ELI -} // namespace SST +} // namespace SST::ELI // clang-format off #define SST_ELI_DOCUMENT_PARAMS(...) \ diff --git a/src/sst/core/eli/portsInfo.h b/src/sst/core/eli/portsInfo.h index cfca2b7ea..4c76d8eca 100644 --- a/src/sst/core/eli/portsInfo.h +++ b/src/sst/core/eli/portsInfo.h @@ -17,8 +17,7 @@ #include #include -namespace SST { -namespace ELI { +namespace SST::ELI { template struct InfoPorts @@ -73,8 +72,7 @@ class ProvidesPorts std::vector ports_; }; -} // namespace ELI -} // namespace SST +} // namespace SST::ELI // clang-format off #define SST_ELI_DOCUMENT_PORTS(...) \ diff --git a/src/sst/core/eli/profilePointInfo.h b/src/sst/core/eli/profilePointInfo.h index 7980c1979..e0d359592 100644 --- a/src/sst/core/eli/profilePointInfo.h +++ b/src/sst/core/eli/profilePointInfo.h @@ -17,8 +17,7 @@ #include #include -namespace SST { -namespace ELI { +namespace SST::ELI { template struct InfoProfilePoints @@ -67,8 +66,7 @@ class ProvidesProfilePoints std::vector points_; }; -} // namespace ELI -} // namespace SST +} // namespace SST::ELI // clang-format off #define SST_ELI_DOCUMENT_PROFILE_POINTS(...) \ diff --git a/src/sst/core/eli/simpleInfo.h b/src/sst/core/eli/simpleInfo.h index be46e4d18..c41368d22 100644 --- a/src/sst/core/eli/simpleInfo.h +++ b/src/sst/core/eli/simpleInfo.h @@ -14,8 +14,7 @@ #include "sst/core/eli/elibase.h" -namespace SST { -namespace ELI { +namespace SST::ELI { // ProvidesSimpleInfo is a class to quickly add ELI info to an ELI // Base API. This class should only be used for APIs that aren't @@ -93,8 +92,7 @@ class ProvidesSimpleInfo InfoType info_; }; -} // namespace ELI -} // namespace SST +} // namespace SST::ELI // Macro used by the API to create macros to populate the added ELI // info diff --git a/src/sst/core/eli/statsInfo.h b/src/sst/core/eli/statsInfo.h index 0b57c1229..55ae8a9bd 100644 --- a/src/sst/core/eli/statsInfo.h +++ b/src/sst/core/eli/statsInfo.h @@ -17,8 +17,7 @@ #include #include -namespace SST { -namespace ELI { +namespace SST::ELI { template struct InfoStats @@ -81,8 +80,7 @@ class ProvidesStats } }; -} // namespace ELI -} // namespace SST +} // namespace SST::ELI // clang-format off #define SST_ELI_DOCUMENT_STATISTICS(...) \ diff --git a/src/sst/core/eli/subcompSlotInfo.h b/src/sst/core/eli/subcompSlotInfo.h index a31e25309..3c39c0f4e 100644 --- a/src/sst/core/eli/subcompSlotInfo.h +++ b/src/sst/core/eli/subcompSlotInfo.h @@ -17,8 +17,7 @@ #include #include -namespace SST { -namespace ELI { +namespace SST::ELI { template struct InfoSubs @@ -67,8 +66,7 @@ class ProvidesSubComponentSlots std::vector slots_; }; -} // namespace ELI -} // namespace SST +} // namespace SST::ELI // clang-format off #define SST_ELI_DOCUMENT_SUBCOMPONENT_SLOTS(...) \ diff --git a/src/sst/core/env/envconfig.h b/src/sst/core/env/envconfig.h index 16a524729..ed4be9836 100644 --- a/src/sst/core/env/envconfig.h +++ b/src/sst/core/env/envconfig.h @@ -21,9 +21,7 @@ #include #include -namespace SST { -namespace Core { -namespace Environment { +namespace SST::Core::Environment { /*** \class EnvironmentConfigGroup envconfig.h "sst/core/env/envconfig.h" @@ -122,8 +120,6 @@ class EnvironmentConfiguration std::map groups; }; -} // namespace Environment -} // namespace Core -} // namespace SST +} // namespace SST::Core::Environment #endif // SST_CORE_ENV_ENVCONFIG_H diff --git a/src/sst/core/env/envquery.h b/src/sst/core/env/envquery.h index b1d3a5942..9d99185cf 100644 --- a/src/sst/core/env/envquery.h +++ b/src/sst/core/env/envquery.h @@ -23,9 +23,7 @@ #include #include -namespace SST { -namespace Core { -namespace Environment { +namespace SST::Core::Environment { /** Reads the next new-line delimited entry in a file and put @@ -53,8 +51,6 @@ take precedence over the default configuration locations. */ EnvironmentConfiguration* getSSTEnvironmentConfiguration(const std::vector& overridePaths); -} // namespace Environment -} // namespace Core -} // namespace SST +} // namespace SST::Core::Environment #endif // SST_CORE_ENV_ENVQUERY_H diff --git a/src/sst/core/from_string.h b/src/sst/core/from_string.h index c4cab7a1c..70071a489 100644 --- a/src/sst/core/from_string.h +++ b/src/sst/core/from_string.h @@ -16,8 +16,7 @@ #include #include -namespace SST { -namespace Core { +namespace SST::Core { template typename std::enable_if::value, T>::type @@ -93,7 +92,6 @@ from_string(const std::string& input) return T(input); } -} // end namespace Core -} // end namespace SST +} // end namespace SST::Core #endif // SST_CORE_FROM_STRING_H diff --git a/src/sst/core/impl/interactive/simpleDebug.cc b/src/sst/core/impl/interactive/simpleDebug.cc index f39e0e70e..3b2d1a38f 100644 --- a/src/sst/core/impl/interactive/simpleDebug.cc +++ b/src/sst/core/impl/interactive/simpleDebug.cc @@ -16,9 +16,7 @@ #include "sst/core/stringize.h" #include "sst/core/timeConverter.h" -namespace SST { -namespace IMPL { -namespace Interactive { +namespace SST::IMPL::Interactive { SimpleDebugger::SimpleDebugger(Params& UNUSED(params)) : InteractiveConsole() {} @@ -289,7 +287,4 @@ SimpleDebugger::dispatch_cmd(std::string cmd) } } - -} // namespace Interactive -} // namespace IMPL -} // namespace SST +} // namespace SST::IMPL::Interactive diff --git a/src/sst/core/impl/interactive/simpleDebug.h b/src/sst/core/impl/interactive/simpleDebug.h index d48f59d28..ffad1e33c 100644 --- a/src/sst/core/impl/interactive/simpleDebug.h +++ b/src/sst/core/impl/interactive/simpleDebug.h @@ -15,9 +15,7 @@ #include "sst/core/eli/elementinfo.h" #include "sst/core/interactiveConsole.h" -namespace SST { -namespace IMPL { -namespace Interactive { +namespace SST::IMPL::Interactive { /** Self partitioner actually does nothing. It is simply a pass @@ -63,8 +61,6 @@ class SimpleDebugger : public SST::InteractiveConsole void dispatch_cmd(std::string cmd); }; -} // namespace Interactive -} // namespace IMPL -} // namespace SST +} // namespace SST::IMPL::Interactive #endif diff --git a/src/sst/core/impl/partitioners/linpart.cc b/src/sst/core/impl/partitioners/linpart.cc index 73636eddc..37712caee 100644 --- a/src/sst/core/impl/partitioners/linpart.cc +++ b/src/sst/core/impl/partitioners/linpart.cc @@ -17,7 +17,6 @@ #include "sst/core/output.h" #include "sst/core/warnmacros.h" -using namespace std; using namespace SST::IMPL::Partition; SSTLinearPartition::SSTLinearPartition(RankInfo mpiranks, RankInfo UNUSED(my_rank), int verbosity) diff --git a/src/sst/core/impl/partitioners/linpart.h b/src/sst/core/impl/partitioners/linpart.h index 8d53c17dd..aefa33dbd 100644 --- a/src/sst/core/impl/partitioners/linpart.h +++ b/src/sst/core/impl/partitioners/linpart.h @@ -16,11 +16,10 @@ #include "sst/core/sstpart.h" namespace SST { - class Output; +} -namespace IMPL { -namespace Partition { +namespace SST::IMPL::Partition { /** Performs a linear partition scheme of an SST simulation configuration. In this @@ -68,8 +67,6 @@ class SSTLinearPartition : public SST::Partition::SSTPartitioner bool spawnOnAllRanks() override { return false; } }; -} // namespace Partition -} // namespace IMPL -} // namespace SST +} // namespace SST::IMPL::Partition #endif diff --git a/src/sst/core/impl/partitioners/rrobin.cc b/src/sst/core/impl/partitioners/rrobin.cc index 38b6d03b4..779a8117a 100644 --- a/src/sst/core/impl/partitioners/rrobin.cc +++ b/src/sst/core/impl/partitioners/rrobin.cc @@ -16,11 +16,7 @@ #include "sst/core/configGraph.h" #include "sst/core/warnmacros.h" -using namespace std; - -namespace SST { -namespace IMPL { -namespace Partition { +namespace SST::IMPL::Partition { SSTRoundRobinPartition::SSTRoundRobinPartition(RankInfo world_size, RankInfo UNUSED(my_rank), int UNUSED(verbosity)) : SSTPartitioner(), @@ -45,6 +41,4 @@ SSTRoundRobinPartition::performPartition(PartitionGraph* graph) } } -} // namespace Partition -} // namespace IMPL -} // namespace SST +} // namespace SST::IMPL::Partition diff --git a/src/sst/core/impl/partitioners/rrobin.h b/src/sst/core/impl/partitioners/rrobin.h index 536f09d51..e5ccf60c0 100644 --- a/src/sst/core/impl/partitioners/rrobin.h +++ b/src/sst/core/impl/partitioners/rrobin.h @@ -14,9 +14,7 @@ #include "sst/core/eli/elementinfo.h" #include "sst/core/sstpart.h" -namespace SST { -namespace IMPL { -namespace Partition { +namespace SST::IMPL::Partition { class SSTRoundRobinPartition : public SST::Partition::SSTPartitioner { @@ -46,7 +44,6 @@ class SSTRoundRobinPartition : public SST::Partition::SSTPartitioner bool spawnOnAllRanks() override { return false; } }; -} // namespace Partition -} // namespace IMPL -} // namespace SST +} // namespace SST::IMPL::Partition + #endif // SST_CORE_IMPL_PARTITONERS_RROBIN_H diff --git a/src/sst/core/impl/partitioners/selfpart.h b/src/sst/core/impl/partitioners/selfpart.h index d75836fb3..5435494fc 100644 --- a/src/sst/core/impl/partitioners/selfpart.h +++ b/src/sst/core/impl/partitioners/selfpart.h @@ -15,9 +15,7 @@ #include "sst/core/eli/elementinfo.h" #include "sst/core/sstpart.h" -namespace SST { -namespace IMPL { -namespace Partition { +namespace SST::IMPL::Partition { /** Self partitioner actually does nothing. It is simply a pass @@ -50,8 +48,6 @@ class SSTSelfPartition : public SST::Partition::SSTPartitioner bool spawnOnAllRanks() override { return false; } }; -} // namespace Partition -} // namespace IMPL -} // namespace SST +} // namespace SST::IMPL::Partition #endif diff --git a/src/sst/core/impl/partitioners/simplepart.cc b/src/sst/core/impl/partitioners/simplepart.cc index c1555f37d..be5516769 100644 --- a/src/sst/core/impl/partitioners/simplepart.cc +++ b/src/sst/core/impl/partitioners/simplepart.cc @@ -20,11 +20,7 @@ #include #include -using namespace std; - -namespace SST { -namespace IMPL { -namespace Partition { +namespace SST::IMPL::Partition { SimplePartitioner::SimplePartitioner(RankInfo total_ranks, RankInfo UNUSED(my_rank), int UNUSED(verbosity)) : SSTPartitioner(), @@ -71,17 +67,14 @@ findIndex(ComponentId_t* theArray, const int length, ComponentId_t findThis) static SimTime_t cost_external_links( ComponentId_t* setA, const int lengthA, ComponentId_t* setB, const int lengthB, - map*>& timeTable) + std::map*>& timeTable) { SimTime_t cost = 0; for ( int i = 0; i < lengthA; i++ ) { - map* compMap = timeTable[setA[i]]; - - for ( map::const_iterator compMapItr = compMap->begin(); compMapItr != compMap->end(); - compMapItr++ ) { - + auto* compMap = timeTable[setA[i]]; + for ( auto compMapItr = compMap->cbegin(); compMapItr != compMap->cend(); compMapItr++ ) { if ( findIndex(setB, lengthB, compMapItr->first) > -1 ) { cost += compMapItr->second; } } } @@ -93,7 +86,7 @@ cost_external_links( void SimplePartitioner::simple_partition_step( PartitionComponentMap_t& component_map, ComponentId_t* setA, const int lengthA, int rankA, ComponentId_t* setB, - const int lengthB, int rankB, map*> timeTable, int step) + const int lengthB, int rankB, std::map*> timeTable, int step) { SimTime_t costExt = cost_external_links(setA, lengthA, setB, lengthB, timeTable); @@ -206,7 +199,7 @@ SimplePartitioner::performPartition(PartitionGraph* graph) int indexB = 0; int count = 0; - map*> timeTable; + std::map*> timeTable; // size_t nComp = component_map.size(); // for(size_t theComponent = 0 ; theComponent < nComp ; theComponent++ ) { @@ -215,8 +208,7 @@ SimplePartitioner::performPartition(PartitionGraph* graph) ComponentId_t theComponent = (*compItr)->id; - map* compConnectMap = new map(); - timeTable[theComponent] = compConnectMap; + auto compConnectMap = timeTable[theComponent] = new std::map(); if ( count++ % 2 == 0 ) { setA[indexA++] = theComponent; } else { @@ -232,13 +224,13 @@ SimplePartitioner::performPartition(PartitionGraph* graph) // ConfigLink* theLink = (*linkItr); PartitionLink& theLink = linkMap[*linkItr]; - compConnectMap->insert(pair(theLink.component[1], theLink.getMinLatency())); + compConnectMap->insert( + std::pair(theLink.component[1], theLink.getMinLatency())); } } simple_partition_step(component_map, setA, A_size, 0, setB, B_size, 1, timeTable, 1); } } -} // namespace Partition -} // namespace IMPL -} // namespace SST + +} // namespace SST::IMPL::Partition diff --git a/src/sst/core/impl/partitioners/simplepart.h b/src/sst/core/impl/partitioners/simplepart.h index 04af9a61d..d361789e6 100644 --- a/src/sst/core/impl/partitioners/simplepart.h +++ b/src/sst/core/impl/partitioners/simplepart.h @@ -19,9 +19,7 @@ #include -namespace SST { -namespace IMPL { -namespace Partition { +namespace SST::IMPL::Partition { class SimplePartitioner : public SST::Partition::SSTPartitioner { @@ -59,7 +57,6 @@ class SimplePartitioner : public SST::Partition::SSTPartitioner bool spawnOnAllRanks() override { return false; } }; -} // namespace Partition -} // namespace IMPL -} // namespace SST +} // namespace SST::IMPL::Partition + #endif // SST_CORE_IMPL_PARTITONERS_SIMPLERPART_H diff --git a/src/sst/core/impl/partitioners/singlepart.cc b/src/sst/core/impl/partitioners/singlepart.cc index 08ad96a90..9e9121a6e 100644 --- a/src/sst/core/impl/partitioners/singlepart.cc +++ b/src/sst/core/impl/partitioners/singlepart.cc @@ -16,8 +16,6 @@ #include "sst/core/configGraph.h" #include "sst/core/warnmacros.h" -using namespace std; - using namespace SST::IMPL::Partition; SSTSinglePartition::SSTSinglePartition(RankInfo UNUSED(total_ranks), RankInfo UNUSED(my_rank), int UNUSED(verbosity)) {} diff --git a/src/sst/core/impl/partitioners/singlepart.h b/src/sst/core/impl/partitioners/singlepart.h index 43486771c..c3c58a1e6 100644 --- a/src/sst/core/impl/partitioners/singlepart.h +++ b/src/sst/core/impl/partitioners/singlepart.h @@ -15,9 +15,7 @@ #include "sst/core/eli/elementinfo.h" #include "sst/core/sstpart.h" -namespace SST { -namespace IMPL { -namespace Partition { +namespace SST::IMPL::Partition { /** Single partitioner is a virtual partitioner used for serial jobs. @@ -49,8 +47,6 @@ class SSTSinglePartition : public SST::Partition::SSTPartitioner bool spawnOnAllRanks() override { return false; } }; -} // namespace Partition -} // namespace IMPL -} // namespace SST +} // namespace SST::IMPL::Partition #endif diff --git a/src/sst/core/impl/portmodules/randomDrop.cc b/src/sst/core/impl/portmodules/randomDrop.cc index e61aeeb39..d3e88e47a 100644 --- a/src/sst/core/impl/portmodules/randomDrop.cc +++ b/src/sst/core/impl/portmodules/randomDrop.cc @@ -16,9 +16,7 @@ #include "sst/core/event.h" #include "sst/core/params.h" -namespace SST { -namespace IMPL { -namespace PortModule { +namespace SST::IMPL::PortModule { RandomDrop::RandomDrop(Params& params) : rng_(7, 13) { @@ -104,7 +102,4 @@ RandomDrop::serialize_order(SST::Core::Serialization::serializer& ser) ser& print_info_; } - -} // namespace PortModule -} // namespace IMPL -} // namespace SST +} // namespace SST::IMPL::PortModule diff --git a/src/sst/core/impl/portmodules/randomDrop.h b/src/sst/core/impl/portmodules/randomDrop.h index 9c6d803e4..17d2098a6 100644 --- a/src/sst/core/impl/portmodules/randomDrop.h +++ b/src/sst/core/impl/portmodules/randomDrop.h @@ -19,10 +19,7 @@ #include - -namespace SST { -namespace IMPL { -namespace PortModule { +namespace SST::IMPL::PortModule { class RandomDrop : public SST::PortModule { @@ -88,8 +85,6 @@ class RandomDrop : public SST::PortModule std::string* print_info_ = nullptr; }; -} // namespace PortModule -} // namespace IMPL -} // namespace SST +} // namespace SST::IMPL::PortModule #endif // SST_CORE_IMPL_PORTMODULE_RANDOMDROP_H diff --git a/src/sst/core/impl/timevortex/timeVortexBinnedMap.cc b/src/sst/core/impl/timevortex/timeVortexBinnedMap.cc index a2de0d140..be614dfb2 100644 --- a/src/sst/core/impl/timevortex/timeVortexBinnedMap.cc +++ b/src/sst/core/impl/timevortex/timeVortexBinnedMap.cc @@ -18,8 +18,7 @@ #include -namespace SST { -namespace IMPL { +namespace SST::IMPL { // We sort backwards so we can work from the bottom of the vector // (faster delete) @@ -202,6 +201,4 @@ class TimeVortexBinnedMap_ts : public TimeVortexBinnedMapBase SST_ELI_EXPORT(TimeVortexBinnedMap_ts) }; - -} // namespace IMPL -} // namespace SST +} // namespace SST::IMPL diff --git a/src/sst/core/impl/timevortex/timeVortexPQ.cc b/src/sst/core/impl/timevortex/timeVortexPQ.cc index 8c2b0747e..c8094410b 100644 --- a/src/sst/core/impl/timevortex/timeVortexPQ.cc +++ b/src/sst/core/impl/timevortex/timeVortexPQ.cc @@ -16,8 +16,7 @@ #include "sst/core/clock.h" #include "sst/core/output.h" -namespace SST { -namespace IMPL { +namespace SST::IMPL { template TimeVortexPQBase::TimeVortexPQBase(Params& UNUSED(params)) : @@ -180,5 +179,4 @@ class TimeVortexPQ_ts : public TimeVortexPQBase SST_ELI_EXPORT(TimeVortexPQ_ts) }; -} // namespace IMPL -} // namespace SST +} // namespace SST::IMPL diff --git a/src/sst/core/interactiveConsole.cc b/src/sst/core/interactiveConsole.cc index dd9caf706..685a166b3 100644 --- a/src/sst/core/interactiveConsole.cc +++ b/src/sst/core/interactiveConsole.cc @@ -18,10 +18,8 @@ #include "sst/core/simulation_impl.h" #include "sst/core/timeLord.h" - namespace SST { - /************ InteractiveConsole ***********/ SST_ELI_DEFINE_INFO_EXTERN(SST::InteractiveConsole) @@ -118,5 +116,4 @@ InteractiveConsole::getComponentObjectMap() return Simulation_impl::getSimulation()->getComponentObjectMap(); } - -} /* End namespace SST */ +} // namespace SST diff --git a/src/sst/core/interfaces/TestEvent.h b/src/sst/core/interfaces/TestEvent.h index ab69f1251..fff235273 100644 --- a/src/sst/core/interfaces/TestEvent.h +++ b/src/sst/core/interfaces/TestEvent.h @@ -14,8 +14,7 @@ #include "sst/core/event.h" -namespace SST { -namespace Interfaces { +namespace SST::Interfaces { /** Test Event * Useful for early-testing of components. @@ -40,7 +39,6 @@ class TestEvent : public SST::Event ImplementSerializable(SST::Interfaces::TestEvent); }; -} // namespace Interfaces -} // namespace SST +} // namespace SST::Interfaces #endif // SST_CORE_INTERFACES_TEST_EVENT_H diff --git a/src/sst/core/interfaces/simpleNetwork.cc b/src/sst/core/interfaces/simpleNetwork.cc index 08bbd959c..4e619593d 100644 --- a/src/sst/core/interfaces/simpleNetwork.cc +++ b/src/sst/core/interfaces/simpleNetwork.cc @@ -15,12 +15,8 @@ #include "sst/core/objectComms.h" -using namespace std; - -namespace SST { -namespace Interfaces { +namespace SST::Interfaces { const SimpleNetwork::nid_t SimpleNetwork::INIT_BROADCAST_ADDR = 0xffffffffffffffffl; -} // namespace Interfaces -} // namespace SST +} // namespace SST::Interfaces diff --git a/src/sst/core/interfaces/simpleNetwork.h b/src/sst/core/interfaces/simpleNetwork.h index 56ea75d5f..6f47db3bf 100644 --- a/src/sst/core/interfaces/simpleNetwork.h +++ b/src/sst/core/interfaces/simpleNetwork.h @@ -25,12 +25,12 @@ #include namespace SST { - class Component; class Event; class Link; +} // namespace SST -namespace Interfaces { +namespace SST::Interfaces { /** * Generic network interface @@ -320,7 +320,6 @@ class SimpleNetwork : public SubComponent virtual const UnitAlgebra& getLinkBW() const = 0; }; -} // namespace Interfaces -} // namespace SST +} // namespace SST::Interfaces #endif // SST_CORE_INTERFACES_SIMPLENETWORK_H diff --git a/src/sst/core/interfaces/stdMem.h b/src/sst/core/interfaces/stdMem.h index d71626c48..829fb37e5 100644 --- a/src/sst/core/interfaces/stdMem.h +++ b/src/sst/core/interfaces/stdMem.h @@ -28,11 +28,11 @@ #include namespace SST { - class Component; class Event; +} // namespace SST -namespace Interfaces { +namespace SST::Interfaces { /** * Generic interface to Memory models * @@ -1275,7 +1275,6 @@ class StandardMem : public SubComponent virtual void serialize_order(SST::Core::Serialization::serializer& ser) { SST::SubComponent::serialize_order(ser); } }; -} // namespace Interfaces -} // namespace SST +} // namespace SST::Interfaces #endif // SST_CORE_INTERFACES_STANDARDMEM_H diff --git a/src/sst/core/interfaces/stringEvent.h b/src/sst/core/interfaces/stringEvent.h index 8ab4cfa13..e20167d8a 100644 --- a/src/sst/core/interfaces/stringEvent.h +++ b/src/sst/core/interfaces/stringEvent.h @@ -15,8 +15,7 @@ #include "sst/core/event.h" #include "sst/core/sst_types.h" -namespace SST { -namespace Interfaces { +namespace SST::Interfaces { /** * Simple event to pass strings between components @@ -50,7 +49,6 @@ class StringEvent : public SST::Event ImplementSerializable(SST::Interfaces::StringEvent); }; -} // namespace Interfaces -} // namespace SST +} // namespace SST::Interfaces #endif // SST_CORE_INTERFACES_STRINGEVENT_H diff --git a/src/sst/core/interprocess/circularBuffer.h b/src/sst/core/interprocess/circularBuffer.h index 208f3c1b6..561c6cf2f 100644 --- a/src/sst/core/interprocess/circularBuffer.h +++ b/src/sst/core/interprocess/circularBuffer.h @@ -14,9 +14,7 @@ #include "sstmutex.h" -namespace SST { -namespace Core { -namespace Interprocess { +namespace SST::Core::Interprocess { template class CircularBuffer @@ -118,8 +116,6 @@ class CircularBuffer T buffer[0]; }; -} // namespace Interprocess -} // namespace Core -} // namespace SST +} // namespace SST::Core::Interprocess #endif // SST_CORE_INTERPROCESS_CIRCULARBUFFER_H diff --git a/src/sst/core/interprocess/ipctunnel.cc b/src/sst/core/interprocess/ipctunnel.cc index 6b0be2279..b846b26de 100644 --- a/src/sst/core/interprocess/ipctunnel.cc +++ b/src/sst/core/interprocess/ipctunnel.cc @@ -13,10 +13,8 @@ #include -namespace SST { -namespace Core { -namespace Interprocess { +namespace SST::Core::Interprocess { + uint32_t globalIPCTunnelCount = 0; -} -} // namespace Core -} // namespace SST + +} // namespace SST::Core::Interprocess diff --git a/src/sst/core/interprocess/ipctunnel.h b/src/sst/core/interprocess/ipctunnel.h index a4bb43db5..452e6d8b9 100644 --- a/src/sst/core/interprocess/ipctunnel.h +++ b/src/sst/core/interprocess/ipctunnel.h @@ -24,9 +24,7 @@ #include #include -namespace SST { -namespace Core { -namespace Interprocess { +namespace SST::Core::Interprocess { extern uint32_t globalIPCTunnelCount; /** @@ -252,8 +250,6 @@ class IPCTunnel std::vector circBuffs; }; -} // namespace Interprocess -} // namespace Core -} // namespace SST +} // namespace SST::Core::Interprocess #endif // SST_CORE_INTERPROCESS_IPCTUNNEL_H diff --git a/src/sst/core/interprocess/mmapchild_pin3.h b/src/sst/core/interprocess/mmapchild_pin3.h index 01a8a2223..d3c8dfa12 100644 --- a/src/sst/core/interprocess/mmapchild_pin3.h +++ b/src/sst/core/interprocess/mmapchild_pin3.h @@ -16,9 +16,7 @@ #include "pin.H" -namespace SST { -namespace Core { -namespace Interprocess { +namespace SST::Core::Interprocess { /** Class supports an IPC tunnel between two or more processes, via an mmap'd file * This class attaches to an existing tunnel for a child process using PinCRT @@ -104,8 +102,6 @@ class MMAPChild_Pin3 TunnelType* tunnel; }; -} // namespace Interprocess -} // namespace Core -} // namespace SST +} // namespace SST::Core::Interprocess #endif // SST_CORE_INTERPROCESS_TUNNEL_MMAP_CHILD_PIN3_H diff --git a/src/sst/core/interprocess/mmapparent.h b/src/sst/core/interprocess/mmapparent.h index 1709e53c9..f88317f01 100644 --- a/src/sst/core/interprocess/mmapparent.h +++ b/src/sst/core/interprocess/mmapparent.h @@ -23,9 +23,7 @@ #include #include -namespace SST { -namespace Core { -namespace Interprocess { +namespace SST::Core::Interprocess { /** Class supports an IPC tunnel between two or more processes, via an mmap'd file. * This class creates the tunnel for the parent/master process @@ -118,8 +116,6 @@ class MMAPParent TunnelType* tunnel; }; -} // namespace Interprocess -} // namespace Core -} // namespace SST +} // namespace SST::Core::Interprocess #endif // SST_CORE_INTERPROCESS_TUNNEL_MMAP_PARENT_H diff --git a/src/sst/core/interprocess/shmchild.h b/src/sst/core/interprocess/shmchild.h index 7993f526a..69ecebd7e 100644 --- a/src/sst/core/interprocess/shmchild.h +++ b/src/sst/core/interprocess/shmchild.h @@ -24,9 +24,7 @@ #include #include -namespace SST { -namespace Core { -namespace Interprocess { +namespace SST::Core::Interprocess { /** Class supports an IPC tunnel between two or more processes, via posix shared memory * This class attaches to an existing tunnel for a child process @@ -107,8 +105,6 @@ class SHMChild TunnelType* tunnel; }; -} // namespace Interprocess -} // namespace Core -} // namespace SST +} // namespace SST::Core::Interprocess #endif // SST_CORE_INTERPROCESS_TUNNEL_SHM_CHILD_H diff --git a/src/sst/core/interprocess/shmparent.h b/src/sst/core/interprocess/shmparent.h index 58b0b6b86..19b59a0ef 100644 --- a/src/sst/core/interprocess/shmparent.h +++ b/src/sst/core/interprocess/shmparent.h @@ -23,9 +23,7 @@ #include #include -namespace SST { -namespace Core { -namespace Interprocess { +namespace SST::Core::Interprocess { /** Class supports an IPC tunnel between two or more processes via posix shared memory * This class creates the tunnel for the parent/master process @@ -121,8 +119,6 @@ class SHMParent TunnelType* tunnel; }; -} // namespace Interprocess -} // namespace Core -} // namespace SST +} // namespace SST::Core::Interprocess #endif // SST_CORE_INTERPROCESS_TUNNEL_SHM_PARENT_H diff --git a/src/sst/core/interprocess/sstmutex.h b/src/sst/core/interprocess/sstmutex.h index 1d03e5086..09c4c84a4 100644 --- a/src/sst/core/interprocess/sstmutex.h +++ b/src/sst/core/interprocess/sstmutex.h @@ -15,9 +15,7 @@ #include #include -namespace SST { -namespace Core { -namespace Interprocess { +namespace SST::Core::Interprocess { #define SST_CORE_INTERPROCESS_LOCKED 1 #define SST_CORE_INTERPROCESS_UNLOCKED 0 @@ -78,8 +76,6 @@ class SSTMutex volatile int lockVal; }; -} // namespace Interprocess -} // namespace Core -} // namespace SST +} // namespace SST::Core::Interprocess #endif // SST_CORE_INTERPROCESS_MUTEX_H diff --git a/src/sst/core/interprocess/tunneldef.h b/src/sst/core/interprocess/tunneldef.h index 6a444563c..290f387b7 100644 --- a/src/sst/core/interprocess/tunneldef.h +++ b/src/sst/core/interprocess/tunneldef.h @@ -26,9 +26,7 @@ #include #include -namespace SST { -namespace Core { -namespace Interprocess { +namespace SST::Core::Interprocess { extern uint32_t globalMMAPIPCCount; @@ -245,8 +243,6 @@ class TunnelDef std::vector circBuffs; }; -} // namespace Interprocess -} // namespace Core -} // namespace SST +} // namespace SST::Core::Interprocess #endif // SST_CORE_INTERPROCESS_TUNNEL_DEF_H diff --git a/src/sst/core/iouse.h b/src/sst/core/iouse.h index 90617c3ce..6f99fea4d 100644 --- a/src/sst/core/iouse.h +++ b/src/sst/core/iouse.h @@ -14,13 +14,11 @@ #include -namespace SST { -namespace Core { +namespace SST::Core { uint64_t maxInputOperations(); uint64_t maxOutputOperations(); -} // namespace Core -} // namespace SST +} // namespace SST::Core #endif // SST_CORE_IOUSE_H diff --git a/src/sst/core/main.cc b/src/sst/core/main.cc index 8f52d0bd2..fe4bfb5d3 100644 --- a/src/sst/core/main.cc +++ b/src/sst/core/main.cc @@ -69,7 +69,6 @@ REENABLE_WARNING using namespace SST::Core; using namespace SST::Partition; -using namespace std; using namespace SST; @@ -136,7 +135,7 @@ dump_partition(Config& cfg, ConfigGraph* graph, const RankInfo& size) cfg.component_partition_file().c_str()); } - ofstream graph_file(cfg.component_partition_file().c_str()); + std::ofstream graph_file(cfg.component_partition_file().c_str()); ConfigComponentMap_t& component_map = graph->getComponentMap(); for ( uint32_t i = 0; i < size.rank; i++ ) { @@ -308,7 +307,7 @@ start_graph_creation( try { model_name = extension_map.at(extension); } - catch ( exception& e ) { + catch ( std::exception& e ) { std::cerr << "Unsupported SDL file type: \"" << extension << "\"" << std::endl; return -1; } @@ -547,8 +546,8 @@ start_simulation(uint32_t tid, SimThreadInfo_t& info, Core::ThreadSafe::Barrier& // If we are a MPI_parallel job, need to makes sure that all used // libraries are loaded on all ranks. #ifdef SST_CONFIG_HAVE_MPI - set lib_names; - set other_lib_names; + std::set lib_names; + std::set other_lib_names; Factory::getFactory()->getLoadedLibraryNames(lib_names); // Send my lib_names to the next lowest rank diff --git a/src/sst/core/math/sqrt.h b/src/sst/core/math/sqrt.h index 711cb37ec..1ed8c5bf0 100644 --- a/src/sst/core/math/sqrt.h +++ b/src/sst/core/math/sqrt.h @@ -12,8 +12,7 @@ #ifndef SST_CORE_MATH_SQRT_H #define SST_CORE_MATH_SQRT_H -namespace SST { -namespace Math { +namespace SST::Math { // Implements uint32_t square root based on algorithm from: // Reference: http://en.wikipedia.org/wiki/Methods_of_computing_square_roots @@ -42,7 +41,6 @@ square_root(const uint32_t input) return res; }; -} // namespace Math -} // namespace SST +} // namespace SST::Math #endif // SST_CORE_MATH_SQRT_H diff --git a/src/sst/core/mempool.cc b/src/sst/core/mempool.cc index 34a64cdc8..cfb613db6 100644 --- a/src/sst/core/mempool.cc +++ b/src/sst/core/mempool.cc @@ -23,8 +23,7 @@ #include #include -namespace SST { -namespace Core { +namespace SST::Core { #ifdef USE_MEMPOOL @@ -506,6 +505,4 @@ MemPoolItem::print(const std::string& header, Output& out) const out.output("%s%s\n", header.c_str(), toString().c_str()); } - -} // namespace Core -} // namespace SST +} // namespace SST::Core diff --git a/src/sst/core/mempoolAccessor.h b/src/sst/core/mempoolAccessor.h index 770899f38..fbec750fb 100644 --- a/src/sst/core/mempoolAccessor.h +++ b/src/sst/core/mempoolAccessor.h @@ -12,10 +12,7 @@ #ifndef SST_CORE_MEMPOOL_ACCESSOR_H #define SST_CORE_MEMPOOL_ACCESSOR_H - -namespace SST { - -namespace Core { +namespace SST::Core { // Class to access stats/data about the mempools. This is here to // limit exposure to the USE_MEMPOOL #define, which will only be in @@ -51,7 +48,6 @@ class MemPoolAccessor static void printUndeletedMemPoolItems(const std::string& header, Output& out); }; -} // namespace Core -} // namespace SST +} // namespace SST::Core #endif // SST_CORE_MEMPOOL_ACCESSOR_H diff --git a/src/sst/core/memuse.h b/src/sst/core/memuse.h index b24a81ed0..108837f69 100644 --- a/src/sst/core/memuse.h +++ b/src/sst/core/memuse.h @@ -14,8 +14,7 @@ #include -namespace SST { -namespace Core { +namespace SST::Core { uint64_t localMemSize(); uint64_t maxLocalMemSize(); @@ -23,7 +22,6 @@ uint64_t maxGlobalMemSize(); uint64_t maxLocalPageFaults(); uint64_t globalPageFaults(); -} // namespace Core -} // namespace SST +} // namespace SST::Core #endif // SST_CORE_MEMUSE_H diff --git a/src/sst/core/model/json/jsonmodel.h b/src/sst/core/model/json/jsonmodel.h index efa4d58eb..b0d68081d 100644 --- a/src/sst/core/model/json/jsonmodel.h +++ b/src/sst/core/model/json/jsonmodel.h @@ -36,8 +36,7 @@ using namespace SST; using json = nlohmann::json; -namespace SST { -namespace Core { +namespace SST::Core { class SSTJSONModelDefinition : public SSTModelDescription { @@ -74,7 +73,6 @@ class SSTJSONModelDefinition : public SSTModelDescription ComponentId_t findComponentIdByName(const std::string& Name); }; -} // namespace Core -} // namespace SST +} // namespace SST::Core #endif // SST_CORE_MODEL_JSON_JSONMODEL_H diff --git a/src/sst/core/model/python/pymodel.h b/src/sst/core/model/python/pymodel.h index 7ad7ceb83..ce357b3fb 100644 --- a/src/sst/core/model/python/pymodel.h +++ b/src/sst/core/model/python/pymodel.h @@ -35,8 +35,7 @@ REENABLE_WARNING using namespace SST; -namespace SST { -namespace Core { +namespace SST::Core { class SSTPythonModelDefinition : public SSTModelDescription { @@ -175,7 +174,6 @@ PyObject* buildEnabledStatistic(ConfigComponent* cc, const char* statName, PyObject* statParamDict, bool apply_to_children); PyObject* buildEnabledStatistics(ConfigComponent* cc, PyObject* statList, PyObject* paramDict, bool apply_to_children); -} // namespace Core -} // namespace SST +} // namespace SST::Core #endif // SST_CORE_MODEL_PYTHON_PYMODEL_H diff --git a/src/sst/core/model/python/pymodel_comp.h b/src/sst/core/model/python/pymodel_comp.h index ba1e02daf..8576e4595 100644 --- a/src/sst/core/model/python/pymodel_comp.h +++ b/src/sst/core/model/python/pymodel_comp.h @@ -25,7 +25,7 @@ REENABLE_WARNING namespace SST { class ConfigComponent; -} // namespace SST +} extern "C" { diff --git a/src/sst/core/objectComms.h b/src/sst/core/objectComms.h index 75d0ac0da..09245d552 100644 --- a/src/sst/core/objectComms.h +++ b/src/sst/core/objectComms.h @@ -24,9 +24,7 @@ REENABLE_WARNING #include #include -namespace SST { - -namespace Comms { +namespace SST::Comms { #ifdef SST_CONFIG_HAVE_MPI template @@ -148,8 +146,6 @@ all_gather(dataType& data, std::vector& out_data) #endif -} // namespace Comms - -} // namespace SST +} // namespace SST::Comms #endif // SST_CORE_OBJECTCOMMS_H diff --git a/src/sst/core/objectSerialization.h b/src/sst/core/objectSerialization.h index a0a72162c..a2184776b 100644 --- a/src/sst/core/objectSerialization.h +++ b/src/sst/core/objectSerialization.h @@ -16,9 +16,7 @@ #include -namespace SST { - -namespace Comms { +namespace SST::Comms { template std::vector @@ -75,8 +73,6 @@ deserialize(char* buffer, int blen, dataType& tgt) ser& tgt; } -} // namespace Comms - -} // namespace SST +} // namespace SST::Comms #endif // SST_CORE_OBJECTSERIALIZATION_H diff --git a/src/sst/core/profile.h b/src/sst/core/profile.h index 0eb875aae..37ecadf0c 100644 --- a/src/sst/core/profile.h +++ b/src/sst/core/profile.h @@ -16,9 +16,7 @@ #include -namespace SST { -namespace Core { -namespace Profile { +namespace SST::Core::Profile { #ifdef __SST_ENABLE_PROFILE__ @@ -72,8 +70,6 @@ getElapsed(const ProfData_t& UNUSED(since)) #endif -} // namespace Profile -} // namespace Core -} // namespace SST +} // namespace SST::Core::Profile #endif // SST_CORE_CORE_PROFILE_H diff --git a/src/sst/core/profile/clockHandlerProfileTool.cc b/src/sst/core/profile/clockHandlerProfileTool.cc index 437e6ca3a..01fb481c9 100644 --- a/src/sst/core/profile/clockHandlerProfileTool.cc +++ b/src/sst/core/profile/clockHandlerProfileTool.cc @@ -19,9 +19,7 @@ #include -namespace SST { -namespace Profile { - +namespace SST::Profile { ClockHandlerProfileTool::ClockHandlerProfileTool(const std::string& name, Params& params) : ProfileTool(name) { @@ -162,6 +160,4 @@ class ClockHandlerProfileToolTimeSteady : public ClockHandlerProfileToolTime #include -namespace SST { - -namespace Profile { - +namespace SST::Profile { class ClockHandlerProfileTool : public ProfileTool, public Clock::HandlerBase::AttachPoint { @@ -121,7 +118,6 @@ class ClockHandlerProfileToolTime : public ClockHandlerProfileTool std::map times_; }; -} // namespace Profile -} // namespace SST +} // namespace SST::Profile #endif // SST_CORE_PROFILE_CLOCKHANDLERPROFILETOOL_H diff --git a/src/sst/core/profile/componentProfileTool.cc b/src/sst/core/profile/componentProfileTool.cc index a6fe0a78a..e728b29fa 100644 --- a/src/sst/core/profile/componentProfileTool.cc +++ b/src/sst/core/profile/componentProfileTool.cc @@ -19,9 +19,7 @@ #include -namespace SST { -namespace Profile { - +namespace SST::Profile { ComponentProfileTool::ComponentProfileTool(const std::string& name, Params& params) : ProfileTool(name) { @@ -174,6 +172,4 @@ class ComponentCodeSegmentProfileToolTimeSteady : public ComponentCodeSegmentPro SST_ELI_EXPORT(ComponentCodeSegmentProfileToolTimeSteady) }; - -} // namespace Profile -} // namespace SST +} // namespace SST::Profile diff --git a/src/sst/core/profile/componentProfileTool.h b/src/sst/core/profile/componentProfileTool.h index 4460d8f61..1f8b3b78c 100644 --- a/src/sst/core/profile/componentProfileTool.h +++ b/src/sst/core/profile/componentProfileTool.h @@ -21,10 +21,10 @@ #include namespace SST { - class BaseComponent; +} -namespace Profile { +namespace SST::Profile { // Base class for profiling tools designed to profile in Components // and SubComponents. For these types of profiling tools, you can @@ -188,7 +188,6 @@ class ComponentCodeSegmentProfileToolTime : public ComponentCodeSegmentProfileTo std::map times_; }; -} // namespace Profile -} // namespace SST +} // namespace SST::Profile #endif // SST_CORE_PROFILE_COMPONENTPROFILETOOL_H diff --git a/src/sst/core/profile/eventHandlerProfileTool.cc b/src/sst/core/profile/eventHandlerProfileTool.cc index e0b9b8c0c..ced0a6438 100644 --- a/src/sst/core/profile/eventHandlerProfileTool.cc +++ b/src/sst/core/profile/eventHandlerProfileTool.cc @@ -19,9 +19,7 @@ #include -namespace SST { -namespace Profile { - +namespace SST::Profile { EventHandlerProfileTool::EventHandlerProfileTool(const std::string& name, Params& params) : ProfileTool(name) { @@ -201,6 +199,4 @@ class EventHandlerProfileToolTimeSteady : public EventHandlerProfileToolTime #include -namespace SST { - -namespace Profile { - +namespace SST::Profile { class EventHandlerProfileTool : public ProfileTool, public Event::HandlerBase::AttachPoint, public Link::AttachPoint { @@ -149,7 +146,6 @@ class EventHandlerProfileToolTime : public EventHandlerProfileTool std::map times_; }; -} // namespace Profile -} // namespace SST +} // namespace SST::Profile #endif // SST_CORE_PROFILE_EVENTHANDLERPROFILETOOL_H diff --git a/src/sst/core/profile/profiletool.cc b/src/sst/core/profile/profiletool.cc index dd277b094..b1b0f0226 100644 --- a/src/sst/core/profile/profiletool.cc +++ b/src/sst/core/profile/profiletool.cc @@ -17,14 +17,11 @@ #include -namespace SST { -namespace Profile { +namespace SST::Profile { SST_ELI_DEFINE_INFO_EXTERN(ProfileTool) SST_ELI_DEFINE_CTOR_EXTERN(ProfileTool) - ProfileTool::ProfileTool(const std::string& name) : name(name) {} -} // namespace Profile -} // namespace SST +} // namespace SST::Profile diff --git a/src/sst/core/profile/profiletool.h b/src/sst/core/profile/profiletool.h index 39de2dccf..162cd0a35 100644 --- a/src/sst/core/profile/profiletool.h +++ b/src/sst/core/profile/profiletool.h @@ -17,10 +17,10 @@ #include "sst/core/warnmacros.h" namespace SST { - class Params; +} -namespace Profile { +namespace SST::Profile { /** ProfileTool is a class loadable through the factory which allows @@ -49,8 +49,7 @@ class ProfileTool const std::string name; }; -} // namespace Profile -} // namespace SST +} // namespace SST::Profile // Register profile tools. Must register an interface // (API) first, then you can register a subcomponent that implements diff --git a/src/sst/core/profile/syncProfileTool.cc b/src/sst/core/profile/syncProfileTool.cc index 954a73224..92a54915e 100644 --- a/src/sst/core/profile/syncProfileTool.cc +++ b/src/sst/core/profile/syncProfileTool.cc @@ -18,9 +18,7 @@ #include -namespace SST { -namespace Profile { - +namespace SST::Profile { SyncProfileTool::SyncProfileTool(const std::string& name, Params& UNUSED(params)) : ProfileTool(name) {} @@ -101,6 +99,4 @@ class SyncProfileToolTimeSteady : public SyncProfileToolTime #include -namespace SST { - -namespace Profile { +namespace SST::Profile { // Initial version of sync profiling tool. The API is not yet complete. class SyncProfileTool : public ProfileTool @@ -103,7 +101,6 @@ class SyncProfileToolTime : public SyncProfileTool typename T::time_point start_time_; }; -} // namespace Profile -} // namespace SST +} // namespace SST::Profile #endif // SST_CORE_PROFILE_SYNCPROFILETOOL_H diff --git a/src/sst/core/rng/constant.h b/src/sst/core/rng/constant.h index 11ae2b557..6ecdf070e 100644 --- a/src/sst/core/rng/constant.h +++ b/src/sst/core/rng/constant.h @@ -15,10 +15,7 @@ #include "distrib.h" #include "math.h" -using namespace SST::RNG; - -namespace SST { -namespace RNG { +namespace SST::RNG { /** \class ConstantDistribution constant.h "sst/core/rng/constant.h" @@ -76,9 +73,8 @@ class ConstantDistribution : public RandomDistribution double mean; }; -using SSTConstantDistribution = SST::RNG::ConstantDistribution; +} // namespace SST::RNG -} // namespace RNG -} // namespace SST +using SSTConstantDistribution = SST::RNG::ConstantDistribution; #endif // SST_CORE_RNG_CONSTANT_H diff --git a/src/sst/core/rng/discrete.h b/src/sst/core/rng/discrete.h index 527d264fe..3265de71e 100644 --- a/src/sst/core/rng/discrete.h +++ b/src/sst/core/rng/discrete.h @@ -19,10 +19,7 @@ #include // for malloc/free -using namespace SST::RNG; - -namespace SST { -namespace RNG { +namespace SST::RNG { /** \class DiscreteDistribution discrete.h "sst/core/rng/discrete.h" @@ -30,7 +27,7 @@ namespace RNG { Creates a discrete distribution for use within SST. This distribution is the same across platforms and compilers. */ -class DiscreteDistribution : public SST::RNG::RandomDistribution +class DiscreteDistribution : public RandomDistribution { public: @@ -39,9 +36,7 @@ class DiscreteDistribution : public SST::RNG::RandomDistribution \param probs An array of probabilities for each outcome \param probsCount The number of discrete outcomes */ - DiscreteDistribution(const double* probs, const uint32_t probsCount) : - SST::RNG::RandomDistribution(), - probCount(probsCount) + DiscreteDistribution(const double* probs, const uint32_t probsCount) : RandomDistribution(), probCount(probsCount) { probabilities = (double*)malloc(sizeof(double) * probsCount); @@ -61,7 +56,7 @@ class DiscreteDistribution : public SST::RNG::RandomDistribution \param lambda The lambda of the exponential distribution \param baseDist The base random number generator to take the distribution from. */ - DiscreteDistribution(const double* probs, const uint32_t probsCount, SST::RNG::Random* baseDist) : + DiscreteDistribution(const double* probs, const uint32_t probsCount, Random* baseDist) : RandomDistribution(), probCount(probsCount) { @@ -132,13 +127,13 @@ class DiscreteDistribution : public SST::RNG::RandomDistribution /** Serialization macro */ - ImplementSerializable(SST::RNG::DiscreteDistribution) + ImplementSerializable(DiscreteDistribution) protected: /** Sets the base random number generator for the distribution. */ - SST::RNG::Random* baseDistrib; + Random* baseDistrib; /** Controls whether the base distribution should be deleted when this class is destructed. @@ -156,9 +151,8 @@ class DiscreteDistribution : public SST::RNG::RandomDistribution uint32_t probCount; }; -using SSTDiscreteDistribution = SST::RNG::DiscreteDistribution; +} // namespace SST::RNG -} // namespace RNG -} // namespace SST +using SSTDiscreteDistribution = SST::RNG::DiscreteDistribution; #endif // SST_CORE_RNG_DISCRETE_H diff --git a/src/sst/core/rng/distrib.h b/src/sst/core/rng/distrib.h index 78657ab38..abbbfe04e 100644 --- a/src/sst/core/rng/distrib.h +++ b/src/sst/core/rng/distrib.h @@ -14,8 +14,7 @@ #include "sst/core/serialization/serializable.h" -namespace SST { -namespace RNG { +namespace SST::RNG { /** * \class RandomDistribution @@ -46,9 +45,8 @@ class RandomDistribution : public SST::Core::Serialization::serializable ImplementVirtualSerializable(SST::RNG::RandomDistribution) }; -using SSTRandomDistribution = SST::RNG::RandomDistribution; +} // namespace SST::RNG -} // namespace RNG -} // namespace SST +using SSTRandomDistribution = SST::RNG::RandomDistribution; #endif // SST_CORE_RNG_DISTRIB_H diff --git a/src/sst/core/rng/expon.h b/src/sst/core/rng/expon.h index 92a88bd7d..ef8d28f15 100644 --- a/src/sst/core/rng/expon.h +++ b/src/sst/core/rng/expon.h @@ -17,10 +17,7 @@ #include "mersenne.h" #include "rng.h" -using namespace SST::RNG; - -namespace SST { -namespace RNG { +namespace SST::RNG { /** \class ExponentialDistribution expon.h "sst/core/rng/expon.h" @@ -49,7 +46,7 @@ class ExponentialDistribution : public RandomDistribution \param mn The lambda of the exponential distribution \param baseDist The base random number generator to take the distribution from. */ - ExponentialDistribution(const double mn, SST::RNG::Random* baseDist) : RandomDistribution() + ExponentialDistribution(const double mn, Random* baseDist) : RandomDistribution() { lambda = mn; @@ -105,11 +102,11 @@ class ExponentialDistribution : public RandomDistribution /** Sets the lambda of the exponential distribution. */ - double lambda; + double lambda; /** Sets the base random number generator for the distribution. */ - SST::RNG::Random* baseDistrib; + Random* baseDistrib; /** Controls whether the base distribution should be deleted when this class is destructed. @@ -117,9 +114,8 @@ class ExponentialDistribution : public RandomDistribution bool deleteDistrib; }; -using SSTExponentialDistribution = SST::RNG::ExponentialDistribution; +} // namespace SST::RNG -} // namespace RNG -} // namespace SST +using SSTExponentialDistribution = SST::RNG::ExponentialDistribution; #endif // SST_CORE_RNG_EXPON_H diff --git a/src/sst/core/rng/gaussian.h b/src/sst/core/rng/gaussian.h index c1de3f07c..cc41f00eb 100644 --- a/src/sst/core/rng/gaussian.h +++ b/src/sst/core/rng/gaussian.h @@ -17,10 +17,7 @@ #include "mersenne.h" #include "rng.h" -using namespace SST::RNG; - -namespace SST { -namespace RNG { +namespace SST::RNG { /** \class GaussianDistribution gaussian.h "sst/core/rng/gaussian.h" @@ -53,7 +50,7 @@ class GaussianDistribution : public RandomDistribution deviation. \param mn The mean of the Gaussian distribution \param sd The standard deviation of the Gaussian distribution \param baseRNG The random number generator as the base of the distribution */ - GaussianDistribution(double mn, double sd, SST::RNG::Random* baseRNG) : RandomDistribution() + GaussianDistribution(double mn, double sd, Random* baseRNG) : RandomDistribution() { mean = mn; @@ -143,23 +140,23 @@ class GaussianDistribution : public RandomDistribution /** The mean of the Gaussian distribution */ - double mean; + double mean; /** The standard deviation of the Gaussian distribution */ - double stddev; + double stddev; /** The base random number generator for the distribution */ - SST::RNG::Random* baseDistrib; + Random* baseDistrib; /** Random numbers for the distribution are read in pairs, this stores the second of the pair */ - double unusedPair; + double unusedPair; /** Random numbers for the distribution are read in pairs, this tells the code to use the second of the pair */ - bool usePair; + bool usePair; /** Controls whether the destructor deletes the distribution (we need to ensure we do this IF we created the @@ -168,9 +165,8 @@ class GaussianDistribution : public RandomDistribution bool deleteDistrib; }; -using SSTGaussianDistribution = SST::RNG::GaussianDistribution; +} // namespace SST::RNG -} // namespace RNG -} // namespace SST +using SSTGaussianDistribution = SST::RNG::GaussianDistribution; #endif // SST_CORE_RNG_GAUSSIAN_H diff --git a/src/sst/core/rng/marsaglia.h b/src/sst/core/rng/marsaglia.h index 9062fbe8c..906480c58 100644 --- a/src/sst/core/rng/marsaglia.h +++ b/src/sst/core/rng/marsaglia.h @@ -24,8 +24,7 @@ #define MARSAGLIA_INT32_MAX 2147483647L #define MARSAGLIA_INT64_MAX 9223372036854775807LL -namespace SST { -namespace RNG { +namespace SST::RNG { /** \class MarsagliaRNG marsaglia.h "sst/core/rng/marsaglia.h" @@ -37,7 +36,7 @@ namespace RNG { For more information see the Multiply-with-carry Random Number Generator article at Wikipedia (http://en.wikipedia.org/wiki/Multiply-with-carry). */ -class MarsagliaRNG : public SST::RNG::Random +class MarsagliaRNG : public Random { public: @@ -119,7 +118,6 @@ class MarsagliaRNG : public SST::RNG::Random unsigned int m_w; }; -} // namespace RNG -} // namespace SST +} // namespace SST::RNG #endif // SST_CORE_RNG_MARSAGLIA_H diff --git a/src/sst/core/rng/mersenne.cc b/src/sst/core/rng/mersenne.cc index f89810232..79213e1eb 100644 --- a/src/sst/core/rng/mersenne.cc +++ b/src/sst/core/rng/mersenne.cc @@ -26,7 +26,7 @@ using namespace SST::RNG; Generate a new random number generator with a random selection for the seed. */ -MersenneRNG::MersenneRNG() : SST::RNG::Random() +MersenneRNG::MersenneRNG() : Random() { numbers = (uint32_t*)malloc(sizeof(uint32_t) * 624); @@ -45,7 +45,7 @@ MersenneRNG::MersenneRNG() : SST::RNG::Random() /* Seed the Mersenne and then make a group of numbers */ -MersenneRNG::MersenneRNG(unsigned int startSeed) : SST::RNG::Random() +MersenneRNG::MersenneRNG(unsigned int startSeed) : Random() { seed(startSeed); } diff --git a/src/sst/core/rng/mersenne.h b/src/sst/core/rng/mersenne.h index bbd4f9276..7c5c3de38 100644 --- a/src/sst/core/rng/mersenne.h +++ b/src/sst/core/rng/mersenne.h @@ -22,8 +22,7 @@ #define MERSENNE_INT32_MAX 2147483647L #define MERSENNE_INT64_MAX 9223372036854775807LL -namespace SST { -namespace RNG { +namespace SST::RNG { /** \class MersenneRNG mersenne.h "sst/core/rng/mersenne.h" @@ -31,7 +30,7 @@ namespace RNG { RNG provides a better "randomness" to the distribution of outputs but is computationally more expensive than the Marsaglia RNG. */ -class MersenneRNG : public SST::RNG::Random +class MersenneRNG : public Random { public: @@ -110,7 +109,6 @@ class MersenneRNG : public SST::RNG::Random int index; }; -} // namespace RNG -} // namespace SST +} // namespace SST::RNG #endif // SST_CORE_RNG_MERSENNE_H diff --git a/src/sst/core/rng/poisson.h b/src/sst/core/rng/poisson.h index f2226293b..00fa52592 100644 --- a/src/sst/core/rng/poisson.h +++ b/src/sst/core/rng/poisson.h @@ -17,10 +17,7 @@ #include "mersenne.h" #include "rng.h" -using namespace SST::RNG; - -namespace SST { -namespace RNG { +namespace SST::RNG { /** \class PoissonDistribution poisson.h "sst/core/rng/poisson.h" @@ -48,7 +45,7 @@ class PoissonDistribution : public RandomDistribution \param lambda The lambda of the Poisson distribution \param baseDist The base random number generator to take the distribution from. */ - PoissonDistribution(const double mn, SST::RNG::Random* baseDist) : RandomDistribution(), lambda(mn) + PoissonDistribution(const double mn, Random* baseDist) : RandomDistribution(), lambda(mn) { baseDistrib = baseDist; @@ -111,11 +108,11 @@ class PoissonDistribution : public RandomDistribution /** Sets the lambda of the Poisson distribution. */ - const double lambda; + const double lambda; /** Sets the base random number generator for the distribution. */ - SST::RNG::Random* baseDistrib; + Random* baseDistrib; /** Controls whether the base distribution should be deleted when this class is destructed. @@ -123,9 +120,8 @@ class PoissonDistribution : public RandomDistribution bool deleteDistrib; }; -using SSTPoissonDistribution = SST::RNG::PoissonDistribution; +} // namespace SST::RNG -} // namespace RNG -} // namespace SST +using SSTPoissonDistribution = SST::RNG::PoissonDistribution; #endif // SST_CORE_RNG_POISSON_H diff --git a/src/sst/core/rng/rng.h b/src/sst/core/rng/rng.h index 2349fb07a..8bfa65f81 100644 --- a/src/sst/core/rng/rng.h +++ b/src/sst/core/rng/rng.h @@ -16,8 +16,7 @@ #include -namespace SST { -namespace RNG { +namespace SST::RNG { /** \class Random rng.h "sst/core/rng/rng.h" @@ -64,7 +63,6 @@ class Random : public SST::Core::Serialization::serializable ImplementVirtualSerializable(SST::RNG::Random) }; -} // namespace RNG -} // namespace SST +} // namespace SST::RNG #endif // SST_CORE_RNG_RNG_H diff --git a/src/sst/core/rng/uniform.h b/src/sst/core/rng/uniform.h index ef00a679e..bd7446a0b 100644 --- a/src/sst/core/rng/uniform.h +++ b/src/sst/core/rng/uniform.h @@ -17,10 +17,7 @@ #include "mersenne.h" #include "rng.h" -using namespace SST::RNG; - -namespace SST { -namespace RNG { +namespace SST::RNG { /** \class UniformDistribution uniform.h "sst/core/rng/uniform.h" @@ -54,7 +51,7 @@ class UniformDistribution : public RandomDistribution \param probsCount Number of probability bins in the distribution \param baseDist The base random number generator to take the distribution from. */ - UniformDistribution(const uint32_t probsCount, SST::RNG::Random* baseDist) : + UniformDistribution(const uint32_t probsCount, Random* baseDist) : RandomDistribution(), deleteDistrib(false), probCount(probsCount), @@ -116,7 +113,7 @@ class UniformDistribution : public RandomDistribution /** Sets the base random number generator for the distribution. */ - SST::RNG::Random* baseDistrib; + Random* baseDistrib; /** Controls whether the base distribution should be deleted when this class is destructed. @@ -134,9 +131,8 @@ class UniformDistribution : public RandomDistribution double probPerBin; }; -using SSTUniformDistribution = SST::RNG::UniformDistribution; +} // namespace SST::RNG -} // namespace RNG -} // namespace SST +using SSTUniformDistribution = SST::RNG::UniformDistribution; #endif // SST_CORE_RNG_UNIFORM_H diff --git a/src/sst/core/rng/xorshift.cc b/src/sst/core/rng/xorshift.cc index a173e37df..9fc72f7e7 100644 --- a/src/sst/core/rng/xorshift.cc +++ b/src/sst/core/rng/xorshift.cc @@ -26,7 +26,7 @@ using namespace SST::RNG; Generate a new random number generator with a random selection for the seed. */ -XORShiftRNG::XORShiftRNG() : SST::RNG::Random() +XORShiftRNG::XORShiftRNG() : Random() { struct timeval now; gettimeofday(&now, nullptr); @@ -40,7 +40,7 @@ XORShiftRNG::XORShiftRNG() : SST::RNG::Random() /* Seed the Mersenne and then make a group of numbers */ -XORShiftRNG::XORShiftRNG(unsigned int startSeed) : SST::RNG::Random() +XORShiftRNG::XORShiftRNG(unsigned int startSeed) : Random() { assert(startSeed != 0); @@ -146,4 +146,4 @@ XORShiftRNG::serialize_order(SST::Core::Serialization::serializer& ser) ser& y; ser& w; ser& z; -} \ No newline at end of file +} diff --git a/src/sst/core/rng/xorshift.h b/src/sst/core/rng/xorshift.h index d019dae7d..ae6096631 100644 --- a/src/sst/core/rng/xorshift.h +++ b/src/sst/core/rng/xorshift.h @@ -22,8 +22,7 @@ #define XORSHIFT_INT32_MAX 2147483647L #define XORSHIFT_INT64_MAX 9223372036854775807LL -namespace SST { -namespace RNG { +namespace SST::RNG { /** \class XORShiftRNG xorshift.h "sst/core/rng/xorshift.h" @@ -101,7 +100,6 @@ class XORShiftRNG : public SST::RNG::Random uint32_t w; }; -} // namespace RNG -} // namespace SST +} // namespace SST::RNG #endif // SST_CORE_RNG_XORSHIFT_H diff --git a/src/sst/core/serialization/impl/mapper.h b/src/sst/core/serialization/impl/mapper.h index e976394d1..b0d74f4ce 100644 --- a/src/sst/core/serialization/impl/mapper.h +++ b/src/sst/core/serialization/impl/mapper.h @@ -23,10 +23,7 @@ #include #include -namespace SST { -namespace Core { -namespace Serialization { -namespace pvt { +namespace SST::Core::Serialization::pvt { class ser_mapper { @@ -88,9 +85,6 @@ class ser_mapper int indent = 0; }; -} // namespace pvt -} // namespace Serialization -} // namespace Core -} // namespace SST +} // namespace SST::Core::Serialization::pvt #endif // SST_CORE_SERIALIZATION_IMPL_MAPPER_H diff --git a/src/sst/core/serialization/impl/packer.h b/src/sst/core/serialization/impl/packer.h index ce548d8ad..1968c94ee 100644 --- a/src/sst/core/serialization/impl/packer.h +++ b/src/sst/core/serialization/impl/packer.h @@ -21,10 +21,7 @@ #include -namespace SST { -namespace Core { -namespace Serialization { -namespace pvt { +namespace SST::Core::Serialization::pvt { class ser_packer : public ser_buffer_accessor { @@ -48,9 +45,6 @@ class ser_packer : public ser_buffer_accessor void pack_string(std::string& str); }; -} // namespace pvt -} // namespace Serialization -} // namespace Core -} // namespace SST +} // namespace SST::Core::Serialization::pvt #endif // SST_CORE_SERIALIZATION_IMPL_PACKER_H diff --git a/src/sst/core/serialization/impl/ser_buffer_accessor.h b/src/sst/core/serialization/impl/ser_buffer_accessor.h index 94c1f3a36..dbfe2ddf6 100644 --- a/src/sst/core/serialization/impl/ser_buffer_accessor.h +++ b/src/sst/core/serialization/impl/ser_buffer_accessor.h @@ -22,10 +22,7 @@ #include #include -namespace SST { -namespace Core { -namespace Serialization { -namespace pvt { +namespace SST::Core::Serialization::pvt { // class ser_buffer_overrun : public spkt_error { class ser_buffer_overrun : public std::exception @@ -92,9 +89,6 @@ class ser_buffer_accessor size_t max_size_; }; -} // namespace pvt -} // namespace Serialization -} // namespace Core -} // namespace SST +} // namespace SST::Core::Serialization::pvt #endif // SST_CORE_SERIALIZATION_IMPL_SER_BUFFER_ACCESSOR_H diff --git a/src/sst/core/serialization/impl/serialize_array.h b/src/sst/core/serialization/impl/serialize_array.h index e3292c071..7a4489ead 100644 --- a/src/sst/core/serialization/impl/serialize_array.h +++ b/src/sst/core/serialization/impl/serialize_array.h @@ -19,9 +19,7 @@ #include "sst/core/serialization/serializer.h" -namespace SST { -namespace Core { -namespace Serialization { +namespace SST::Core::Serialization { namespace pvt { template @@ -225,8 +223,6 @@ operator&(serializer& ser, pvt::raw_ptr_wrapper ptr) // serialize>()(ptr, ser); } -} // namespace Serialization -} // namespace Core -} // namespace SST +} // namespace SST::Core::Serialization #endif // SST_CORE_SERIALIZATION_IMPL_SERIALIZE_ARRAY_H diff --git a/src/sst/core/serialization/impl/serialize_atomic.h b/src/sst/core/serialization/impl/serialize_atomic.h index deb25dabc..2ac7c93ea 100644 --- a/src/sst/core/serialization/impl/serialize_atomic.h +++ b/src/sst/core/serialization/impl/serialize_atomic.h @@ -21,9 +21,7 @@ #include -namespace SST { -namespace Core { -namespace Serialization { +namespace SST::Core::Serialization { template class serialize_impl> @@ -66,8 +64,6 @@ class serialize_impl> } }; -} // namespace Serialization -} // namespace Core -} // namespace SST +} // namespace SST::Core::Serialization #endif // SST_CORE_SERIALIZATION_IMPL_SERIALIZE_VECTOR_H diff --git a/src/sst/core/serialization/impl/serialize_deque.h b/src/sst/core/serialization/impl/serialize_deque.h index d27d463ea..3fa518255 100644 --- a/src/sst/core/serialization/impl/serialize_deque.h +++ b/src/sst/core/serialization/impl/serialize_deque.h @@ -21,9 +21,7 @@ #include -namespace SST { -namespace Core { -namespace Serialization { +namespace SST::Core::Serialization { template class serialize_impl> @@ -77,8 +75,6 @@ class serialize_impl> } }; -} // namespace Serialization -} // namespace Core -} // namespace SST +} // namespace SST::Core::Serialization #endif // SST_CORE_SERIALIZATION_IMPL_SERIALIZE_DEQUE_H diff --git a/src/sst/core/serialization/impl/serialize_list.h b/src/sst/core/serialization/impl/serialize_list.h index 5997cb423..9faf2d93d 100644 --- a/src/sst/core/serialization/impl/serialize_list.h +++ b/src/sst/core/serialization/impl/serialize_list.h @@ -21,9 +21,7 @@ #include -namespace SST { -namespace Core { -namespace Serialization { +namespace SST::Core::Serialization { template class serialize_impl> @@ -80,8 +78,6 @@ class serialize_impl> } }; -} // namespace Serialization -} // namespace Core -} // namespace SST +} // namespace SST::Core::Serialization #endif // SST_CORE_SERIALIZATION_IMPL_SERIALIZE_LIST_H diff --git a/src/sst/core/serialization/impl/serialize_map.h b/src/sst/core/serialization/impl/serialize_map.h index 603e367b8..bdcff0b18 100644 --- a/src/sst/core/serialization/impl/serialize_map.h +++ b/src/sst/core/serialization/impl/serialize_map.h @@ -23,9 +23,7 @@ #include #include -namespace SST { -namespace Core { -namespace Serialization { +namespace SST::Core::Serialization { /** Class used to map std::map @@ -149,8 +147,6 @@ class serialize> } }; -} // namespace Serialization -} // namespace Core -} // namespace SST +} // namespace SST::Core::Serialization #endif // SST_CORE_SERIALIZATION_IMPL_SERIALIZE_MAP_H diff --git a/src/sst/core/serialization/impl/serialize_multiset.h b/src/sst/core/serialization/impl/serialize_multiset.h index b0da6ba5d..3b8ec672c 100644 --- a/src/sst/core/serialization/impl/serialize_multiset.h +++ b/src/sst/core/serialization/impl/serialize_multiset.h @@ -22,9 +22,7 @@ #include #include -namespace SST { -namespace Core { -namespace Serialization { +namespace SST::Core::Serialization { template class serialize> @@ -136,8 +134,6 @@ class serialize> } }; -} // namespace Serialization -} // namespace Core -} // namespace SST +} // namespace SST::Core::Serialization #endif // SST_CORE_SERIALIZATION_IMPL_SERIALIZE_MULTISET_H diff --git a/src/sst/core/serialization/impl/serialize_priority_queue.h b/src/sst/core/serialization/impl/serialize_priority_queue.h index 3bb1d26f5..b471372f9 100644 --- a/src/sst/core/serialization/impl/serialize_priority_queue.h +++ b/src/sst/core/serialization/impl/serialize_priority_queue.h @@ -21,10 +21,7 @@ #include -namespace SST { -namespace Core { -namespace Serialization { - +namespace SST::Core::Serialization { template class serialize> @@ -91,8 +88,6 @@ class serialize> } }; -} // namespace Serialization -} // namespace Core -} // namespace SST +} // namespace SST::Core::Serialization #endif // SST_CORE_SERIALIZATION_IMPL_SERIALIZE_PRIORITY_QUEUE_H diff --git a/src/sst/core/serialization/impl/serialize_set.h b/src/sst/core/serialization/impl/serialize_set.h index 3d49b29d7..c58cf0932 100644 --- a/src/sst/core/serialization/impl/serialize_set.h +++ b/src/sst/core/serialization/impl/serialize_set.h @@ -22,9 +22,7 @@ #include #include -namespace SST { -namespace Core { -namespace Serialization { +namespace SST::Core::Serialization { template class serialize> @@ -136,8 +134,6 @@ class serialize> } }; -} // namespace Serialization -} // namespace Core -} // namespace SST +} // namespace SST::Core::Serialization #endif // SST_CORE_SERIALIZATION_IMPL_SERIALIZE_SET_H diff --git a/src/sst/core/serialization/impl/serialize_string.h b/src/sst/core/serialization/impl/serialize_string.h index c242c48b2..c2adef1c5 100644 --- a/src/sst/core/serialization/impl/serialize_string.h +++ b/src/sst/core/serialization/impl/serialize_string.h @@ -19,9 +19,7 @@ #include "sst/core/serialization/serializer.h" -namespace SST { -namespace Core { -namespace Serialization { +namespace SST::Core::Serialization { class ObjectMapString : public ObjectMap { @@ -92,8 +90,6 @@ class serialize_impl } }; -} // namespace Serialization -} // namespace Core -} // namespace SST +} // namespace SST::Core::Serialization #endif // SST_CORE_SERIALIZATION_IMPL_SERIALIZE_STRING_H diff --git a/src/sst/core/serialization/impl/serialize_vector.h b/src/sst/core/serialization/impl/serialize_vector.h index 5bbfc9aa4..c11bb244c 100644 --- a/src/sst/core/serialization/impl/serialize_vector.h +++ b/src/sst/core/serialization/impl/serialize_vector.h @@ -22,10 +22,7 @@ #include #include -namespace SST { -namespace Core { -namespace Serialization { - +namespace SST::Core::Serialization { /** Class used to map std::vectors. @@ -161,9 +158,6 @@ class serialize_impl> // ObjectMapVector that knows how to handle the packing. }; - -} // namespace Serialization -} // namespace Core -} // namespace SST +} // namespace SST::Core::Serialization #endif // SST_CORE_SERIALIZATION_IMPL_SERIALIZE_VECTOR_H diff --git a/src/sst/core/serialization/impl/sizer.h b/src/sst/core/serialization/impl/sizer.h index 7f99b83e7..e366d7d01 100644 --- a/src/sst/core/serialization/impl/sizer.h +++ b/src/sst/core/serialization/impl/sizer.h @@ -19,10 +19,7 @@ #include "sst/core/warnmacros.h" -namespace SST { -namespace Core { -namespace Serialization { -namespace pvt { +namespace SST::Core::Serialization::pvt { class ser_sizer { @@ -47,9 +44,6 @@ class ser_sizer size_t size_; }; -} // namespace pvt -} // namespace Serialization -} // namespace Core -} // namespace SST +} // namespace SST::Core::Serialization::pvt #endif // SST_CORE_SERIALIZATION_IMPL_SIZER_H diff --git a/src/sst/core/serialization/impl/unpacker.h b/src/sst/core/serialization/impl/unpacker.h index 60e9fae47..4f4cf89bc 100644 --- a/src/sst/core/serialization/impl/unpacker.h +++ b/src/sst/core/serialization/impl/unpacker.h @@ -19,10 +19,7 @@ #include "sst/core/serialization/impl/ser_buffer_accessor.h" -namespace SST { -namespace Core { -namespace Serialization { -namespace pvt { +namespace SST::Core::Serialization::pvt { class ser_unpacker : public ser_buffer_accessor { @@ -44,9 +41,6 @@ class ser_unpacker : public ser_buffer_accessor void unpack_string(std::string& str); }; -} // namespace pvt -} // namespace Serialization -} // namespace Core -} // namespace SST +} // namespace SST::Core::Serialization::pvt #endif // SST_CORE_SERIALIZATION_IMPL_UNPACKER_H diff --git a/src/sst/core/serialization/objectMap.cc b/src/sst/core/serialization/objectMap.cc index 5913b4601..af1d633c5 100644 --- a/src/sst/core/serialization/objectMap.cc +++ b/src/sst/core/serialization/objectMap.cc @@ -17,9 +17,7 @@ #include -namespace SST { -namespace Core { -namespace Serialization { +namespace SST::Core::Serialization { // Static variable instantiation std::vector> ObjectMap::emptyVars; @@ -211,6 +209,4 @@ ObjectMap::listRecursive(const std::string& name, int level, int recurse) return ret; } -} // namespace Serialization -} // namespace Core -} // namespace SST +} // namespace SST::Core::Serialization diff --git a/src/sst/core/serialization/objectMap.h b/src/sst/core/serialization/objectMap.h index 18954d3c6..90bd1c47d 100644 --- a/src/sst/core/serialization/objectMap.h +++ b/src/sst/core/serialization/objectMap.h @@ -18,9 +18,7 @@ #include #include -namespace SST { -namespace Core { -namespace Serialization { +namespace SST::Core::Serialization { class ObjectMap; @@ -683,8 +681,6 @@ class ObjectMapFundamental : public ObjectMap }; -} // namespace Serialization -} // namespace Core -} // namespace SST +} // namespace SST::Core::Serialization #endif // SST_CORE_SERIALIZATION_OBJECTMAP_H diff --git a/src/sst/core/serialization/objectMapDeferred.h b/src/sst/core/serialization/objectMapDeferred.h index fd1a59ca4..6f55d7f3a 100644 --- a/src/sst/core/serialization/objectMapDeferred.h +++ b/src/sst/core/serialization/objectMapDeferred.h @@ -14,11 +14,7 @@ #include "sst/core/serialization/serializer.h" - -namespace SST { -namespace Core { -namespace Serialization { - +namespace SST::Core::Serialization { /** ObjectMap version that will delay building the internal data @@ -120,9 +116,6 @@ class ObjectMapDeferred : public ObjectMap std::string type_ = ""; }; - -} // namespace Serialization -} // namespace Core -} // namespace SST +} // namespace SST::Core::Serialization #endif // SST_CORE_SERIALIZATION_OBJECTMAPDEFERRED_H diff --git a/src/sst/core/serialization/serializable.cc b/src/sst/core/serialization/serializable.cc index fdf29c122..1379b70b7 100644 --- a/src/sst/core/serialization/serializable.cc +++ b/src/sst/core/serialization/serializable.cc @@ -15,10 +15,7 @@ #include -namespace SST { -namespace Core { -namespace Serialization { -namespace pvt { +namespace SST::Core::Serialization::pvt { static const long null_ptr_id = -1; @@ -69,7 +66,4 @@ map_serializable(serializable_base*& s, serializer& ser, const char* name) } } -} // namespace pvt -} // namespace Serialization -} // namespace Core -} // namespace SST +} // namespace SST::Core::Serialization::pvt diff --git a/src/sst/core/serialization/serializable.h b/src/sst/core/serialization/serializable.h index 07a9c9d22..d135f7f8b 100644 --- a/src/sst/core/serialization/serializable.h +++ b/src/sst/core/serialization/serializable.h @@ -15,11 +15,7 @@ #include "sst/core/serialization/serializable_base.h" #include "sst/core/serialization/serialize.h" - -namespace SST { -namespace Core { -namespace Serialization { - +namespace SST::Core::Serialization { class serializable : public serializable_base { @@ -143,10 +139,7 @@ class serialize_impl< } }; - -} // namespace Serialization -} // namespace Core -} // namespace SST +} // namespace SST::Core::Serialization //#include "sst/core/serialization/serialize_serializable.h" diff --git a/src/sst/core/serialization/serializable_base.cc b/src/sst/core/serialization/serializable_base.cc index 2270892c6..cb5070fc5 100644 --- a/src/sst/core/serialization/serializable_base.cc +++ b/src/sst/core/serialization/serializable_base.cc @@ -20,9 +20,7 @@ #include #include -namespace SST { -namespace Core { -namespace Serialization { +namespace SST::Core::Serialization { static need_delete_statics del_statics; serializable_factory::builder_map* serializable_factory::builders_ = nullptr; @@ -87,6 +85,4 @@ serializable_factory::get_serializable(uint32_t cls_id) return builder->build(); } -} // namespace Serialization -} // namespace Core -} // namespace SST +} // namespace SST::Core::Serialization diff --git a/src/sst/core/serialization/serializable_base.h b/src/sst/core/serialization/serializable_base.h index bb7f20365..e3dd10923 100644 --- a/src/sst/core/serialization/serializable_base.h +++ b/src/sst/core/serialization/serializable_base.h @@ -20,9 +20,7 @@ #include #include -namespace SST { -namespace Core { -namespace Serialization { +namespace SST::Core::Serialization { namespace pvt { @@ -273,9 +271,7 @@ const uint32_t serializable_builder_impl::cls_id_ = // class trivially_serializable { // }; -} // namespace Serialization -} // namespace Core -} // namespace SST +} // namespace SST::Core::Serialization #define SerializableName(obj) #obj diff --git a/src/sst/core/serialization/serialize.h b/src/sst/core/serialization/serialize.h index 72d9c10d4..f51b322ee 100644 --- a/src/sst/core/serialization/serialize.h +++ b/src/sst/core/serialization/serialize.h @@ -22,9 +22,7 @@ #include #include -namespace SST { -namespace Core { -namespace Serialization { +namespace SST::Core::Serialization { // Workaround for use with static_assert(), since static_assert(false) // will always assert, even when in an untaken if constexpr path. @@ -461,9 +459,7 @@ sst_map_object(serializer& ser, T& t, const char* name) #define SST_SER(obj) sst_map_object(ser, obj, #obj); #define SST_SER_AS_PTR(obj) ser | obj; -} // namespace Serialization -} // namespace Core -} // namespace SST +} // namespace SST::Core::Serialization // These includes have guards to print warnings if they are included // independent of this file. Set the #define that will disable the diff --git a/src/sst/core/serialization/serialize_impl_fwd.h b/src/sst/core/serialization/serialize_impl_fwd.h index 057e73c31..c79badcb2 100644 --- a/src/sst/core/serialization/serialize_impl_fwd.h +++ b/src/sst/core/serialization/serialize_impl_fwd.h @@ -19,16 +19,11 @@ // serialize_impl #include "sst/core/serialization/serializer_fwd.h" -namespace SST { -namespace Core { -namespace Serialization { +namespace SST::Core::Serialization { template class serialize_impl; - -} // namespace Serialization -} // namespace Core -} // namespace SST +} // namespace SST::Core::Serialization #endif // SST_CORE_SERIALIZATION_SERIALIZE_IMPL_FWD_H diff --git a/src/sst/core/serialization/serializer.cc b/src/sst/core/serialization/serializer.cc index 29df62972..5e1901b5c 100644 --- a/src/sst/core/serialization/serializer.cc +++ b/src/sst/core/serialization/serializer.cc @@ -16,9 +16,7 @@ #include "sst/core/output.h" #include "sst/core/serialization/serializable.h" -namespace SST { -namespace Core { -namespace Serialization { +namespace SST::Core::Serialization { namespace pvt { void @@ -99,6 +97,4 @@ serializer::string(std::string& str) } } -} // namespace Serialization -} // namespace Core -} // namespace SST +} // namespace SST::Core::Serialization diff --git a/src/sst/core/serialization/serializer.h b/src/sst/core/serialization/serializer.h index fc20bc78c..645773099 100644 --- a/src/sst/core/serialization/serializer.h +++ b/src/sst/core/serialization/serializer.h @@ -32,9 +32,7 @@ #include #include -namespace SST { -namespace Core { -namespace Serialization { +namespace SST::Core::Serialization { /** * This class is basically a wrapper for objects to declare the order in @@ -280,8 +278,6 @@ class serializer uintptr_t split_key; }; -} // namespace Serialization -} // namespace Core -} // namespace SST +} // namespace SST::Core::Serialization #endif // SST_CORE_SERIALIZATION_SERIALIZER_H diff --git a/src/sst/core/serialization/serializer_fwd.h b/src/sst/core/serialization/serializer_fwd.h index 75e7d538a..be10d4b94 100644 --- a/src/sst/core/serialization/serializer_fwd.h +++ b/src/sst/core/serialization/serializer_fwd.h @@ -12,14 +12,8 @@ #ifndef SST_CORE_SERIALIZATION_SERIALIZER_FWD_H #define SST_CORE_SERIALIZATION_SERIALIZER_FWD_H -namespace SST { -namespace Core { -namespace Serialization { - +namespace SST::Core::Serialization { class serializer; - -} // namespace Serialization -} // namespace Core -} // namespace SST +} // namespace SST::Core::Serialization #endif // SST_CORE_SERIALIZATION_SERIALIZER_FWD_H diff --git a/src/sst/core/serialization/statics.cc b/src/sst/core/serialization/statics.cc index b78f1c1f2..d76d17f25 100644 --- a/src/sst/core/serialization/statics.cc +++ b/src/sst/core/serialization/statics.cc @@ -12,9 +12,7 @@ #include "sst/core/serialization/statics.h" -namespace SST { -namespace Core { -namespace Serialization { +namespace SST::Core::Serialization { std::list* statics::fxns_ = nullptr; @@ -40,6 +38,4 @@ statics::finish() fxns_ = nullptr; } -} // namespace Serialization -} // namespace Core -} // namespace SST +} // namespace SST::Core::Serialization diff --git a/src/sst/core/serialization/statics.h b/src/sst/core/serialization/statics.h index d362ad58a..351426b8f 100644 --- a/src/sst/core/serialization/statics.h +++ b/src/sst/core/serialization/statics.h @@ -14,9 +14,7 @@ #include -namespace SST { -namespace Core { -namespace Serialization { +namespace SST::Core::Serialization { class statics { @@ -42,8 +40,6 @@ class need_delete_statics if ( x ) delete x; \ x = 0 -} // namespace Serialization -} // namespace Core -} // namespace SST +} // namespace SST::Core::Serialization #endif // SST_CORE_SERIALIZATION_STATICS_H diff --git a/src/sst/core/shared/sharedArray.h b/src/sst/core/shared/sharedArray.h index 9e8a022b6..90aec762f 100644 --- a/src/sst/core/shared/sharedArray.h +++ b/src/sst/core/shared/sharedArray.h @@ -18,8 +18,7 @@ #include -namespace SST { -namespace Shared { +namespace SST::Shared { /** SharedArray class. The class is templated to allow for an array @@ -808,7 +807,7 @@ class SharedArray : public SharedObject }; }; }; -} // namespace Shared -} // namespace SST + +} // namespace SST::Shared #endif // SST_CORE_SHARED_SHAREDARRAY_H diff --git a/src/sst/core/shared/sharedMap.h b/src/sst/core/shared/sharedMap.h index f450df7ca..db67d8660 100644 --- a/src/sst/core/shared/sharedMap.h +++ b/src/sst/core/shared/sharedMap.h @@ -17,8 +17,7 @@ #include -namespace SST { -namespace Shared { +namespace SST::Shared { /** SharedMap class. The class is templated to allow for Map of any @@ -372,7 +371,6 @@ class SharedMap : public SharedObject }; }; -} // namespace Shared -} // namespace SST +} // namespace SST::Shared #endif // SST_CORE_SHARED_SHAREDMAP_H diff --git a/src/sst/core/shared/sharedObject.cc b/src/sst/core/shared/sharedObject.cc index 461b5ea8f..c84d7aae1 100644 --- a/src/sst/core/shared/sharedObject.cc +++ b/src/sst/core/shared/sharedObject.cc @@ -22,8 +22,7 @@ #include "sst/core/simulation_impl.h" #include "sst/core/warnmacros.h" -namespace SST { -namespace Shared { +namespace SST::Shared { namespace Private { Output& @@ -123,5 +122,4 @@ SharedObjectDataManager::updateState(bool finalize) } } -} // namespace Shared -} // namespace SST +} // namespace SST::Shared diff --git a/src/sst/core/shared/sharedSet.h b/src/sst/core/shared/sharedSet.h index 70b104d95..ebd6d0338 100644 --- a/src/sst/core/shared/sharedSet.h +++ b/src/sst/core/shared/sharedSet.h @@ -17,8 +17,7 @@ #include -namespace SST { -namespace Shared { +namespace SST::Shared { /** SharedSet class. The class is templated to allow for an array @@ -348,7 +347,6 @@ class SharedSet : public SharedObject }; }; -} // namespace Shared -} // namespace SST +} // namespace SST::Shared #endif // SST_CORE_SHARED_SHAREDSET_H diff --git a/src/sst/core/sparseVectorMap.h b/src/sst/core/sparseVectorMap.h index 5d7a117da..a2b0d9dcf 100644 --- a/src/sst/core/sparseVectorMap.h +++ b/src/sst/core/sparseVectorMap.h @@ -800,9 +800,7 @@ class SparseVectorMap } // namespace SST -namespace SST { -namespace Core { -namespace Serialization { +namespace SST::Core::Serialization { template class serialize> @@ -810,8 +808,6 @@ class serialize> public: void operator()(SST::SparseVectorMap& v, SST::Core::Serialization::serializer& ser) { ser& v.data; } }; -} // namespace Serialization -} // namespace Core -} // namespace SST +} // namespace SST::Core::Serialization #endif // SST_CORE_SPARSEVECTORMAP_H diff --git a/src/sst/core/sstinfo.cc b/src/sst/core/sstinfo.cc index 57a070708..1404836ab 100644 --- a/src/sst/core/sstinfo.cc +++ b/src/sst/core/sstinfo.cc @@ -35,7 +35,6 @@ #include #include -using namespace std; using namespace SST; using namespace SST::Core; @@ -154,7 +153,7 @@ main(int argc, char* argv[]) // Run interactive mode if ( g_configuration.interactiveEnabled() ) { - std::cout << "Curses library not found. Run SST-Info without the -i flag." << endl; + std::cout << "Curses library not found. Run SST-Info without the -i flag." << std::endl; } return 0; @@ -764,6 +763,8 @@ SSTInfoConfig::getUsagePrelude() void SSTInfoConfig::outputUsage() { + using std::cout; + using std::endl; cout << "Usage: " << m_AppName << " [] " << " [options]" << endl; cout << " -h, --help Print Help Message\n"; @@ -851,6 +852,7 @@ SSTLibraryInfo::setLibraryInfo(std::string baseName, std::string componentName, void SSTLibraryInfo::outputText(std::stringstream& outputStream) { + using std::endl; if ( this->m_libraryFilter ) { outputStream << "\n================================================================================\n"; outputStream << "ELEMENT LIBRARY: " << this->m_name << endl; diff --git a/src/sst/core/sstpart.cc b/src/sst/core/sstpart.cc index f93afcbc7..4ba68bff6 100644 --- a/src/sst/core/sstpart.cc +++ b/src/sst/core/sstpart.cc @@ -15,8 +15,7 @@ #include "sst/core/output.h" -namespace SST { -namespace Partition { +namespace SST::Partition { SST_ELI_DEFINE_INFO_EXTERN(SSTPartitioner) SST_ELI_DEFINE_CTOR_EXTERN(SSTPartitioner) @@ -35,5 +34,4 @@ SSTPartitioner::performPartition(ConfigGraph* UNUSED(graph)) output.fatal(CALL_INFO, 1, "ERROR: chosen partitioner does not support ConfigGraph"); } -} // namespace Partition -} // namespace SST +} // namespace SST::Partition diff --git a/src/sst/core/statapi/statbase.cc b/src/sst/core/statapi/statbase.cc index 95c0f2c79..17a4fa32a 100644 --- a/src/sst/core/statapi/statbase.cc +++ b/src/sst/core/statapi/statbase.cc @@ -23,10 +23,7 @@ #include "sst/core/statapi/statoutputtxt.h" #include "sst/core/statapi/statuniquecount.h" -namespace SST { - -namespace Stat { -namespace pvt { +namespace SST::Stat::pvt { void registerStatWithEngineOnRestart(SST::Statistics::StatisticBase* s) @@ -34,11 +31,9 @@ registerStatWithEngineOnRestart(SST::Statistics::StatisticBase* s) Simulation_impl::getSimulation()->getStatisticsProcessingEngine()->registerStatisticWithEngine(s); } -} // namespace pvt -} // namespace Stat - -namespace Statistics { +} // namespace SST::Stat::pvt +namespace SST::Statistics { StatisticBase::StatisticBase( BaseComponent* comp, const std::string& statName, const std::string& statSubId, Params& statParams) @@ -274,5 +269,4 @@ SST_ELI_INSTANTIATE_STATISTIC(UniqueCountStatistic, uint64_t); SST_ELI_INSTANTIATE_STATISTIC(UniqueCountStatistic, float); SST_ELI_INSTANTIATE_STATISTIC(UniqueCountStatistic, double); -} // namespace Statistics -} // namespace SST +} // namespace SST::Statistics diff --git a/src/sst/core/statapi/statbase.h b/src/sst/core/statapi/statbase.h index 9216eab37..9446be6c8 100644 --- a/src/sst/core/statapi/statbase.h +++ b/src/sst/core/statapi/statbase.h @@ -590,17 +590,14 @@ struct ImplementsStatFields } // namespace Statistics -namespace Stat { -namespace pvt { +namespace Stat::pvt { /** Helper function for re-registering statistics during simulation restart */ void registerStatWithEngineOnRestart(SST::Statistics::StatisticBase* s); -} // namespace pvt -} // namespace Stat +} // namespace Stat::pvt -namespace Core { -namespace Serialization { +namespace Core::Serialization { template class serialize_impl*> @@ -654,9 +651,7 @@ class serialize_impl*> // } }; -} // namespace Serialization -} // namespace Core - +} // namespace Core::Serialization } // namespace SST diff --git a/src/sst/core/statapi/statengine.cc b/src/sst/core/statapi/statengine.cc index 3385ac9b5..960054497 100644 --- a/src/sst/core/statapi/statengine.cc +++ b/src/sst/core/statapi/statengine.cc @@ -28,8 +28,7 @@ #include #include -namespace SST { -namespace Statistics { +namespace SST::Statistics { std::vector StatisticProcessingEngine::m_statOutputs; @@ -644,5 +643,4 @@ StatisticProcessingEngine::serialize_order(SST::Core::Serialization::serializer& // they global already? } -} // namespace Statistics -} // namespace SST +} // namespace SST::Statistics diff --git a/src/sst/core/statapi/statfieldinfo.cc b/src/sst/core/statapi/statfieldinfo.cc index c6fc629fd..c36e298fb 100644 --- a/src/sst/core/statapi/statfieldinfo.cc +++ b/src/sst/core/statapi/statfieldinfo.cc @@ -17,8 +17,7 @@ #include "sst/core/simulation_impl.h" #include "sst/core/stringize.h" -namespace SST { -namespace Statistics { +namespace SST::Statistics { std::map* StatisticFieldTypeBase::fields_ = nullptr; fieldType_t StatisticFieldTypeBase::enumCounter_ = 0; @@ -98,5 +97,4 @@ static StatisticFieldType uint64_register("uint64_t", "u64"); static StatisticFieldType float_register("float", "f32"); static StatisticFieldType double_register("double", "f64"); -} // namespace Statistics -} // namespace SST +} // namespace SST::Statistics diff --git a/src/sst/core/statapi/statfieldinfo.h b/src/sst/core/statapi/statfieldinfo.h index f58d92c6d..e02f6da87 100644 --- a/src/sst/core/statapi/statfieldinfo.h +++ b/src/sst/core/statapi/statfieldinfo.h @@ -17,8 +17,7 @@ #include #include -namespace SST { -namespace Statistics { +namespace SST::Statistics { using fieldType_t = uint32_t; @@ -159,7 +158,6 @@ class StatisticFieldInfo fieldHandle_t m_fieldHandle; }; -} // namespace Statistics -} // namespace SST +} // namespace SST::Statistics #endif // SST_CORE_STATAPI_STATFIELDINFO_H diff --git a/src/sst/core/statapi/statgroup.cc b/src/sst/core/statapi/statgroup.cc index b46215d0f..828301a1e 100644 --- a/src/sst/core/statapi/statgroup.cc +++ b/src/sst/core/statapi/statgroup.cc @@ -23,8 +23,7 @@ #include -namespace SST { -namespace Statistics { +namespace SST::Statistics { StatisticGroup::StatisticGroup(const ConfigStatGroup& csg, StatisticProcessingEngine* engine) : isDefault(false), @@ -96,5 +95,4 @@ StatisticGroup::serialize_order(SST::Core::Serialization::serializer& ser) ser& statNames; } -} // namespace Statistics -} // namespace SST +} // namespace SST::Statistics diff --git a/src/sst/core/statapi/stathistogram.h b/src/sst/core/statapi/stathistogram.h index 9f12cd886..e4f2daef4 100644 --- a/src/sst/core/statapi/stathistogram.h +++ b/src/sst/core/statapi/stathistogram.h @@ -17,8 +17,7 @@ #include "sst/core/statapi/statoutput.h" #include "sst/core/warnmacros.h" -namespace SST { -namespace Statistics { +namespace SST::Statistics { // NOTE: When calling base class members in classes derived from // a templated base class. The user must use "this->" in @@ -360,7 +359,6 @@ class HistogramStatistic : public Statistic bool m_includeOutOfBounds; }; -} // namespace Statistics -} // namespace SST +} // namespace SST::Statistics #endif // SST_CORE_STATAPI_STATHISTOGRAM_H diff --git a/src/sst/core/statapi/statnull.h b/src/sst/core/statapi/statnull.h index 48baa7f9d..f7302fd61 100644 --- a/src/sst/core/statapi/statnull.h +++ b/src/sst/core/statapi/statnull.h @@ -16,8 +16,7 @@ #include "sst/core/statapi/statbase.h" #include "sst/core/warnmacros.h" -namespace SST { -namespace Statistics { +namespace SST::Statistics { // NOTE: When calling base class members of classes derived from // a templated base class. The user must use "this->" in @@ -160,7 +159,6 @@ struct NullStatistic : public Statistic } }; -} // namespace Statistics -} // namespace SST +} // namespace SST::Statistics #endif // SST_CORE_STATAPI_STATNULL_H diff --git a/src/sst/core/statapi/statoutput.cc b/src/sst/core/statapi/statoutput.cc index 0176e21ba..9a25b00b5 100644 --- a/src/sst/core/statapi/statoutput.cc +++ b/src/sst/core/statapi/statoutput.cc @@ -18,8 +18,7 @@ #include "sst/core/statapi/statgroup.h" #include "sst/core/stringize.h" -namespace SST { -namespace Statistics { +namespace SST::Statistics { //////////////////////////////////////////////////////////////////////////////// @@ -265,5 +264,4 @@ StatisticFieldsOutput::serialize_order(SST::Core::Serialization::serializer& ser StatisticOutput::serialize_order(ser); } -} // namespace Statistics -} // namespace SST +} // namespace SST::Statistics diff --git a/src/sst/core/statapi/statoutputcsv.cc b/src/sst/core/statapi/statoutputcsv.cc index b1826ea71..cf1461a54 100644 --- a/src/sst/core/statapi/statoutputcsv.cc +++ b/src/sst/core/statapi/statoutputcsv.cc @@ -15,8 +15,7 @@ #include "sst/core/stringize.h" -namespace SST { -namespace Statistics { +namespace SST::Statistics { StatisticOutputCSV::StatisticOutputCSV(Params& outputParameters) : StatisticFieldsOutput(outputParameters) { @@ -370,5 +369,4 @@ StatisticOutputCSV::serialize_order(SST::Core::Serialization::serializer& ser) ser& m_useCompression; } -} // namespace Statistics -} // namespace SST +} // namespace SST::Statistics diff --git a/src/sst/core/statapi/statoutputcsv.h b/src/sst/core/statapi/statoutputcsv.h index 37df4e3db..e288f63cd 100644 --- a/src/sst/core/statapi/statoutputcsv.h +++ b/src/sst/core/statapi/statoutputcsv.h @@ -19,8 +19,7 @@ #include #endif -namespace SST { -namespace Statistics { +namespace SST::Statistics { /** \class StatisticOutputCSV @@ -122,7 +121,6 @@ class StatisticOutputCSV : public StatisticFieldsOutput bool m_useCompression; }; -} // namespace Statistics -} // namespace SST +} // namespace SST::Statistics #endif // SST_CORE_STATAPI_STATOUTPUTCSV_H diff --git a/src/sst/core/statapi/statoutputhdf5.cc b/src/sst/core/statapi/statoutputhdf5.cc index f80761460..81735c38d 100644 --- a/src/sst/core/statapi/statoutputhdf5.cc +++ b/src/sst/core/statapi/statoutputhdf5.cc @@ -20,8 +20,7 @@ #include -namespace SST { -namespace Statistics { +namespace SST::Statistics { StatisticOutputHDF5::StatisticOutputHDF5(Params& outputParameters) : StatisticFieldsOutput(outputParameters), @@ -638,6 +637,4 @@ StatisticOutputHDF5::serialize_order(SST::Core::Serialization::serializer& ser) } } - -} // namespace Statistics -} // namespace SST +} // namespace SST::Statistics diff --git a/src/sst/core/statapi/statoutputhdf5.h b/src/sst/core/statapi/statoutputhdf5.h index 885abac46..5d23d5db0 100644 --- a/src/sst/core/statapi/statoutputhdf5.h +++ b/src/sst/core/statapi/statoutputhdf5.h @@ -23,8 +23,7 @@ REENABLE_WARNING #include #include -namespace SST { -namespace Statistics { +namespace SST::Statistics { /** \class StatisticOutputHDF5 @@ -251,7 +250,6 @@ class StatisticOutputHDF5 : public StatisticFieldsOutput StatisticInfo* getStatisticInfo(StatisticBase* statistic); }; -} // namespace Statistics -} // namespace SST +} // namespace SST::Statistics #endif // SST_CORE_STATAPI_STATOUTPUTHDF5_H diff --git a/src/sst/core/statapi/statoutputjson.cc b/src/sst/core/statapi/statoutputjson.cc index b19a6414a..7783611a0 100644 --- a/src/sst/core/statapi/statoutputjson.cc +++ b/src/sst/core/statapi/statoutputjson.cc @@ -16,8 +16,7 @@ #include "sst/core/statapi/statoutputcsv.h" #include "sst/core/stringize.h" -namespace SST { -namespace Statistics { +namespace SST::Statistics { StatisticOutputJSON::StatisticOutputJSON(Params& outputParameters) : StatisticFieldsOutput(outputParameters) { @@ -273,5 +272,4 @@ StatisticOutputJSON::serialize_order(SST::Core::Serialization::serializer& ser) ser& m_processedAnyStats; } -} // namespace Statistics -} // namespace SST +} // namespace SST::Statistics diff --git a/src/sst/core/statapi/statoutputjson.h b/src/sst/core/statapi/statoutputjson.h index d1adfeacc..3eeb09860 100644 --- a/src/sst/core/statapi/statoutputjson.h +++ b/src/sst/core/statapi/statoutputjson.h @@ -15,8 +15,7 @@ #include "sst/core/sst_types.h" #include "sst/core/statapi/statoutput.h" -namespace SST { -namespace Statistics { +namespace SST::Statistics { /** \class StatisticOutputJSON @@ -120,7 +119,6 @@ class StatisticOutputJSON : public StatisticFieldsOutput int m_curIndentLevel; }; -} // namespace Statistics -} // namespace SST +} // namespace SST::Statistics #endif // SST_CORE_STATAPI_STATOUTPUTJSON_H diff --git a/src/sst/core/statapi/statoutputtxt.cc b/src/sst/core/statapi/statoutputtxt.cc index 190cb6b8c..fa4a1476e 100644 --- a/src/sst/core/statapi/statoutputtxt.cc +++ b/src/sst/core/statapi/statoutputtxt.cc @@ -15,8 +15,7 @@ #include "sst/core/stringize.h" -namespace SST { -namespace Statistics { +namespace SST::Statistics { StatisticOutputTextBase::StatisticOutputTextBase(Params& outputParameters) : StatisticFieldsOutput(outputParameters) {} @@ -448,5 +447,4 @@ StatisticOutputConsole::serialize_order(SST::Core::Serialization::serializer& se StatisticOutputTextBase::serialize_order(ser); } -} // namespace Statistics -} // namespace SST +} // namespace SST::Statistics diff --git a/src/sst/core/statapi/statoutputtxt.h b/src/sst/core/statapi/statoutputtxt.h index 73e071750..0085028fc 100644 --- a/src/sst/core/statapi/statoutputtxt.h +++ b/src/sst/core/statapi/statoutputtxt.h @@ -19,9 +19,7 @@ #include #endif -namespace SST { -namespace Statistics { - +namespace SST::Statistics { class StatisticOutputTextBase : public StatisticFieldsOutput { @@ -272,7 +270,6 @@ class StatisticOutputConsole : public StatisticOutputTextBase bool getOutputRankDefault() override { return false; } }; -} // namespace Statistics -} // namespace SST +} // namespace SST::Statistics #endif // SST_CORE_STATAPI_STATOUTPUTTXT_H diff --git a/src/sst/core/testElements/coreTest_Checkpoint.h b/src/sst/core/testElements/coreTest_Checkpoint.h index 7d0b206c7..4f6422c10 100644 --- a/src/sst/core/testElements/coreTest_Checkpoint.h +++ b/src/sst/core/testElements/coreTest_Checkpoint.h @@ -18,8 +18,7 @@ #include "sst/core/rng/distrib.h" #include "sst/core/rng/rng.h" -namespace SST { -namespace CoreTestCheckpoint { +namespace SST::CoreTestCheckpoint { // Very simple starting case // Expected to have two components in simulation. @@ -153,7 +152,6 @@ class coreTestCheckpoint : public SST::Component Statistic* stat_dist; }; -} // namespace CoreTestCheckpoint -} // namespace SST +} // namespace SST::CoreTestCheckpoint #endif // SST_CORE_CORETEST_CHECKPOINT_H diff --git a/src/sst/core/testElements/coreTest_ClockerComponent.cc b/src/sst/core/testElements/coreTest_ClockerComponent.cc index 4d44da77e..e0d6058b7 100644 --- a/src/sst/core/testElements/coreTest_ClockerComponent.cc +++ b/src/sst/core/testElements/coreTest_ClockerComponent.cc @@ -15,8 +15,7 @@ #include "sst/core/testElements/coreTest_ClockerComponent.h" -namespace SST { -namespace CoreTestClockerComponent { +namespace SST::CoreTestClockerComponent { coreTestClockerComponent::coreTestClockerComponent(ComponentId_t id, Params& params) : Component(id) { @@ -117,5 +116,4 @@ coreTestClockerComponent::Oneshot2Callback() } // Serialization -} // namespace CoreTestClockerComponent -} // namespace SST +} // namespace SST::CoreTestClockerComponent diff --git a/src/sst/core/testElements/coreTest_ClockerComponent.h b/src/sst/core/testElements/coreTest_ClockerComponent.h index 9dfbbdd1e..a49376850 100644 --- a/src/sst/core/testElements/coreTest_ClockerComponent.h +++ b/src/sst/core/testElements/coreTest_ClockerComponent.h @@ -14,8 +14,7 @@ #include "sst/core/component.h" -namespace SST { -namespace CoreTestClockerComponent { +namespace SST::CoreTestClockerComponent { class coreTestClockerComponent : public SST::Component { @@ -75,7 +74,6 @@ class coreTestClockerComponent : public SST::Component int clock_count; }; -} // namespace CoreTestClockerComponent -} // namespace SST +} // namespace SST::CoreTestClockerComponent #endif // SST_CORE_CORETEST_CLOCKERCOMPONENT_H diff --git a/src/sst/core/testElements/coreTest_Component.h b/src/sst/core/testElements/coreTest_Component.h index ed3b406e4..5c623ee0b 100644 --- a/src/sst/core/testElements/coreTest_Component.h +++ b/src/sst/core/testElements/coreTest_Component.h @@ -16,8 +16,7 @@ #include "sst/core/link.h" #include "sst/core/rng/marsaglia.h" -namespace SST { -namespace CoreTestComponent { +namespace SST::CoreTestComponent { // These first two classes are just base classes to test ELI // inheritance. The definition of the ELI items are spread through 2 @@ -146,7 +145,6 @@ class coreTestComponent : public coreTestComponentBase2 SST::Statistics::Statistic* countW; }; -} // namespace CoreTestComponent -} // namespace SST +} // namespace SST::CoreTestComponent #endif // SST_CORE_CORETEST_COMPONENT_H diff --git a/src/sst/core/testElements/coreTest_ComponentEvent.h b/src/sst/core/testElements/coreTest_ComponentEvent.h index 707d80290..def992a28 100644 --- a/src/sst/core/testElements/coreTest_ComponentEvent.h +++ b/src/sst/core/testElements/coreTest_ComponentEvent.h @@ -12,8 +12,7 @@ #ifndef SST_CORE_CORETEST_COMPONENTEVENT_H #define SST_CORE_CORETEST_COMPONENTEVENT_H -namespace SST { -namespace CoreTestComponent { +namespace SST::CoreTestComponent { class coreTestComponentEvent : public SST::Event { @@ -32,7 +31,6 @@ class coreTestComponentEvent : public SST::Event ImplementSerializable(SST::CoreTestComponent::coreTestComponentEvent); }; -} // namespace CoreTestComponent -} // namespace SST +} // namespace SST::CoreTestComponent #endif // SST_CORE_CORETEST_COMPONENTEVENT_H diff --git a/src/sst/core/testElements/coreTest_DistribComponent.h b/src/sst/core/testElements/coreTest_DistribComponent.h index 8ae800ece..17d260a23 100644 --- a/src/sst/core/testElements/coreTest_DistribComponent.h +++ b/src/sst/core/testElements/coreTest_DistribComponent.h @@ -18,8 +18,7 @@ using namespace SST; using namespace SST::RNG; -namespace SST { -namespace CoreTestDistribComponent { +namespace SST::CoreTestDistribComponent { class coreTestDistribComponent : public SST::Component { @@ -78,7 +77,6 @@ class coreTestDistribComponent : public SST::Component std::map* bins; }; -} // namespace CoreTestDistribComponent -} // namespace SST +} // namespace SST::CoreTestDistribComponent #endif // SST_CORE_CORETEST_DISTRIBCOMPONENT_H diff --git a/src/sst/core/testElements/coreTest_Links.h b/src/sst/core/testElements/coreTest_Links.h index 77ccd6e28..b1c183398 100644 --- a/src/sst/core/testElements/coreTest_Links.h +++ b/src/sst/core/testElements/coreTest_Links.h @@ -16,8 +16,7 @@ #include "sst/core/link.h" #include "sst/core/rng/marsaglia.h" -namespace SST { -namespace CoreTestComponent { +namespace SST::CoreTestComponent { class coreTestLinks : public SST::Component { @@ -68,7 +67,6 @@ class coreTestLinks : public SST::Component SST::Link* W; }; -} // namespace CoreTestComponent -} // namespace SST +} // namespace SST::CoreTestComponent #endif // SST_CORE_CORETEST_LINKS_H diff --git a/src/sst/core/testElements/coreTest_LookupTableComponent.cc b/src/sst/core/testElements/coreTest_LookupTableComponent.cc index c9a3567a3..c1fe82ad9 100644 --- a/src/sst/core/testElements/coreTest_LookupTableComponent.cc +++ b/src/sst/core/testElements/coreTest_LookupTableComponent.cc @@ -22,8 +22,7 @@ #include #include -namespace SST { -namespace CoreTestLookupTableComponent { +namespace SST::CoreTestLookupTableComponent { coreTestLookupTableComponent::coreTestLookupTableComponent(SST::ComponentId_t id, SST::Params& params) : Component(id) { @@ -107,5 +106,4 @@ bool coreTestLookupTableComponent::tick(SST::Cycle_t) return false; } -} // namespace CoreTestLookupTableComponent -} // namespace SST +} // namespace SST::CoreTestLookupTableComponent diff --git a/src/sst/core/testElements/coreTest_LookupTableComponent.h b/src/sst/core/testElements/coreTest_LookupTableComponent.h index b0d63807f..a40c630af 100644 --- a/src/sst/core/testElements/coreTest_LookupTableComponent.h +++ b/src/sst/core/testElements/coreTest_LookupTableComponent.h @@ -16,8 +16,7 @@ #include "sst/core/output.h" #include "sst/core/sharedRegion.h" -namespace SST { -namespace CoreTestLookupTableComponent { +namespace SST::CoreTestLookupTableComponent { class coreTestLookupTableComponent : public SST::Component { @@ -66,7 +65,6 @@ class coreTestLookupTableComponent : public SST::Component SharedRegion* sregion; }; -} // namespace CoreTestLookupTableComponent -} // namespace SST +} // namespace SST::CoreTestLookupTableComponent #endif // SST_CORE_CORETEST_LOOKUPTABLECOMPONENT_H diff --git a/src/sst/core/testElements/coreTest_MemPoolTest.h b/src/sst/core/testElements/coreTest_MemPoolTest.h index 21c9943e1..dc19e23bb 100644 --- a/src/sst/core/testElements/coreTest_MemPoolTest.h +++ b/src/sst/core/testElements/coreTest_MemPoolTest.h @@ -17,9 +17,7 @@ #include -namespace SST { -namespace CoreTestMemPoolTest { - +namespace SST::CoreTestMemPoolTest { // We'll have 4 different sized events @@ -179,7 +177,6 @@ class MemPoolTestComponent : public SST::Component Event* createEvent(); }; -} // namespace CoreTestMemPoolTest -} // namespace SST +} // namespace SST::CoreTestMemPoolTest #endif // SST_CORE_CORETEST_COMPONENT_H diff --git a/src/sst/core/testElements/coreTest_Message.h b/src/sst/core/testElements/coreTest_Message.h index c8eb1ab12..aac95ee50 100644 --- a/src/sst/core/testElements/coreTest_Message.h +++ b/src/sst/core/testElements/coreTest_Message.h @@ -12,8 +12,7 @@ #ifndef SST_CORE_CORETEST_MESSAGE_H #define SST_CORE_CORETEST_MESSAGE_H -namespace SST { -namespace CoreTestMessageGeneratorComponent { +namespace SST::CoreTestMessageGeneratorComponent { class coreTestMessage : public SST::Event { @@ -26,7 +25,6 @@ class coreTestMessage : public SST::Event ImplementSerializable(SST::CoreTestMessageGeneratorComponent::coreTestMessage); }; -} // namespace CoreTestMessageGeneratorComponent -} // namespace SST +} // namespace SST::CoreTestMessageGeneratorComponent #endif // SST_CORE_CORETEST_MESSAGE_H diff --git a/src/sst/core/testElements/coreTest_MessageGeneratorComponent.h b/src/sst/core/testElements/coreTest_MessageGeneratorComponent.h index 4c7e38179..dbea707bb 100644 --- a/src/sst/core/testElements/coreTest_MessageGeneratorComponent.h +++ b/src/sst/core/testElements/coreTest_MessageGeneratorComponent.h @@ -15,8 +15,7 @@ #include "sst/core/component.h" #include "sst/core/link.h" -namespace SST { -namespace CoreTestMessageGeneratorComponent { +namespace SST::CoreTestMessageGeneratorComponent { class coreTestMessageGeneratorComponent : public SST::Component { @@ -74,7 +73,6 @@ class coreTestMessageGeneratorComponent : public SST::Component SST::Link* remote_component; }; -} // namespace CoreTestMessageGeneratorComponent -} // namespace SST +} // namespace SST::CoreTestMessageGeneratorComponent #endif // SST_CORE_CORETEST_MESSAGEGENERATORCOMPONENT_H diff --git a/src/sst/core/testElements/coreTest_Module.h b/src/sst/core/testElements/coreTest_Module.h index 8abab064a..a9b95f0bc 100644 --- a/src/sst/core/testElements/coreTest_Module.h +++ b/src/sst/core/testElements/coreTest_Module.h @@ -22,8 +22,7 @@ using namespace SST; using namespace SST::RNG; -namespace SST { -namespace CoreTestModule { +namespace SST::CoreTestModule { class CoreTestModuleExample : public SST::Module { @@ -109,7 +108,6 @@ class coreTestModuleLoader : public SST::Component CoreTestModuleExample* rng_module; }; -} // namespace CoreTestModule -} // namespace SST +} // namespace SST::CoreTestModule #endif // SST_CORE_CORETEST_MODULE_H diff --git a/src/sst/core/testElements/coreTest_Output.cc b/src/sst/core/testElements/coreTest_Output.cc index bfceba7e5..ee3a8b67a 100644 --- a/src/sst/core/testElements/coreTest_Output.cc +++ b/src/sst/core/testElements/coreTest_Output.cc @@ -15,9 +15,7 @@ #include "sst/core/testElements/coreTest_Output.h" -namespace SST { -namespace CoreTestSerialization { - +namespace SST::CoreTestSerialization { void testTraceFunction(int level = 0) @@ -57,6 +55,4 @@ coreTestOutput::coreTestOutput(ComponentId_t id, Params& params) : Component(id) if ( test == "TraceFunction" ) { testTraceFunction(); } } - -} // namespace CoreTestSerialization -} // namespace SST +} // namespace SST::CoreTestSerialization diff --git a/src/sst/core/testElements/coreTest_Output.h b/src/sst/core/testElements/coreTest_Output.h index 17d39ccb1..469275e20 100644 --- a/src/sst/core/testElements/coreTest_Output.h +++ b/src/sst/core/testElements/coreTest_Output.h @@ -14,8 +14,7 @@ #include "sst/core/component.h" -namespace SST { -namespace CoreTestSerialization { +namespace SST::CoreTestSerialization { class coreTestOutput : public SST::Component { @@ -52,7 +51,6 @@ class coreTestOutput : public SST::Component private: }; -} // namespace CoreTestSerialization -} // namespace SST +} // namespace SST::CoreTestSerialization #endif // SST_CORE_CORETEST_OUTPUT_H diff --git a/src/sst/core/testElements/coreTest_ParamComponent.cc b/src/sst/core/testElements/coreTest_ParamComponent.cc index 9673cc7c0..8a3dac065 100644 --- a/src/sst/core/testElements/coreTest_ParamComponent.cc +++ b/src/sst/core/testElements/coreTest_ParamComponent.cc @@ -17,8 +17,7 @@ #include -namespace SST { -namespace CoreTestParamComponent { +namespace SST::CoreTestParamComponent { coreTestParamComponent::coreTestParamComponent(ComponentId_t id, Params& params) : Component(id) { @@ -122,5 +121,4 @@ coreTestParamComponent::coreTestParamComponent(ComponentId_t id, Params& params) coreTestParamComponent::coreTestParamComponent() : Component(-1) {} -} // namespace CoreTestParamComponent -} // namespace SST +} // namespace SST::CoreTestParamComponent diff --git a/src/sst/core/testElements/coreTest_ParamComponent.h b/src/sst/core/testElements/coreTest_ParamComponent.h index 6e93e3b32..d0d23f026 100644 --- a/src/sst/core/testElements/coreTest_ParamComponent.h +++ b/src/sst/core/testElements/coreTest_ParamComponent.h @@ -14,8 +14,7 @@ #include "sst/core/component.h" -namespace SST { -namespace CoreTestParamComponent { +namespace SST::CoreTestParamComponent { class coreTestParamComponent : public SST::Component { @@ -68,7 +67,6 @@ class coreTestParamComponent : public SST::Component void operator=(const coreTestParamComponent&); // do not implement }; -} // namespace CoreTestParamComponent -} // namespace SST +} // namespace SST::CoreTestParamComponent #endif // SST_CORE_CORETEST_PARAMCOMPONENT_H diff --git a/src/sst/core/testElements/coreTest_PerfComponent.h b/src/sst/core/testElements/coreTest_PerfComponent.h index 0de2ebc91..07f9bcb10 100644 --- a/src/sst/core/testElements/coreTest_PerfComponent.h +++ b/src/sst/core/testElements/coreTest_PerfComponent.h @@ -16,8 +16,7 @@ #include #include -namespace SST { -namespace CoreTestPerfComponent { +namespace SST::CoreTestPerfComponent { // These first two classes are just base classes to test ELI // inheritance. The definition of the ELI items are spread through 2 @@ -127,7 +126,6 @@ class coreTestPerfComponent : public coreTestPerfComponentBase2 SST::Statistics::Statistic* countW; }; -} // namespace CoreTestPerfComponent -} // namespace SST +} // namespace SST::CoreTestPerfComponent #endif // SST_CORE_CORETEST_PERF_COMPONENT_H diff --git a/src/sst/core/testElements/coreTest_PortModule.h b/src/sst/core/testElements/coreTest_PortModule.h index 0d3e18e68..3d9124730 100644 --- a/src/sst/core/testElements/coreTest_PortModule.h +++ b/src/sst/core/testElements/coreTest_PortModule.h @@ -16,8 +16,7 @@ #include "sst/core/event.h" #include "sst/core/subcomponent.h" -namespace SST { -namespace CoreTestPortModule { +namespace SST::CoreTestPortModule { class PortSubComponent; @@ -113,7 +112,7 @@ class coreTestPortModuleComponent : public SST::Component SST_ELI_DOCUMENT_PORTS( {"left", "Link to the left. Will only receive on left port. If nothing is attached to the left port, the component will send sendcount events.", { "" } }, - {"right", "Link to the right. Will only send on right port. If nothing is connect to the right port, the component will check the types of the events recieved.", { "" } } + {"right", "Link to the right. Will only send on right port. If nothing is connect to the right port, the component will check the types of the events recieved.", { "" } } ) SST_ELI_DOCUMENT_PARAMS( @@ -194,7 +193,6 @@ class PortSubComponent : public SST::SubComponent ImplementSerializable(SST::CoreTestPortModule::PortSubComponent) }; -} // namespace CoreTestPortModule -} // namespace SST +} // namespace SST::CoreTestPortModule #endif // SST_CORE_CORETEST_PORTMODULE_H diff --git a/src/sst/core/testElements/coreTest_RNGComponent.h b/src/sst/core/testElements/coreTest_RNGComponent.h index c71e78e43..ffc0a3b51 100644 --- a/src/sst/core/testElements/coreTest_RNGComponent.h +++ b/src/sst/core/testElements/coreTest_RNGComponent.h @@ -18,8 +18,7 @@ using namespace SST; using namespace SST::RNG; -namespace SST { -namespace CoreTestRNGComponent { +namespace SST::CoreTestRNGComponent { class coreTestRNGComponent : public SST::Component { @@ -74,7 +73,6 @@ class coreTestRNGComponent : public SST::Component int rng_count; }; -} // namespace CoreTestRNGComponent -} // namespace SST +} // namespace SST::CoreTestRNGComponent #endif // SST_CORE_CORETEST_RNGCOMPONENT_H diff --git a/src/sst/core/testElements/coreTest_Serialization.cc b/src/sst/core/testElements/coreTest_Serialization.cc index bd500624b..682af3ca5 100644 --- a/src/sst/core/testElements/coreTest_Serialization.cc +++ b/src/sst/core/testElements/coreTest_Serialization.cc @@ -30,9 +30,7 @@ #include #include -namespace SST { -namespace CoreTestSerialization { - +namespace SST::CoreTestSerialization { template struct checkSimpleSerializeDeserialize @@ -781,6 +779,4 @@ coreTestSerialization::coreTestSerialization(ComponentId_t id, Params& params) : } } - -} // namespace CoreTestSerialization -} // namespace SST +} // namespace SST::CoreTestSerialization diff --git a/src/sst/core/testElements/coreTest_Serialization.h b/src/sst/core/testElements/coreTest_Serialization.h index 43d7c1a2d..415385130 100644 --- a/src/sst/core/testElements/coreTest_Serialization.h +++ b/src/sst/core/testElements/coreTest_Serialization.h @@ -15,8 +15,7 @@ #include "sst/core/component.h" #include "sst/core/rng/rng.h" -namespace SST { -namespace CoreTestSerialization { +namespace SST::CoreTestSerialization { class coreTestSerialization : public SST::Component { @@ -54,7 +53,6 @@ class coreTestSerialization : public SST::Component SST::RNG::Random* rng; }; -} // namespace CoreTestSerialization -} // namespace SST +} // namespace SST::CoreTestSerialization #endif // SST_CORE_CORETEST_SERIALIZATION_H diff --git a/src/sst/core/testElements/coreTest_SharedObjectComponent.cc b/src/sst/core/testElements/coreTest_SharedObjectComponent.cc index b2a1a4f9e..f23d171b3 100644 --- a/src/sst/core/testElements/coreTest_SharedObjectComponent.cc +++ b/src/sst/core/testElements/coreTest_SharedObjectComponent.cc @@ -21,8 +21,7 @@ #include #include -namespace SST { -namespace CoreTestSharedObjectsComponent { +namespace SST::CoreTestSharedObjectsComponent { using namespace Shared; @@ -384,5 +383,4 @@ coreTestSharedObjectsComponent::serialize_order(SST::Core::Serialization::serial if ( test_set ) SST_SER(set) } -} // namespace CoreTestSharedObjectsComponent -} // namespace SST +} // namespace SST::CoreTestSharedObjectsComponent diff --git a/src/sst/core/testElements/coreTest_SharedObjectComponent.h b/src/sst/core/testElements/coreTest_SharedObjectComponent.h index 22767dd5b..23f64a52d 100644 --- a/src/sst/core/testElements/coreTest_SharedObjectComponent.h +++ b/src/sst/core/testElements/coreTest_SharedObjectComponent.h @@ -18,8 +18,7 @@ #include "sst/core/shared/sharedMap.h" #include "sst/core/shared/sharedSet.h" -namespace SST { -namespace CoreTestSharedObjectsComponent { +namespace SST::CoreTestSharedObjectsComponent { // Class so that we can check to see if the equivalence check works // for sets @@ -131,7 +130,6 @@ class coreTestSharedObjectsComponent : public SST::Component Shared::SharedSet set; }; -} // namespace CoreTestSharedObjectsComponent -} // namespace SST +} // namespace SST::CoreTestSharedObjectsComponent #endif // SST_CORE_CORETEST_SHAREDOBJECT_H diff --git a/src/sst/core/testElements/coreTest_StatisticsComponent.h b/src/sst/core/testElements/coreTest_StatisticsComponent.h index 387ddf421..81dc00725 100644 --- a/src/sst/core/testElements/coreTest_StatisticsComponent.h +++ b/src/sst/core/testElements/coreTest_StatisticsComponent.h @@ -19,8 +19,7 @@ using namespace SST; using namespace SST::RNG; using namespace SST::Statistics; -namespace SST { -namespace CoreTestStatisticsComponent { +namespace SST::CoreTestStatisticsComponent { class StatisticsComponentInt : public SST::Component { @@ -142,7 +141,6 @@ class StatisticsComponentFloat : public SST::Component Statistic* stat3_F64; // For testing stat sharing }; -} // namespace CoreTestStatisticsComponent -} // namespace SST +} // namespace SST::CoreTestStatisticsComponent #endif // SST_CORE_CORETEST_STATISTICSCOMPONENT_H diff --git a/src/sst/core/testElements/coreTest_SubComponent.h b/src/sst/core/testElements/coreTest_SubComponent.h index 083925237..255817067 100644 --- a/src/sst/core/testElements/coreTest_SubComponent.h +++ b/src/sst/core/testElements/coreTest_SubComponent.h @@ -18,8 +18,7 @@ #include -namespace SST { -namespace CoreTestSubComponent { +namespace SST::CoreTestSubComponent { /* @@ -337,7 +336,6 @@ class SubCompReceiver : public SubCompSendRecvInterface void clock(Cycle_t) override; }; -} // namespace CoreTestSubComponent -} // namespace SST +} // namespace SST::CoreTestSubComponent #endif // SST_CORE_CORETEST_SUBCOMPONENT_H diff --git a/src/sst/core/testElements/message_mesh/enclosingComponent.h b/src/sst/core/testElements/message_mesh/enclosingComponent.h index 2f97c3514..ba0141d20 100644 --- a/src/sst/core/testElements/message_mesh/enclosingComponent.h +++ b/src/sst/core/testElements/message_mesh/enclosingComponent.h @@ -21,9 +21,7 @@ #include "sst/core/ssthandler.h" #include "sst/core/subcomponent.h" -namespace SST { -namespace CoreTest { -namespace MessageMesh { +namespace SST::CoreTest::MessageMesh { class PortInterface : public SST::SubComponent { @@ -233,8 +231,6 @@ class RouteMessage : public RouteInterface SST::RNG::Random* rng; }; -} // namespace MessageMesh -} // namespace CoreTest -} // namespace SST +} // namespace SST::CoreTest::MessageMesh #endif // SST_CORE_CORETEST_MESSAGEMESH_ENCLOSINGCOMPONENT_H diff --git a/src/sst/core/testElements/message_mesh/messageEvent.h b/src/sst/core/testElements/message_mesh/messageEvent.h index 841e03702..6b87f95c4 100644 --- a/src/sst/core/testElements/message_mesh/messageEvent.h +++ b/src/sst/core/testElements/message_mesh/messageEvent.h @@ -14,9 +14,7 @@ #include "sst/core/event.h" -namespace SST { -namespace CoreTest { -namespace MessageMesh { +namespace SST::CoreTest::MessageMesh { class MessageEvent : public SST::Event { @@ -26,8 +24,6 @@ class MessageEvent : public SST::Event ImplementSerializable(SST::CoreTest::MessageMesh::MessageEvent); }; -} // namespace MessageMesh -} // namespace CoreTest -} // namespace SST +} // namespace SST::CoreTest::MessageMesh #endif // SST_CORE_CORETEST_MESSAGEMESH_MESSAGEEVENT_H diff --git a/src/sst/core/threadsafe.h b/src/sst/core/threadsafe.h index ef87f5929..725366313 100644 --- a/src/sst/core/threadsafe.h +++ b/src/sst/core/threadsafe.h @@ -32,9 +32,7 @@ #include -namespace SST { -namespace Core { -namespace ThreadSafe { +namespace SST::Core::ThreadSafe { #if defined(__GNUC__) && ((__GNUC__ == 4 && __GNUC_MINOR__ < 8)) #define CACHE_ALIGNED(type, name) type name __attribute__((aligned(64))) @@ -332,8 +330,6 @@ atomic_fetch_min(std::atomic& min_value, T const& new_value) noexcept while ( old_value > new_value && !min_value.compare_exchange_weak(old_value, new_value) ) {} } -} // namespace ThreadSafe -} // namespace Core -} // namespace SST +} // namespace SST::Core::ThreadSafe #endif // SST_CORE_THREADSAFE_H diff --git a/src/sst/core/timeLord.cc b/src/sst/core/timeLord.cc index caef52e48..260cc8c44 100644 --- a/src/sst/core/timeLord.cc +++ b/src/sst/core/timeLord.cc @@ -182,8 +182,7 @@ TimeConverter::getPeriod() const return Simulation_impl::getTimeLord()->getTimeBase() * factor; } -namespace Core { -namespace Serialization { +namespace Core::Serialization { template <> class ObjectMapFundamental : public ObjectMap @@ -272,7 +271,6 @@ serialize_impl::operator()( } } -} // namespace Serialization -} // namespace Core +} // namespace Core::Serialization } // namespace SST diff --git a/src/sst/core/timeVortex.cc b/src/sst/core/timeVortex.cc index 03b729f7f..d43a3a683 100644 --- a/src/sst/core/timeVortex.cc +++ b/src/sst/core/timeVortex.cc @@ -17,9 +17,7 @@ #include "sst/core/simulation_impl.h" namespace SST { - -namespace TV { -namespace pvt { +namespace TV::pvt { void pack_timevortex(TimeVortex*& s, SST::Core::Serialization::serializer& ser) @@ -40,8 +38,7 @@ unpack_timevortex(TimeVortex*& s, SST::Core::Serialization::serializer& ser) s->serialize_order(ser); } -} // namespace pvt -} // namespace TV +} // namespace TV::pvt TimeVortex::TimeVortex() { diff --git a/src/sst/core/timeVortex.h b/src/sst/core/timeVortex.h index 3ebc2707c..603a289c8 100644 --- a/src/sst/core/timeVortex.h +++ b/src/sst/core/timeVortex.h @@ -60,14 +60,12 @@ class TimeVortex : public ActivityQueue Simulation_impl* sim_ = nullptr; }; -namespace TV { -namespace pvt { +namespace TV::pvt { void pack_timevortex(TimeVortex*& s, SST::Core::Serialization::serializer& ser); void unpack_timevortex(TimeVortex*& s, SST::Core::Serialization::serializer& ser); -} // namespace pvt -} // namespace TV +} // namespace TV::pvt template <> class SST::Core::Serialization::serialize_impl diff --git a/src/sst/core/unitAlgebra.cc b/src/sst/core/unitAlgebra.cc index 6901312fe..9faeb0c56 100644 --- a/src/sst/core/unitAlgebra.cc +++ b/src/sst/core/unitAlgebra.cc @@ -19,27 +19,26 @@ #include #include -using namespace std; using namespace SST; // Helper functions and data structures used only in this file static void -split(const std::string& input, const std::string& delims, vector& tokens) +split(const std::string& input, const std::string& delims, std::vector& tokens) { if ( input.length() == 0 ) return; size_t start = 0; size_t stop = 0; ; - vector ret; + std::vector ret; do { stop = input.find_first_of(delims, start); tokens.push_back(input.substr(start, stop - start)); start = stop + 1; - } while ( stop != string::npos ); + } while ( stop != std::string::npos ); } -static map si_unit_map = { +static std::map si_unit_map = { { "a", sst_big_num("1e-18") }, { "f", sst_big_num("1e-15") }, { "p", sst_big_num("1e-12") }, { "n", sst_big_num("1e-9") }, { "u", sst_big_num("1e-6") }, { "m", sst_big_num("1e-3") }, @@ -54,12 +53,12 @@ static map si_unit_map = { // Class Units -std::recursive_mutex Units::unit_lock; -map Units::valid_base_units; -map> Units::valid_compound_units; -map Units::unit_strings; -Units::unit_id_t Units::count; -bool Units::initialized = Units::initialize(); +std::recursive_mutex Units::unit_lock; +std::map Units::valid_base_units; +std::map> Units::valid_compound_units; +std::map Units::unit_strings; +Units::unit_id_t Units::count; +bool Units::initialized = Units::initialize(); bool Units::initialize() @@ -88,7 +87,7 @@ Units::reduce() sort(numerator.begin(), numerator.end()); sort(denominator.begin(), denominator.end()); - vector::iterator n, d; + std::vector::iterator n, d; n = numerator.begin(); d = denominator.begin(); @@ -146,12 +145,12 @@ Units::addUnit(const std::string& units, sst_big_num& multiplier, bool invert) } if ( si_length > 0 ) { - string si_unit = units.substr(0, si_length); + std::string si_unit = units.substr(0, si_length); multiplier *= si_unit_map[si_unit]; } // Check to see if the unit is valid and get its ID - string type = units.substr(si_length); + std::string type = units.substr(si_length); if ( valid_base_units.find(type) != valid_base_units.end() ) { if ( !invert ) { numerator.push_back(valid_base_units[type]); } else { @@ -160,7 +159,7 @@ Units::addUnit(const std::string& units, sst_big_num& multiplier, bool invert) } // Check to see if this is a compound unit else if ( valid_compound_units.find(type) != valid_compound_units.end() ) { - pair units = valid_compound_units[type]; + auto units = valid_compound_units[type]; if ( !invert ) { *this *= units.first; multiplier *= units.second; @@ -204,18 +203,18 @@ Units::registerCompoundUnit(const std::string& u, const std::string& v) Units::Units(const std::string& units, sst_big_num& multiplier) { // Get the numerator and the denominator - string s_numerator; - string s_denominator; + std::string s_numerator; + std::string s_denominator; size_t slash_index = units.find_first_of('/'); s_numerator = units.substr(0, slash_index); - if ( slash_index != string::npos ) s_denominator = units.substr(slash_index + 1); + if ( slash_index != std::string::npos ) s_denominator = units.substr(slash_index + 1); // Have numerator and denominator, now split each of those into // individual units, which will be separated with '-' // cout << "Numerator: " << s_numerator << endl; - vector tokens; + std::vector tokens; split(s_numerator, "-", tokens); // Add all the numerators @@ -283,7 +282,7 @@ Units::invert() return *this; } -string +std::string Units::toString() const { std::lock_guard lock(unit_lock); @@ -318,7 +317,7 @@ Units::toString() const // UnitAlgebra -string +std::string UnitAlgebra::trim(const std::string& str) { if ( !str.size() ) return str; @@ -340,7 +339,7 @@ void UnitAlgebra::init(const std::string& val) { // Trim off all whitespace on front and back - const string parse = trim(val); + const std::string parse = trim(val); // Start from the back and find the first digit. Split the string // at that point. @@ -352,8 +351,8 @@ UnitAlgebra::init(const std::string& val) } } - const string number = trim(parse.substr(0, split)); - string units = trim(parse.substr(split)); + const std::string number = trim(parse.substr(0, split)); + std::string units = trim(parse.substr(split)); sst_big_num multiplier(1); unit = Units(units, multiplier); @@ -361,7 +360,7 @@ UnitAlgebra::init(const std::string& val) try { value = sst_big_num(number); } - catch ( runtime_error& e ) { + catch ( std::runtime_error& e ) { throw InvalidNumberString(number); } @@ -374,33 +373,33 @@ UnitAlgebra::UnitAlgebra(const std::string& val) } void -UnitAlgebra::print(ostream& stream, int32_t precision) +UnitAlgebra::print(std::ostream& stream, int32_t precision) { - stream << value.toString(precision) << " " << unit.toString() << endl; + stream << value.toString(precision) << " " << unit.toString() << std::endl; } void UnitAlgebra::printWithBestSI(std::ostream& stream, int32_t precision) { - stream << toStringBestSI(precision) << endl; + stream << toStringBestSI(precision) << std::endl; } -string +std::string UnitAlgebra::toString(int32_t precision) const { - stringstream s; + std::stringstream s; s << value.toString(precision) << " " << unit.toString(); return s.str(); } -string +std::string UnitAlgebra::toStringBestSI(int32_t precision) const { - stringstream s; - sst_big_num temp; - string si; - bool found = false; - for ( map::iterator it = si_unit_map.begin(); it != si_unit_map.end(); ++it ) { + std::stringstream s; + sst_big_num temp; + std::string si; + bool found = false; + for ( auto it = si_unit_map.begin(); it != si_unit_map.end(); ++it ) { // Divide by the value, if it's between 1 and 1000, we have // the most natural SI unit if ( it->first.length() == 2 ) continue; // Don't do power of 2 units diff --git a/src/sst/core/util/smartTextFormatter.cc b/src/sst/core/util/smartTextFormatter.cc index 35aeb7e07..df97c2473 100644 --- a/src/sst/core/util/smartTextFormatter.cc +++ b/src/sst/core/util/smartTextFormatter.cc @@ -18,11 +18,7 @@ #include #include - -using namespace std; - -namespace SST { -namespace Util { +namespace SST::Util { void SmartTextFormatter::clear() @@ -241,5 +237,4 @@ SmartTextFormatter::getTerminalWidth() return w.ws_col > 0 ? w.ws_col : 80; } -} // namespace Util -} // namespace SST +} // namespace SST::Util diff --git a/src/sst/core/util/smartTextFormatter.h b/src/sst/core/util/smartTextFormatter.h index 49fe1b378..42e1d8988 100644 --- a/src/sst/core/util/smartTextFormatter.h +++ b/src/sst/core/util/smartTextFormatter.h @@ -15,8 +15,7 @@ #include #include -namespace SST { -namespace Util { +namespace SST::Util { /** Class to format text for console output. It will wrap lines at @@ -156,7 +155,6 @@ class SmartTextFormatter }; -} // namespace Util -} // namespace SST +} // namespace SST::Util #endif // SST_CORE_UTIL_SMARTTEXTFORMATTER_H