Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Concatenate nested namespaces (sonar).
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Tue, 10 May 2022 08:48:52 +0000 (10:48 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Tue, 10 May 2022 12:36:50 +0000 (14:36 +0200)
399 files changed:
src/bindings/java/JavaContext.cpp
src/bindings/java/JavaContext.hpp
src/bindings/java/jmsg.cpp
src/dag/loaders.cpp
src/include/xbt/parmap.hpp
src/instr/instr_config.cpp
src/instr/instr_interface.cpp
src/instr/instr_paje_containers.cpp
src/instr/instr_paje_containers.hpp
src/instr/instr_paje_events.cpp
src/instr/instr_paje_events.hpp
src/instr/instr_paje_header.cpp
src/instr/instr_paje_trace.cpp
src/instr/instr_paje_types.cpp
src/instr/instr_paje_types.hpp
src/instr/instr_paje_values.hpp
src/instr/instr_platform.cpp
src/instr/instr_private.hpp
src/instr/instr_resource_utilization.cpp
src/kernel/EngineImpl.cpp
src/kernel/EngineImpl.hpp
src/kernel/activity/ActivityImpl.cpp
src/kernel/activity/ActivityImpl.hpp
src/kernel/activity/BarrierImpl.cpp
src/kernel/activity/BarrierImpl.hpp
src/kernel/activity/CommImpl.cpp
src/kernel/activity/CommImpl.hpp
src/kernel/activity/ConditionVariableImpl.cpp
src/kernel/activity/ConditionVariableImpl.hpp
src/kernel/activity/ExecImpl.cpp
src/kernel/activity/ExecImpl.hpp
src/kernel/activity/IoImpl.cpp
src/kernel/activity/IoImpl.hpp
src/kernel/activity/MailboxImpl.cpp
src/kernel/activity/MailboxImpl.hpp
src/kernel/activity/MutexImpl.cpp
src/kernel/activity/MutexImpl.hpp
src/kernel/activity/SemaphoreImpl.cpp
src/kernel/activity/SemaphoreImpl.hpp
src/kernel/activity/SleepImpl.cpp
src/kernel/activity/SleepImpl.hpp
src/kernel/activity/Synchro.cpp
src/kernel/activity/Synchro.hpp
src/kernel/actor/ActorImpl.cpp
src/kernel/actor/ActorImpl.hpp
src/kernel/actor/CommObserver.cpp
src/kernel/actor/CommObserver.hpp
src/kernel/actor/Simcall.cpp
src/kernel/actor/Simcall.hpp
src/kernel/actor/SimcallObserver.cpp
src/kernel/actor/SimcallObserver.hpp
src/kernel/actor/SynchroObserver.cpp
src/kernel/actor/SynchroObserver.hpp
src/kernel/context/Context.cpp
src/kernel/context/Context.hpp
src/kernel/context/ContextBoost.cpp
src/kernel/context/ContextBoost.hpp
src/kernel/context/ContextRaw.cpp
src/kernel/context/ContextRaw.hpp
src/kernel/context/ContextSwapped.cpp
src/kernel/context/ContextSwapped.hpp
src/kernel/context/ContextThread.cpp
src/kernel/context/ContextThread.hpp
src/kernel/context/ContextUnix.cpp
src/kernel/context/ContextUnix.hpp
src/kernel/lmm/System.cpp
src/kernel/lmm/System.hpp
src/kernel/lmm/bmf.cpp
src/kernel/lmm/bmf.hpp
src/kernel/lmm/fair_bottleneck.hpp
src/kernel/lmm/maxmin.cpp
src/kernel/lmm/maxmin.hpp
src/kernel/resource/Action.cpp
src/kernel/resource/CpuImpl.cpp
src/kernel/resource/CpuImpl.hpp
src/kernel/resource/DiskImpl.cpp
src/kernel/resource/DiskImpl.hpp
src/kernel/resource/LinkImpl.hpp
src/kernel/resource/Model.cpp
src/kernel/resource/NetworkModel.cpp
src/kernel/resource/NetworkModel.hpp
src/kernel/resource/Resource.hpp
src/kernel/resource/SplitDuplexLinkImpl.cpp
src/kernel/resource/SplitDuplexLinkImpl.hpp
src/kernel/resource/StandardLinkImpl.cpp
src/kernel/resource/StandardLinkImpl.hpp
src/kernel/resource/VirtualMachineImpl.cpp
src/kernel/resource/VirtualMachineImpl.hpp
src/kernel/resource/WifiLinkImpl.cpp
src/kernel/resource/WifiLinkImpl.hpp
src/kernel/resource/profile/Event.hpp
src/kernel/resource/profile/FutureEvtSet.cpp
src/kernel/resource/profile/FutureEvtSet.hpp
src/kernel/resource/profile/Profile.cpp
src/kernel/resource/profile/Profile.hpp
src/kernel/resource/profile/ProfileBuilder.cpp
src/kernel/resource/profile/StochasticDatedValue.cpp
src/kernel/resource/profile/StochasticDatedValue.hpp
src/kernel/routing/ClusterZone.cpp
src/kernel/routing/DijkstraZone.cpp
src/kernel/routing/DragonflyZone.cpp
src/kernel/routing/EmptyZone.cpp
src/kernel/routing/FatTreeZone.cpp
src/kernel/routing/FloydZone.cpp
src/kernel/routing/FullZone.cpp
src/kernel/routing/NetPoint.cpp
src/kernel/routing/NetZoneImpl.cpp
src/kernel/routing/RoutedZone.cpp
src/kernel/routing/StarZone.cpp
src/kernel/routing/TorusZone.cpp
src/kernel/routing/VivaldiZone.cpp
src/kernel/routing/WifiZone.cpp
src/kernel/timer/Timer.cpp
src/mc/AddressSpace.hpp
src/mc/ModelChecker.cpp
src/mc/ModelChecker.hpp
src/mc/Session.cpp
src/mc/Session.hpp
src/mc/VisitedState.cpp
src/mc/VisitedState.hpp
src/mc/api.cpp
src/mc/api.hpp
src/mc/api/State.cpp
src/mc/api/State.hpp
src/mc/compare.cpp
src/mc/explo/CommunicationDeterminismChecker.cpp
src/mc/explo/DFSExplorer.cpp
src/mc/explo/DFSExplorer.hpp
src/mc/explo/Exploration.hpp
src/mc/explo/LivenessChecker.cpp
src/mc/explo/LivenessChecker.hpp
src/mc/explo/UdporChecker.cpp
src/mc/explo/UdporChecker.hpp
src/mc/inspect/DwarfExpression.cpp
src/mc/inspect/DwarfExpression.hpp
src/mc/inspect/Frame.cpp
src/mc/inspect/Frame.hpp
src/mc/inspect/LocationList.cpp
src/mc/inspect/LocationList.hpp
src/mc/inspect/ObjectInformation.cpp
src/mc/inspect/ObjectInformation.hpp
src/mc/inspect/Type.hpp
src/mc/inspect/Variable.hpp
src/mc/inspect/mc_dwarf.cpp
src/mc/inspect/mc_dwarf.hpp
src/mc/inspect/mc_dwarf_attrnames.cpp
src/mc/inspect/mc_dwarf_tagnames.cpp
src/mc/inspect/mc_member.cpp
src/mc/inspect/mc_unw.cpp
src/mc/inspect/mc_unw.hpp
src/mc/inspect/mc_unw_vmread.cpp
src/mc/mc_base.cpp
src/mc/mc_base.hpp
src/mc/mc_config.cpp
src/mc/mc_exit.hpp
src/mc/mc_forward.hpp
src/mc/mc_global.cpp
src/mc/mc_hash.cpp
src/mc/mc_hash.hpp
src/mc/mc_mmu.hpp
src/mc/mc_pattern.hpp
src/mc/mc_private.hpp
src/mc/mc_record.cpp
src/mc/mc_record.hpp
src/mc/mc_safety.hpp
src/mc/mc_smx.cpp
src/mc/remote/AppSide.cpp
src/mc/remote/AppSide.hpp
src/mc/remote/Channel.cpp
src/mc/remote/Channel.hpp
src/mc/remote/CheckerSide.cpp
src/mc/remote/CheckerSide.hpp
src/mc/remote/RemoteProcess.cpp
src/mc/remote/RemoteProcess.hpp
src/mc/remote/RemotePtr.hpp
src/mc/remote/mc_protocol.h
src/mc/sosp/ChunkedData.cpp
src/mc/sosp/ChunkedData.hpp
src/mc/sosp/PageStore.cpp
src/mc/sosp/PageStore.hpp
src/mc/sosp/Region.cpp
src/mc/sosp/Region.hpp
src/mc/sosp/Snapshot.cpp
src/mc/sosp/Snapshot.hpp
src/mc/transition/Transition.cpp
src/mc/transition/Transition.hpp
src/mc/transition/TransitionAny.cpp
src/mc/transition/TransitionAny.hpp
src/mc/transition/TransitionComm.cpp
src/mc/transition/TransitionComm.hpp
src/mc/transition/TransitionRandom.cpp
src/mc/transition/TransitionRandom.hpp
src/mc/transition/TransitionSynchro.cpp
src/mc/transition/TransitionSynchro.hpp
src/mc/udpor_global.cpp
src/mc/udpor_global.hpp
src/msg/msg_comm.cpp
src/plugins/ProducerConsumer.cpp
src/plugins/host_dvfs.cpp
src/plugins/host_energy.cpp
src/plugins/host_load.cpp
src/plugins/link_energy.cpp
src/plugins/link_energy_wifi.cpp
src/plugins/link_load.cpp
src/plugins/vm/VmLiveMigration.cpp
src/plugins/vm/VmLiveMigration.hpp
src/plugins/vm/dirty_page_tracking.cpp
src/s4u/s4u_Barrier.cpp
src/s4u/s4u_Comm.cpp
src/s4u/s4u_ConditionVariable.cpp
src/s4u/s4u_Engine.cpp
src/s4u/s4u_Exec.cpp
src/s4u/s4u_Io.cpp
src/s4u/s4u_Mailbox.cpp
src/s4u/s4u_Mutex.cpp
src/s4u/s4u_Netzone.cpp
src/s4u/s4u_Semaphore.cpp
src/s4u/s4u_VirtualMachine.cpp
src/simgrid/util.hpp
src/smpi/colls/allgather/allgather-2dmesh.cpp
src/smpi/colls/allgather/allgather-3dmesh.cpp
src/smpi/colls/allgather/allgather-GB.cpp
src/smpi/colls/allgather/allgather-NTSLR-NB.cpp
src/smpi/colls/allgather/allgather-NTSLR.cpp
src/smpi/colls/allgather/allgather-SMP-NTS.cpp
src/smpi/colls/allgather/allgather-bruck.cpp
src/smpi/colls/allgather/allgather-loosely-lr.cpp
src/smpi/colls/allgather/allgather-mvapich-smp.cpp
src/smpi/colls/allgather/allgather-ompi-neighborexchange.cpp
src/smpi/colls/allgather/allgather-pair.cpp
src/smpi/colls/allgather/allgather-rdb.cpp
src/smpi/colls/allgather/allgather-rhv.cpp
src/smpi/colls/allgather/allgather-ring.cpp
src/smpi/colls/allgather/allgather-smp-simple.cpp
src/smpi/colls/allgather/allgather-spreading-simple.cpp
src/smpi/colls/allgatherv/allgatherv-GB.cpp
src/smpi/colls/allgatherv/allgatherv-mpich-rdb.cpp
src/smpi/colls/allgatherv/allgatherv-mpich-ring.cpp
src/smpi/colls/allgatherv/allgatherv-ompi-bruck.cpp
src/smpi/colls/allgatherv/allgatherv-ompi-neighborexchange.cpp
src/smpi/colls/allgatherv/allgatherv-pair.cpp
src/smpi/colls/allgatherv/allgatherv-ring.cpp
src/smpi/colls/allreduce/allreduce-lr.cpp
src/smpi/colls/allreduce/allreduce-mvapich-rs.cpp
src/smpi/colls/allreduce/allreduce-mvapich-two-level.cpp
src/smpi/colls/allreduce/allreduce-ompi-ring-segmented.cpp
src/smpi/colls/allreduce/allreduce-rab-rdb.cpp
src/smpi/colls/allreduce/allreduce-rab1.cpp
src/smpi/colls/allreduce/allreduce-rab2.cpp
src/smpi/colls/allreduce/allreduce-rdb.cpp
src/smpi/colls/allreduce/allreduce-redbcast.cpp
src/smpi/colls/allreduce/allreduce-smp-binomial-pipeline.cpp
src/smpi/colls/allreduce/allreduce-smp-binomial.cpp
src/smpi/colls/allreduce/allreduce-smp-rdb.cpp
src/smpi/colls/allreduce/allreduce-smp-rsag-lr.cpp
src/smpi/colls/allreduce/allreduce-smp-rsag-rab.cpp
src/smpi/colls/allreduce/allreduce-smp-rsag.cpp
src/smpi/colls/alltoall/alltoall-2dmesh.cpp
src/smpi/colls/alltoall/alltoall-3dmesh.cpp
src/smpi/colls/alltoall/alltoall-basic-linear.cpp
src/smpi/colls/alltoall/alltoall-bruck.cpp
src/smpi/colls/alltoall/alltoall-mvapich-scatter-dest.cpp
src/smpi/colls/alltoall/alltoall-pair-light-barrier.cpp
src/smpi/colls/alltoall/alltoall-pair-mpi-barrier.cpp
src/smpi/colls/alltoall/alltoall-pair-one-barrier.cpp
src/smpi/colls/alltoall/alltoall-pair.cpp
src/smpi/colls/alltoall/alltoall-rdb.cpp
src/smpi/colls/alltoall/alltoall-ring-light-barrier.cpp
src/smpi/colls/alltoall/alltoall-ring-mpi-barrier.cpp
src/smpi/colls/alltoall/alltoall-ring-one-barrier.cpp
src/smpi/colls/alltoall/alltoall-ring.cpp
src/smpi/colls/alltoallv/alltoallv-bruck.cpp
src/smpi/colls/alltoallv/alltoallv-ompi-basic-linear.cpp
src/smpi/colls/alltoallv/alltoallv-pair-light-barrier.cpp
src/smpi/colls/alltoallv/alltoallv-pair-mpi-barrier.cpp
src/smpi/colls/alltoallv/alltoallv-pair-one-barrier.cpp
src/smpi/colls/alltoallv/alltoallv-pair.cpp
src/smpi/colls/alltoallv/alltoallv-ring-light-barrier.cpp
src/smpi/colls/alltoallv/alltoallv-ring-mpi-barrier.cpp
src/smpi/colls/alltoallv/alltoallv-ring-one-barrier.cpp
src/smpi/colls/alltoallv/alltoallv-ring.cpp
src/smpi/colls/barrier/barrier-mpich-smp.cpp
src/smpi/colls/barrier/barrier-mvapich2-pair.cpp
src/smpi/colls/barrier/barrier-ompi.cpp
src/smpi/colls/bcast/bcast-NTSB.cpp
src/smpi/colls/bcast/bcast-NTSL-Isend.cpp
src/smpi/colls/bcast/bcast-NTSL.cpp
src/smpi/colls/bcast/bcast-SMP-binary.cpp
src/smpi/colls/bcast/bcast-SMP-binomial.cpp
src/smpi/colls/bcast/bcast-SMP-linear.cpp
src/smpi/colls/bcast/bcast-arrival-pattern-aware-wait.cpp
src/smpi/colls/bcast/bcast-arrival-pattern-aware.cpp
src/smpi/colls/bcast/bcast-arrival-scatter.cpp
src/smpi/colls/bcast/bcast-binomial-tree.cpp
src/smpi/colls/bcast/bcast-flattree-pipeline.cpp
src/smpi/colls/bcast/bcast-flattree.cpp
src/smpi/colls/bcast/bcast-mvapich-smp.cpp
src/smpi/colls/bcast/bcast-ompi-pipeline.cpp
src/smpi/colls/bcast/bcast-ompi-split-bintree.cpp
src/smpi/colls/bcast/bcast-scatter-LR-allgather.cpp
src/smpi/colls/bcast/bcast-scatter-rdb-allgather.cpp
src/smpi/colls/gather/gather-mvapich.cpp
src/smpi/colls/gather/gather-ompi.cpp
src/smpi/colls/reduce/reduce-NTSL.cpp
src/smpi/colls/reduce/reduce-arrival-pattern-aware.cpp
src/smpi/colls/reduce/reduce-binomial.cpp
src/smpi/colls/reduce/reduce-flat-tree.cpp
src/smpi/colls/reduce/reduce-mvapich-knomial.cpp
src/smpi/colls/reduce/reduce-mvapich-two-level.cpp
src/smpi/colls/reduce/reduce-ompi.cpp
src/smpi/colls/reduce/reduce-rab.cpp
src/smpi/colls/reduce/reduce-scatter-gather.cpp
src/smpi/colls/reduce_scatter/reduce_scatter-mpich.cpp
src/smpi/colls/reduce_scatter/reduce_scatter-ompi.cpp
src/smpi/colls/scatter/scatter-mvapich-two-level.cpp
src/smpi/colls/scatter/scatter-ompi.cpp
src/smpi/colls/smpi_automatic_selector.cpp
src/smpi/colls/smpi_coll.cpp
src/smpi/colls/smpi_default_selector.cpp
src/smpi/colls/smpi_intel_mpi_selector.cpp
src/smpi/colls/smpi_mpich_selector.cpp
src/smpi/colls/smpi_mvapich2_selector.cpp
src/smpi/colls/smpi_nbc_impl.cpp
src/smpi/colls/smpi_openmpi_selector.cpp
src/smpi/include/smpi_actor.hpp
src/smpi/include/smpi_coll.hpp
src/smpi/include/smpi_comm.hpp
src/smpi/include/smpi_datatype.hpp
src/smpi/include/smpi_datatype_derived.hpp
src/smpi/include/smpi_errhandler.hpp
src/smpi/include/smpi_f2c.hpp
src/smpi/include/smpi_file.hpp
src/smpi/include/smpi_group.hpp
src/smpi/include/smpi_host.hpp
src/smpi/include/smpi_info.hpp
src/smpi/include/smpi_keyvals.hpp
src/smpi/include/smpi_op.hpp
src/smpi/include/smpi_replay.hpp
src/smpi/include/smpi_request.hpp
src/smpi/include/smpi_status.hpp
src/smpi/include/smpi_topo.hpp
src/smpi/include/smpi_utils.hpp
src/smpi/include/smpi_win.hpp
src/smpi/internals/smpi_actor.cpp
src/smpi/internals/smpi_deployment.cpp
src/smpi/internals/smpi_host.cpp
src/smpi/internals/smpi_replay.cpp
src/smpi/internals/smpi_utils.cpp
src/smpi/mpi/smpi_comm.cpp
src/smpi/mpi/smpi_datatype.cpp
src/smpi/mpi/smpi_datatype_derived.cpp
src/smpi/mpi/smpi_errhandler.cpp
src/smpi/mpi/smpi_f2c.cpp
src/smpi/mpi/smpi_file.cpp
src/smpi/mpi/smpi_group.cpp
src/smpi/mpi/smpi_info.cpp
src/smpi/mpi/smpi_keyvals.cpp
src/smpi/mpi/smpi_op.cpp
src/smpi/mpi/smpi_request.cpp
src/smpi/mpi/smpi_status.cpp
src/smpi/mpi/smpi_topo.cpp
src/smpi/mpi/smpi_win.cpp
src/smpi/plugins/ampi/ampi.cpp
src/smpi/plugins/ampi/ampi.hpp
src/surf/HostImpl.cpp
src/surf/HostImpl.hpp
src/surf/cpu_cas01.cpp
src/surf/cpu_cas01.hpp
src/surf/cpu_ti.cpp
src/surf/cpu_ti.hpp
src/surf/disk_s19.cpp
src/surf/disk_s19.hpp
src/surf/host_clm03.cpp
src/surf/host_clm03.hpp
src/surf/network_cm02.cpp
src/surf/network_cm02.hpp
src/surf/network_constant.cpp
src/surf/network_constant.hpp
src/surf/network_ib.cpp
src/surf/network_ib.hpp
src/surf/network_ns3.cpp
src/surf/network_ns3.hpp
src/surf/network_smpi.cpp
src/surf/network_smpi.hpp
src/surf/ptask_L07.cpp
src/surf/ptask_L07.hpp
src/surf/sg_platf.cpp
src/surf/xml/platf_private.hpp
src/xbt/OsSemaphore.hpp
src/xbt/PropertyHolder.cpp
src/xbt/backtrace.cpp
src/xbt/config.cpp
src/xbt/exception.cpp
src/xbt/memory_map.cpp
src/xbt/memory_map.hpp
src/xbt/random.cpp
src/xbt/string.cpp
src/xbt/xbt_main.cpp
src/xbt/xbt_replay.cpp

index 8013b2c..a9ea072 100644 (file)
@@ -17,9 +17,7 @@ extern JavaVM* __java_vm;
 
 XBT_LOG_NEW_DEFAULT_CATEGORY(java, "MSG for Java(TM)");
 
-namespace simgrid {
-namespace kernel {
-namespace context {
+namespace simgrid::kernel::context {
 
 JavaContextFactory::JavaContextFactory() : ContextFactory()
 {
@@ -77,4 +75,4 @@ void JavaContext::stop()
   simgrid::ForcefulKillException::do_throw(); // clean RAII variables with the dedicated exception
 }
 
-}}} // namespace simgrid::kernel::context
+} // namespace simgrid::kernel::context
index 30c7bad..52598c6 100644 (file)
@@ -15,9 +15,7 @@
 
 #include "jmsg.hpp"
 
-namespace simgrid {
-namespace kernel {
-namespace context {
+namespace simgrid::kernel::context {
 
 class JavaContext;
 class JavacontextFactory;
@@ -47,8 +45,6 @@ public:
 XBT_PRIVATE ContextFactory* java_factory();
 XBT_PRIVATE void java_main_jprocess(jobject process);
 
-} // namespace context
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::context
 
 #endif /* SIMGRID_JAVA_JAVA_CONTEXT_HPP */
index 29de926..bcf7c86 100644 (file)
@@ -294,9 +294,7 @@ static void java_main(int argc, char* argv[])
   run_jprocess(env, context->jprocess_);
 }
 
-namespace simgrid {
-namespace kernel {
-namespace context {
+namespace simgrid::kernel::context {
 
 /** Run the Java org.simgrid.msg.Process */
 void java_main_jprocess(jobject jprocess)
@@ -308,6 +306,4 @@ void java_main_jprocess(jobject jprocess)
 
   run_jprocess(env, context->jprocess_);
 }
-} // namespace context
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::context
index 29999ff..5cd632f 100644 (file)
@@ -72,8 +72,7 @@ static bool check_for_cycle(const std::vector<simgrid::s4u::ActivityPtr>& dag)
 
 static YY_BUFFER_STATE input_buffer;
 
-namespace simgrid {
-namespace s4u {
+namespace simgrid::s4u {
 
 static std::vector<ActivityPtr> result;
 static std::map<std::string, ExecPtr, std::less<>> jobs;
@@ -291,8 +290,7 @@ std::vector<ActivityPtr> create_DAG_from_dot(const std::string& filename)
           "Please install graphviz, graphviz-dev, and libgraphviz-dev (and erase CMakeCache.txt) before recompiling.");
 }
 #endif
-} // namespace s4u
-} // namespace simgrid
+} // namespace simgrid::s4u
 
 void STag_dax__adag()
 {
index be13332..f782f59 100644 (file)
@@ -29,8 +29,7 @@
 
 XBT_LOG_EXTERNAL_CATEGORY(xbt_parmap);
 
-namespace simgrid {
-namespace xbt {
+namespace simgrid::xbt {
 
 /** @addtogroup XBT_parmap
  * @ingroup XBT_misc
@@ -419,7 +418,6 @@ template <typename T> void Parmap<T>::BusyWaitSynchro::worker_wait(unsigned roun
 }
 
 /** @} */
-}
-}
+} // namespace simgrid::xbt
 
 #endif
index 22ad0fe..5a6075f 100644 (file)
@@ -206,8 +206,7 @@ void TRACE_help()
              "  within the same Autonomous System (AS).");
 }
 
-namespace simgrid {
-namespace instr {
+namespace simgrid::instr {
 static bool trace_active = false;
 TraceFormat trace_format = TraceFormat::Paje;
 int trace_precision;
@@ -468,5 +467,4 @@ void init()
   s4u::Engine::on_deadlock_cb(on_simulation_end);
   s4u::Engine::on_simulation_end_cb(on_simulation_end);
 }
-} // namespace instr
-} // namespace simgrid
+} // namespace simgrid::instr
index 20a9c89..73de1d2 100644 (file)
@@ -75,8 +75,7 @@ static void instr_user_srcdst_variable(double time, const std::string& src, cons
     instr_user_variable(time, link->get_cname(), variable, "LINK", value, what, "", &user_link_variables);
 }
 
-namespace simgrid {
-namespace instr {
+namespace simgrid::instr {
 /* for host variables */
 /** @brief Declare a new user variable associated to hosts.
  *
@@ -331,8 +330,7 @@ const std::set<std::string, std::less<>>& get_tracing_categories()
   return created_categories;
 }
 
-} // namespace instr
-} // namespace simgrid
+} // namespace simgrid::instr
 
 static xbt_dynar_t instr_set_to_dynar(const std::set<std::string, std::less<>>& filter) // XBT_ATTRIB_DEPRECATED_v334
 {
index 647857d..f53a608 100644 (file)
@@ -10,8 +10,7 @@
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY (instr_paje_containers, instr, "Paje tracing event system (containers)");
 
-namespace simgrid {
-namespace instr {
+namespace simgrid::instr {
 
 Container* Container::root_container_ = nullptr;              /* the root container */
 std::map<std::string, Container*, std::less<>> Container::all_containers_; /* all created containers indexed by name */
@@ -136,5 +135,4 @@ EntityValue::EntityValue(const std::string& name, const std::string& color, Type
   on_creation(*this);
 }
 
-} // namespace instr
-} // namespace simgrid
+} // namespace simgrid::instr
index 06e6219..a4a4fe0 100644 (file)
@@ -9,8 +9,7 @@
 #include "src/instr/instr_private.hpp"
 #include <string>
 
-namespace simgrid {
-namespace instr {
+namespace simgrid::instr {
 class Type;
 class LinkType;
 class StateType;
@@ -75,6 +74,5 @@ class HostContainer : public Container {
 public:
   HostContainer(s4u::Host const& host, NetZoneContainer* parent);
 };
-} // namespace instr
-} // namespace simgrid
+} // namespace simgrid::instr
 #endif
index a9b5964..c66ef1e 100644 (file)
@@ -11,8 +11,7 @@
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(instr_paje_events, instr, "Paje tracing event system (events)");
 
-namespace simgrid {
-namespace instr {
+namespace simgrid::instr {
 
 PajeEvent::PajeEvent(Container* container, Type* type, double timestamp, PajeEventType eventType)
     : container_(container), type_(type), timestamp_(timestamp), eventType_(eventType)
@@ -84,5 +83,4 @@ void StateEvent::print()
     THROW_IMPOSSIBLE;
   }
 }
-} // namespace instr
-} // namespace simgrid
+} // namespace simgrid::instr
index c5cfb8a..d182088 100644 (file)
@@ -12,8 +12,7 @@
 #include <sstream>
 #include <string>
 
-namespace simgrid {
-namespace instr {
+namespace simgrid::instr {
 class EntityValue;
 class TIData;
 
@@ -125,6 +124,5 @@ public:
   }
   void print() override;
 };
-} // namespace instr
-} // namespace simgrid
+} // namespace simgrid::instr
 #endif
index 055c409..725117b 100644 (file)
@@ -11,9 +11,7 @@
 #include "xbt/virtu.h" /* xbt::cmdline */
 
 extern std::ofstream tracing_file;
-namespace simgrid {
-namespace instr {
-namespace paje {
+namespace simgrid::instr::paje {
 
 void dump_generator_version()
 {
@@ -196,6 +194,4 @@ void dump_header(bool basic, bool display_sizes)
   tracing_file << "%       Value string" << std::endl;
   tracing_file << "%EndEventDef" << std::endl;
 }
-} // namespace paje
-} // namespace instr
-} // namespace simgrid
+} // namespace simgrid::instr::paje
index c2b75b1..4643138 100644 (file)
@@ -13,8 +13,7 @@
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(instr_paje_trace, instr, "tracing event system");
 
-namespace simgrid {
-namespace instr {
+namespace simgrid::instr {
 static std::vector<PajeEvent*> buffer;
 
 double last_timestamp_to_dump = 0;
@@ -65,5 +64,4 @@ void PajeEvent::insert_into_buffer()
   buffer.insert(i.base(), this);
 }
 
-} // namespace instr
-} // namespace simgrid
+} // namespace simgrid::instr
index 2d7a70f..d5658ef 100644 (file)
@@ -9,8 +9,7 @@
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY (instr_paje_types, instr, "Paje tracing event system (types)");
 
-namespace simgrid {
-namespace instr {
+namespace simgrid::instr {
 
 long long int new_paje_id()
 {
@@ -163,5 +162,4 @@ LinkType* Type::by_name_or_create(const std::string& name, const Type* source, c
   } else
     return static_cast<LinkType*>(it->second.get());
 }
-} // namespace instr
-} // namespace simgrid
+} // namespace simgrid::instr
index 0961d6e..ac914db 100644 (file)
@@ -11,8 +11,7 @@
 #include <string>
 #include <vector>
 
-namespace simgrid {
-namespace instr {
+namespace simgrid::instr {
 class ContainerType;
 class EventType;
 
@@ -131,6 +130,5 @@ public:
   void pop_event();
   void pop_event(TIData* extra);
 };
-} // namespace instr
-} // namespace simgrid
+} // namespace simgrid::instr
 #endif
index ce7dcc3..045a829 100644 (file)
@@ -9,8 +9,7 @@
 #include "src/instr/instr_private.hpp"
 #include <string>
 
-namespace simgrid {
-namespace instr {
+namespace simgrid::instr {
 
 class EntityValue {
   long long int id_ = new_paje_id();
@@ -30,7 +29,6 @@ public:
   std::string get_color() const { return color_; }
   Type* get_parent() const { return parent_; }
 };
-} // namespace instr
-} // namespace simgrid
+} // namespace simgrid::instr
 
 #endif
index 83cd966..5594252 100644 (file)
@@ -203,8 +203,7 @@ void instr_new_value_for_user_state_type(const std::string& type_name, const cha
   recursiveNewValueForUserStateType(type_name, value, color, simgrid::instr::Container::get_root()->get_type());
 }
 
-namespace simgrid {
-namespace instr {
+namespace simgrid::instr {
 
 /** @brief Creates a file with the topology of the platform file used for the simulator.
  *
@@ -505,5 +504,4 @@ void define_callbacks()
         [](s4u::Host const& host) { Container::by_name(host.get_name())->remove_from_parent(); });
   }
 }
-} // namespace instr
-} // namespace simgrid
+} // namespace simgrid::instr
index f289b78..e311655 100644 (file)
@@ -24,8 +24,7 @@
 #include <sstream>
 #include <string>
 
-namespace simgrid {
-namespace instr {
+namespace simgrid::instr {
 namespace paje {
 
 void dump_generator_version();
@@ -230,8 +229,7 @@ public:
   }
   std::string display_size() override { return "NA"; }
 };
-} // namespace instr
-} // namespace simgrid
+} // namespace simgrid::instr
 
 XBT_PRIVATE std::string instr_pid(simgrid::s4u::Actor const& proc);
 
index a2f4806..3b8a2f9 100644 (file)
@@ -10,8 +10,7 @@
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY (instr_resource, instr, "tracing (un)-categorized resource utilization");
 
-namespace simgrid {
-namespace instr {
+namespace simgrid::instr {
 void resource_set_utilization(const char* type, const char* name, const char* resource, const std::string& category,
                               double value, double now, double delta)
 {
@@ -33,5 +32,4 @@ void resource_set_utilization(const char* type, const char* name, const char* re
     container->get_variable(name)->instr_event(now, delta, resource, value);
   }
 }
-} // namespace instr
-} // namespace simgrid
+} // namespace simgrid::instr
index 874c980..81a0bf7 100644 (file)
@@ -32,8 +32,7 @@
 
 XBT_LOG_NEW_DEFAULT_CATEGORY(ker_engine, "Logging specific to Engine (kernel)");
 
-namespace simgrid {
-namespace kernel {
+namespace simgrid::kernel {
 double EngineImpl::now_           = 0.0;
 EngineImpl* EngineImpl::instance_ = nullptr; /* That singleton is awful too. */
 
@@ -72,8 +71,7 @@ static config::Flag<std::string> context_factory_name("contexts/factory",
                                                       (std::string("Possible values: ") + contexts_list()).c_str(),
                                                       context_factories.begin()->first);
 
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel
 
 XBT_ATTRIB_NORETURN static void inthandler(int)
 {
@@ -160,8 +158,7 @@ static void install_segvhandler()
 
 #endif /* _WIN32 */
 
-namespace simgrid {
-namespace kernel {
+namespace simgrid::kernel {
 
 EngineImpl::~EngineImpl()
 {
@@ -743,5 +740,4 @@ double EngineImpl::get_clock()
 {
   return now_;
 }
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel
index 8a8f973..6ea9106 100644 (file)
@@ -29,8 +29,7 @@
 #include <unordered_map>
 #include <vector>
 
-namespace simgrid {
-namespace kernel {
+namespace simgrid::kernel {
 
 class EngineImpl {
   std::unordered_map<std::string, routing::NetPoint*> netpoints_;
@@ -178,7 +177,6 @@ public:
   static double get_clock();
 };
 
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel
 
 #endif
index 3c47e41..1c569d2 100644 (file)
@@ -20,9 +20,7 @@
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(ker_activity, kernel, "Kernel activity-related synchronization");
 
-namespace simgrid {
-namespace kernel {
-namespace activity {
+namespace simgrid::kernel::activity {
 
 ActivityImpl::~ActivityImpl()
 {
@@ -237,6 +235,4 @@ void intrusive_ptr_release(ActivityImpl* activity)
     delete activity;
   }
 }
-}
-}
-} // namespace simgrid::kernel::activity::
+} // namespace simgrid::kernel::activity
index 327c300..68defdb 100644 (file)
@@ -17,9 +17,7 @@
 #include <simgrid/kernel/resource/Action.hpp>
 #include <simgrid/simix.hpp>
 
-namespace simgrid {
-namespace kernel {
-namespace activity {
+namespace simgrid::kernel::activity {
 
 XBT_DECLARE_ENUM_CLASS(State, WAITING, READY, RUNNING, DONE, CANCELED, FAILED, SRC_HOST_FAILURE, DST_HOST_FAILURE,
                        TIMEOUT, SRC_TIMEOUT, DST_TIMEOUT, LINK_FAILURE);
@@ -115,8 +113,6 @@ public:
   const std::string& get_tracing_category() const { return tracing_category_; }
 };
 
-} // namespace activity
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::activity
 
 #endif /* SIMGRID_KERNEL_ACTIVITY_ACTIVITYIMPL_HPP */
index 98ccd34..b048eb8 100644 (file)
@@ -8,9 +8,7 @@
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(ker_barrier, ker_synchro, "Barrier kernel-space implementation");
 
-namespace simgrid {
-namespace kernel {
-namespace activity {
+namespace simgrid::kernel::activity {
 
 /* -------- Acquisition -------- */
 bool BarrierAcquisitionImpl::test(actor::ActorImpl*)
@@ -66,6 +64,4 @@ BarrierAcquisitionImplPtr BarrierImpl::acquire_async(actor::ActorImpl* issuer)
   return res;
 }
 
-} // namespace activity
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::activity
index 083b874..7d72f6b 100644 (file)
@@ -11,9 +11,7 @@
 #include "src/kernel/actor/ActorImpl.hpp"
 #include "src/kernel/actor/SynchroObserver.hpp"
 
-namespace simgrid {
-namespace kernel {
-namespace activity {
+namespace simgrid::kernel::activity {
 /** Barrier Acquisition: the act / process of acquiring the barrier.
  *
  * This is the asynchronous activity associated to Barriers. See the doc of MutexImpl for more details on the rationnal.
@@ -80,7 +78,5 @@ public:
     return xbt::string_printf("Barrier %u: %zu of %u", id_, ongoing_acquisitions_.size(), expected_actors_);
   }
 };
-} // namespace activity
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::activity
 #endif
index b73d706..4c4db3a 100644 (file)
@@ -42,9 +42,7 @@ void SIMIX_comm_copy_pointer_callback(simgrid::kernel::activity::CommImpl* comm,
   simgrid::s4u::Comm::copy_pointer_callback(comm, buff, buff_size);
 }
 
-namespace simgrid {
-namespace kernel {
-namespace activity {
+namespace simgrid::kernel::activity {
 xbt::signal<void(CommImpl const&)> CommImpl::on_start;
 xbt::signal<void(CommImpl const&)> CommImpl::on_completion;
 
@@ -573,6 +571,4 @@ void CommImpl::finish()
   }
 }
 
-} // namespace activity
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::activity
index 3912d23..e9d2d7c 100644 (file)
@@ -10,9 +10,7 @@
 #include "src/kernel/actor/ActorImpl.hpp"
 #include "src/kernel/actor/CommObserver.hpp"
 
-namespace simgrid {
-namespace kernel {
-namespace activity {
+namespace simgrid::kernel::activity {
 
 enum class CommImplType { SEND, RECEIVE };
 
@@ -98,8 +96,6 @@ expectations of the other side, too. See  */
   static xbt::signal<void(CommImpl const&)> on_start;
   static xbt::signal<void(CommImpl const&)> on_completion;
 };
-} // namespace activity
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::activity
 
 #endif
index 6343aca..f059db3 100644 (file)
@@ -13,9 +13,7 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(ker_condition, ker_synchro, "Condition variables
 
 /********************************* Condition **********************************/
 
-namespace simgrid {
-namespace kernel {
-namespace activity {
+namespace simgrid::kernel::activity {
 
 /**
  * @brief Signalizes a condition.
@@ -98,6 +96,4 @@ void intrusive_ptr_release(ConditionVariableImpl* cond)
     delete cond;
   }
 }
-} // namespace activity
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::activity
index 42707f4..6dac7e0 100644 (file)
@@ -10,9 +10,7 @@
 #include "src/kernel/actor/ActorImpl.hpp"
 #include <boost/intrusive/list.hpp>
 
-namespace simgrid {
-namespace kernel {
-namespace activity {
+namespace simgrid::kernel::activity {
 
 class XBT_PUBLIC ConditionVariableImpl {
   MutexImpl* mutex_ = nullptr;
@@ -33,8 +31,6 @@ public:
   void signal();
   void wait(MutexImpl* mutex, double timeout, actor::ActorImpl* issuer);
 };
-} // namespace activity
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::activity
 
 #endif
index b33dac4..4b2ad5c 100644 (file)
@@ -17,9 +17,7 @@
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(ker_cpu, kernel, "Kernel cpu-related synchronization");
 
-namespace simgrid {
-namespace kernel {
-namespace activity {
+namespace simgrid::kernel::activity {
 
 ExecImpl::ExecImpl()
 {
@@ -256,6 +254,4 @@ ActivityImpl* ExecImpl::migrate(s4u::Host* to)
  *************/
 xbt::signal<void(ExecImpl const&, s4u::Host*)> ExecImpl::on_migration;
 
-} // namespace activity
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::activity
index 7133154..079402b 100644 (file)
@@ -11,9 +11,7 @@
 #include "src/kernel/activity/ActivityImpl.hpp"
 #include "src/kernel/context/Context.hpp"
 
-namespace simgrid {
-namespace kernel {
-namespace activity {
+namespace simgrid::kernel::activity {
 
 class XBT_PUBLIC ExecImpl : public ActivityImpl_T<ExecImpl> {
   std::unique_ptr<resource::Action, std::function<void(resource::Action*)>> timeout_detector_{
@@ -61,7 +59,5 @@ public:
 
   static xbt::signal<void(ExecImpl const&, s4u::Host*)> on_migration;
 };
-} // namespace activity
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::activity
 #endif
index cdd593d..c30b1a9 100644 (file)
@@ -18,9 +18,7 @@
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(ker_io, kernel, "Kernel io-related synchronization");
 
-namespace simgrid {
-namespace kernel {
-namespace activity {
+namespace simgrid::kernel::activity {
 
 IoImpl::IoImpl()
 {
@@ -156,6 +154,4 @@ void IoImpl::finish()
   }
 }
 
-} // namespace activity
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::activity
index 1c9dbd5..399775b 100644 (file)
@@ -9,9 +9,7 @@
 #include "src/kernel/activity/ActivityImpl.hpp"
 #include <simgrid/s4u/Io.hpp>
 
-namespace simgrid {
-namespace kernel {
-namespace activity {
+namespace simgrid::kernel::activity {
 
 class XBT_PUBLIC IoImpl : public ActivityImpl_T<IoImpl> {
   resource::DiskImpl* disk_           = nullptr;
@@ -40,8 +38,6 @@ public:
   void set_exception(actor::ActorImpl* issuer) override;
   void finish() override;
 };
-} // namespace activity
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::activity
 
 #endif
index a2620a3..c9d8c45 100644 (file)
@@ -14,9 +14,7 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(ker_mailbox, kernel, "Mailbox implementation");
 /*                           Rendez-Vous Points                               */
 /******************************************************************************/
 
-namespace simgrid {
-namespace kernel {
-namespace activity {
+namespace simgrid::kernel::activity {
 
 unsigned MailboxImpl::next_id_ = 0;
 
@@ -149,6 +147,4 @@ CommImplPtr MailboxImpl::find_matching_comm(CommImplType type,
     comm_queue.erase(iter);
   return comm_cpy;
 }
-} // namespace activity
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::activity
index 6421973..1c7b311 100644 (file)
@@ -14,9 +14,7 @@
 #include "src/kernel/activity/CommImpl.hpp"
 #include "src/kernel/actor/ActorImpl.hpp"
 
-namespace simgrid {
-namespace kernel {
-namespace activity {
+namespace simgrid::kernel::activity {
 
 /** @brief Implementation of the s4u::Mailbox */
 
@@ -68,8 +66,6 @@ public:
   bool has_some_done_comm() const { return not done_comm_queue_.empty(); }
   CommImplPtr done_front() const { return done_comm_queue_.front(); }
 };
-} // namespace activity
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::activity
 
 #endif
index ca13b38..e6053e1 100644 (file)
@@ -8,9 +8,7 @@
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(ker_mutex, ker_synchro, "Mutex kernel-space implementation");
 
-namespace simgrid {
-namespace kernel {
-namespace activity {
+namespace simgrid::kernel::activity {
 
 /* -------- Acquisition -------- */
 
@@ -106,6 +104,4 @@ void MutexImpl::unlock(actor::ActorImpl* issuer)
   XBT_OUT();
 }
 
-} // namespace activity
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::activity
index 6e1075e..3f80092 100644 (file)
@@ -11,9 +11,7 @@
 #include "src/kernel/actor/ActorImpl.hpp"
 #include <boost/intrusive/list.hpp>
 
-namespace simgrid {
-namespace kernel {
-namespace activity {
+namespace simgrid::kernel::activity {
 
 /** Mutex Acquisition: the act / process of acquiring the mutex.
  *
@@ -98,7 +96,5 @@ public:
 
   s4u::Mutex& mutex() { return piface_; }
 };
-} // namespace activity
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::activity
 #endif
index 914ef4c..c53825f 100644 (file)
@@ -15,9 +15,7 @@
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(ker_semaphore, ker_synchro, "Semaphore kernel-space implementation");
 
-namespace simgrid {
-namespace kernel {
-namespace activity {
+namespace simgrid::kernel::activity {
 
 /* -------- Acquisition -------- */
 
@@ -119,6 +117,4 @@ void SemaphoreImpl::release()
   }
 }
 
-} // namespace activity
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::activity
index b817599..d715a65 100644 (file)
@@ -13,9 +13,7 @@
 #include "src/kernel/actor/ActorImpl.hpp"
 #include "src/kernel/actor/SynchroObserver.hpp"
 
-namespace simgrid {
-namespace kernel {
-namespace activity {
+namespace simgrid::kernel::activity {
 
 /** Semaphore Acquisition: the act / process of acquiring the semaphore.
  *
@@ -85,8 +83,6 @@ public:
   unsigned get_id() const { return id_; }
   s4u::Semaphore& sem() { return piface_; }
 };
-} // namespace activity
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::activity
 
 #endif /* SIMGRID_KERNEL_ACTIVITY_SEMAPHOREIMPL_HPP */
index 78813f7..0288909 100644 (file)
@@ -11,9 +11,7 @@
 
 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(ker_actor);
 
-namespace simgrid {
-namespace kernel {
-namespace activity {
+namespace simgrid::kernel::activity {
 
 SleepImpl& SleepImpl::set_host(s4u::Host* host)
 {
@@ -71,6 +69,4 @@ void SleepImpl::finish()
     }
   }
 }
-} // namespace activity
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::activity
index f50ca54..5e22c49 100644 (file)
@@ -8,9 +8,7 @@
 
 #include "src/kernel/activity/ActivityImpl.hpp"
 
-namespace simgrid {
-namespace kernel {
-namespace activity {
+namespace simgrid::kernel::activity {
 
 class XBT_PUBLIC SleepImpl : public ActivityImpl_T<SleepImpl> {
   sg_host_t host_  = nullptr;
@@ -24,8 +22,6 @@ public:
   void finish() override;
   SleepImpl* start();
 };
-} // namespace activity
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::activity
 
 #endif
index ea5e660..438a8f4 100644 (file)
@@ -13,9 +13,7 @@
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(ker_synchro, kernel,
                                 "Kernel synchronization activity (lock/acquire on a mutex, semaphore or condition)");
 
-namespace simgrid {
-namespace kernel {
-namespace activity {
+namespace simgrid::kernel::activity {
 
 SynchroImpl& SynchroImpl::set_host(s4u::Host* host)
 {
@@ -87,6 +85,4 @@ void SynchroImpl::finish()
   simcall->issuer_->simcall_answer();
 }
 
-} // namespace activity
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::activity
index 0d80d3b..fe73b3b 100644 (file)
@@ -10,9 +10,7 @@
 
 #include <functional>
 
-namespace simgrid {
-namespace kernel {
-namespace activity {
+namespace simgrid::kernel::activity {
 
 /** Used to implement mutexes, semaphores and conditions */
 class XBT_PUBLIC SynchroImpl : public ActivityImpl_T<SynchroImpl> {
@@ -33,8 +31,6 @@ public:
   void set_exception(actor::ActorImpl* issuer) override;
   void finish() override;
 };
-} // namespace activity
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::activity
 
 #endif
index e679e0f..bb502be 100644 (file)
@@ -34,9 +34,7 @@ simgrid::kernel::actor::ActorImpl* SIMIX_process_self() // XBT_ATTRIB_DEPRECATED
   return simgrid::kernel::actor::ActorImpl::self();
 }
 
-namespace simgrid {
-namespace kernel {
-namespace actor {
+namespace simgrid::kernel::actor {
 
 /*------------------------- [ ActorIDTrait ] -------------------------*/
 unsigned long ActorIDTrait::maxpid_ = 0;
@@ -522,9 +520,7 @@ void create_maestro(const std::function<void()>& code)
   engine->set_maestro(maestro);
 }
 
-} // namespace actor
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::actor
 
 /* needs to be public and without simcall because it is called by exceptions and logging events */
 const char* SIMIX_process_self_get_name() // XBT_ATTRIB_DEPRECATED_v333
index f27b624..8f6f640 100644 (file)
@@ -16,9 +16,7 @@
 #include <map>
 #include <memory>
 
-namespace simgrid {
-namespace kernel {
-namespace actor {
+namespace simgrid::kernel::actor {
 class ProcessArg;
 
 /*------------------------- [ ActorIDTrait ] -------------------------*/
@@ -235,8 +233,6 @@ using SynchroList =
 
 XBT_PUBLIC void create_maestro(const std::function<void()>& code);
 
-} // namespace actor
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::actor
 
 #endif
index fbf4d98..f44571e 100644 (file)
@@ -14,9 +14,7 @@
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(obs_comm, mc_observer, "Logging specific to the Communication simcalls observation");
 
-namespace simgrid {
-namespace kernel {
-namespace actor {
+namespace simgrid::kernel::actor {
 
 ActivityTestanySimcall::ActivityTestanySimcall(ActorImpl* actor, const std::vector<activity::ActivityImpl*>& activities)
     : ResultingSimcall(actor, -1), activities_(activities)
@@ -160,6 +158,4 @@ void CommIrecvSimcall::serialize(std::stringstream& stream) const
   XBT_DEBUG("RecvObserver comm:%p mbox:%u buff:%p tag:%d", comm_, mbox_->get_id(), dst_buff_, tag_);
 }
 
-} // namespace actor
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::actor
index 2358e5a..9cba17d 100644 (file)
@@ -13,9 +13,7 @@
 
 #include <string>
 
-namespace simgrid {
-namespace kernel {
-namespace actor {
+namespace simgrid::kernel::actor {
 
 class ActivityTestSimcall final : public ResultingSimcall<bool> {
   activity::ActivityImpl* const activity_;
@@ -175,8 +173,6 @@ public:
   auto const& get_copy_data_fun() const { return copy_data_fun_; }
 };
 
-} // namespace actor
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::actor
 
 #endif
index b379c9f..156636d 100644 (file)
@@ -12,9 +12,7 @@
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(ker_simcall, kernel, "transmuting from user request into kernel handlers");
 
-namespace simgrid {
-namespace kernel {
-namespace actor {
+namespace simgrid::kernel::actor {
 
 /** @private
  * @brief (in kernel mode) unpack the simcall and activate the handler
@@ -51,6 +49,4 @@ const char* Simcall::get_cname() const
   }
 }
 
-} // namespace actor
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::actor
index c50dbfd..b98ee1e 100644 (file)
@@ -11,9 +11,7 @@
 #include "xbt/utility.hpp"
 
 /********************************* Simcalls *********************************/
-namespace simgrid {
-namespace kernel {
-namespace actor {
+namespace simgrid::kernel::actor {
 
 /**
  * @brief Represents a simcall to the kernel.
@@ -34,8 +32,6 @@ public:
   const char* get_cname() const;
 };
 
-} // namespace actor
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::actor
 
 #endif
index b4422d5..e4ffca2 100644 (file)
@@ -14,9 +14,7 @@
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_observer, mc, "Logging specific to MC simcall observation");
 
-namespace simgrid {
-namespace kernel {
-namespace actor {
+namespace simgrid::kernel::actor {
 
 void SimcallObserver::serialize(std::stringstream& stream) const
 {
@@ -47,6 +45,4 @@ bool ConditionWaitSimcall::is_enabled()
   }
   return true;
 }
-} // namespace actor
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::actor
index 56adb66..1c30486 100644 (file)
@@ -12,9 +12,7 @@
 
 #include <string>
 
-namespace simgrid {
-namespace kernel {
-namespace actor {
+namespace simgrid::kernel::actor {
 
 class SimcallObserver {
   ActorImpl* const issuer_;
@@ -109,8 +107,6 @@ public:
   double get_timeout() const { return timeout_; }
 };
 
-} // namespace actor
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::actor
 
 #endif
index 6a7deda..5e5ca9d 100644 (file)
@@ -15,9 +15,7 @@
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(obs_mutex, mc_observer, "Logging specific to mutex simcalls observation");
 
-namespace simgrid {
-namespace kernel {
-namespace actor {
+namespace simgrid::kernel::actor {
 
 MutexObserver::MutexObserver(ActorImpl* actor, mc::Transition::Type type, activity::MutexImpl* mutex)
     : SimcallObserver(actor), type_(type), mutex_(mutex)
@@ -84,6 +82,4 @@ bool BarrierObserver::is_enabled()
          (type_ == mc::Transition::Type::BARRIER_WAIT && acquisition_ != nullptr && acquisition_->granted_);
 }
 
-} // namespace actor
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::actor
index 15549bd..c953c5d 100644 (file)
@@ -13,9 +13,7 @@
 
 #include <string>
 
-namespace simgrid {
-namespace kernel {
-namespace actor {
+namespace simgrid::kernel::actor {
 
 /* All the observers of Mutex transitions are very similar, so implement them all together in this class */
 class MutexObserver final : public SimcallObserver {
@@ -78,8 +76,6 @@ public:
   double get_timeout() const { return timeout_; }
 };
 
-} // namespace actor
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::actor
 
 #endif
index 875f78d..66a895b 100644 (file)
@@ -15,9 +15,7 @@
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(ker_context, kernel, "Context switching mechanism");
 
-namespace simgrid {
-namespace kernel {
-namespace context {
+namespace simgrid::kernel::context {
 
 std::function<ContextFactory*(void)> ContextFactory::initializer;
 
@@ -145,6 +143,4 @@ void Context::stop()
 }
 AttachContext::~AttachContext() = default;
 
-} // namespace context
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::context
index d710750..c8aba56 100644 (file)
@@ -14,9 +14,7 @@
 #include <csignal>
 #include <functional>
 
-namespace simgrid {
-namespace kernel {
-namespace context {
+namespace simgrid::kernel::context {
 extern unsigned stack_size;
 extern unsigned guard_size;
 
@@ -110,8 +108,6 @@ XBT_PUBLIC int get_nthreads();
 XBT_PUBLIC void set_nthreads(int nb_threads);
 XBT_PUBLIC void set_parallel_mode(e_xbt_parmap_mode_t mode);
 XBT_PUBLIC e_xbt_parmap_mode_t get_parallel_mode();
-} // namespace context
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::context
 
 #endif
index 7da149c..0041deb 100644 (file)
@@ -9,9 +9,7 @@
 
 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(ker_context);
 
-namespace simgrid {
-namespace kernel {
-namespace context {
+namespace simgrid::kernel::context {
 
 // BoostContextFactory
 BoostContext* BoostContextFactory::create_context(std::function<void()>&& code, actor::ActorImpl* actor)
@@ -66,6 +64,4 @@ XBT_PRIVATE ContextFactory* boost_factory()
   XBT_VERB("Using Boost contexts. Welcome to the 21th century.");
   return new BoostContextFactory();
 }
-} // namespace context
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::context
index 5a877c4..94682e2 100644 (file)
@@ -24,9 +24,7 @@
 #include "src/internal_config.h"
 #include "src/kernel/context/ContextSwapped.hpp"
 
-namespace simgrid {
-namespace kernel {
-namespace context {
+namespace simgrid::kernel::context {
 
 /** @brief Userspace context switching implementation based on Boost.Context */
 class BoostContext : public SwappedContext {
@@ -51,8 +49,6 @@ class BoostContextFactory : public SwappedContextFactory {
 public:
   BoostContext* create_context(std::function<void()>&& code, actor::ActorImpl* actor) override;
 };
-} // namespace context
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::context
 
 #endif
index 6c36133..85e8169 100644 (file)
@@ -185,9 +185,7 @@ void raw_swapcontext(raw_stack_t* old, raw_stack_t new_context)
 
 // ***** Method definitions
 
-namespace simgrid {
-namespace kernel {
-namespace context {
+namespace simgrid::kernel::context {
 
 // RawContextFactory
 
@@ -221,6 +219,4 @@ ContextFactory* raw_factory()
   XBT_VERB("Using raw contexts. Because the glibc is just not good enough for us.");
   return new RawContextFactory();
 }
-} // namespace context
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::context
index d6b670c..8362aea 100644 (file)
@@ -15,9 +15,7 @@
 
 #include "src/kernel/context/ContextSwapped.hpp"
 
-namespace simgrid {
-namespace kernel {
-namespace context {
+namespace simgrid::kernel::context {
 
 /** @brief Fast context switching inspired from SystemV ucontexts.
   *
@@ -39,8 +37,6 @@ class RawContextFactory : public SwappedContextFactory {
 public:
   RawContext* create_context(std::function<void()>&& code, actor::ActorImpl* actor) override;
 };
-} // namespace context
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::context
 
 #endif
index a4ab5b3..c6812f4 100644 (file)
@@ -63,9 +63,7 @@ void smx_ctx_wrapper(simgrid::kernel::context::SwappedContext* context)
   THROW_IMPOSSIBLE;
 }
 
-namespace simgrid {
-namespace kernel {
-namespace context {
+namespace simgrid::kernel::context {
 
 /* thread-specific storage for the worker's context */
 thread_local SwappedContext* SwappedContext::worker_context_ = nullptr;
@@ -298,6 +296,4 @@ void SwappedContext::suspend()
   this->swap_into(next_context);
 }
 
-} // namespace context
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::context
index 29063ec..d687827 100644 (file)
 
 #include <memory>
 
-namespace simgrid {
-namespace kernel {
-namespace context {
+namespace simgrid::kernel::context {
 class SwappedContext;
-} // namespace context
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::context
 
 /* Use extern "C" to make sure that this symbol is easy to recognize by name, even on exotic platforms */
 extern "C" XBT_ATTRIB_NORETURN void smx_ctx_wrapper(simgrid::kernel::context::SwappedContext* context);
 
-namespace simgrid {
-namespace kernel {
-namespace context {
+namespace simgrid::kernel::context {
 
 class SwappedContextFactory : public ContextFactory {
   friend SwappedContext; // Reads whether we are in parallel mode
@@ -94,7 +88,5 @@ inline void SwappedContext::verify_previous_context(XBT_ATTRIB_UNUSED const Swap
 #endif
 }
 
-} // namespace context
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::context
 #endif
index 0a5dc3e..54319b2 100644 (file)
@@ -18,9 +18,7 @@
 
 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(ker_context);
 
-namespace simgrid {
-namespace kernel {
-namespace context {
+namespace simgrid::kernel::context {
 
 // ThreadContextFactory
 
@@ -215,6 +213,4 @@ XBT_PRIVATE ContextFactory* thread_factory()
   XBT_VERB("Activating thread context factory");
   return new ThreadContextFactory();
 }
-} // namespace context
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::context
index 6602a1f..5980d3a 100644 (file)
@@ -14,9 +14,7 @@
 
 #include <thread>
 
-namespace simgrid {
-namespace kernel {
-namespace context {
+namespace simgrid::kernel::context {
 
 class XBT_PUBLIC ThreadContext : public AttachContext {
 public:
@@ -101,8 +99,6 @@ public:
 private:
   ThreadContext* create_context(std::function<void()>&& code, actor::ActorImpl* actor, bool maestro);
 };
-} // namespace context
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::context
 
 #endif
index e38df56..24b2b1f 100644 (file)
@@ -32,9 +32,7 @@ XBT_ATTRIB_NORETURN static void sysv_ctx_wrapper(int i1, int i2)
 }
 }
 
-namespace simgrid {
-namespace kernel {
-namespace context {
+namespace simgrid::kernel::context {
 
 // UContextFactory
 UContext* UContextFactory::create_context(std::function<void()>&& code, actor::ActorImpl* actor)
@@ -83,6 +81,4 @@ XBT_PRIVATE ContextFactory* sysv_factory()
   XBT_VERB("Activating SYSV context factory");
   return new UContextFactory();
 }
-} // namespace context
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::context
index 48f1325..69d6a5c 100644 (file)
@@ -19,9 +19,7 @@
 #include "src/internal_config.h"
 #include "src/kernel/context/ContextSwapped.hpp"
 
-namespace simgrid {
-namespace kernel {
-namespace context {
+namespace simgrid::kernel::context {
 
 class UContext : public SwappedContext {
 public:
@@ -37,8 +35,6 @@ class UContextFactory : public SwappedContextFactory {
 public:
   UContext* create_context(std::function<void()>&& code, actor::ActorImpl* actor) override;
 };
-} // namespace context
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::context
 
 #endif
index 33dc9cf..326b404 100644 (file)
@@ -17,9 +17,7 @@ double sg_maxmin_precision = 1E-5; /* Change this with --cfg=maxmin/precision:VA
 double sg_surf_precision   = 1E-9; /* Change this with --cfg=surf/precision:VALUE */
 int sg_concurrency_limit   = -1;      /* Change this with --cfg=maxmin/concurrency-limit:VALUE */
 
-namespace simgrid {
-namespace kernel {
-namespace lmm {
+namespace simgrid::kernel::lmm {
 
 int Variable::next_rank_   = 1;
 int Constraint::next_rank_ = 1;
@@ -762,6 +760,4 @@ void Constraint::set_sharing_policy(SharingPolicy policy, const s4u::NonLinearRe
   dyn_constraint_cb_ = cb;
 }
 
-} // namespace lmm
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::lmm
index 7293825..173d044 100644 (file)
@@ -20,9 +20,7 @@
 #include <memory>
 #include <vector>
 
-namespace simgrid {
-namespace kernel {
-namespace lmm {
+namespace simgrid::kernel::lmm {
 
 /** @addtogroup SURF_lmm
  * @details
@@ -605,8 +603,6 @@ private:
 };
 
 /** @} */
-} // namespace lmm
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::lmm
 
 #endif
index 816e5e4..b6647a6 100644 (file)
@@ -20,9 +20,7 @@ simgrid::config::Flag<int>
 simgrid::config::Flag<double> cfg_bmf_precision{"bmf/precision",
                                                 "Numerical precision used when computing resource sharing", 1E-12};
 
-namespace simgrid {
-namespace kernel {
-namespace lmm {
+namespace simgrid::kernel::lmm {
 
 AllocationGenerator::AllocationGenerator(Eigen::MatrixXd A) : A_(std::move(A)), alloc_(A_.cols(), 0)
 {
@@ -514,6 +512,4 @@ template <class CnstList> void BmfSystem::bmf_solve(const CnstList& cnst_list)
   }
 }
 
-} // namespace lmm
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::lmm
index 55ed108..dfc7ff9 100644 (file)
@@ -20,9 +20,7 @@
 
 #include <unordered_set>
 
-namespace simgrid {
-namespace kernel {
-namespace lmm {
+namespace simgrid::kernel::lmm {
 
 /** @brief Generate all combinations of valid allocation */
 class XBT_PUBLIC AllocationGenerator {
@@ -279,8 +277,6 @@ private:
   std::unordered_map<const Constraint*, int> cnst2idx_; //!< Conversely map constraint to index
 };
 
-} // namespace lmm
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::lmm
 
 #endif
index 7c55590..eaa22de 100644 (file)
@@ -8,9 +8,7 @@
 
 #include "src/kernel/lmm/System.hpp"
 
-namespace simgrid {
-namespace kernel {
-namespace lmm {
+namespace simgrid::kernel::lmm {
 
 class XBT_PUBLIC FairBottleneck : public System {
 public:
@@ -20,8 +18,6 @@ private:
   void do_solve() final;
 };
 
-} // namespace lmm
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::lmm
 
 #endif
index c7611fa..d12f588 100644 (file)
@@ -7,9 +7,7 @@
 
 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(ker_lmm);
 
-namespace simgrid {
-namespace kernel {
-namespace lmm {
+namespace simgrid::kernel::lmm {
 
 using dyn_light_t = std::vector<int>;
 
@@ -229,6 +227,4 @@ template <class CnstList> void MaxMin::maxmin_solve(CnstList& cnst_list)
   } while (cnst_light_num > 0);
 }
 
-} // namespace lmm
-} // namespace kernel
-} // namespace simgrid
\ No newline at end of file
+} // namespace simgrid::kernel::lmm
index 48c3156..f5bd0ce 100644 (file)
@@ -8,9 +8,7 @@
 
 #include "src/kernel/lmm/System.hpp"
 
-namespace simgrid {
-namespace kernel {
-namespace lmm {
+namespace simgrid::kernel::lmm {
 
 class XBT_PUBLIC MaxMin : public System {
 public:
@@ -26,8 +24,6 @@ private:
   dyn_light_t saturated_constraints;
 };
 
-} // namespace lmm
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::lmm
 
 #endif
index 757531a..6920fd7 100644 (file)
@@ -12,9 +12,7 @@
 XBT_LOG_NEW_CATEGORY(kernel, "SimGrid internals");
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(ker_resource, kernel, "Resources, modeling the platform performance");
 
-namespace simgrid {
-namespace kernel {
-namespace resource {
+namespace simgrid::kernel::resource {
 
 Action::Action(Model* model, double cost, bool failed) : Action(model, cost, failed, nullptr) {}
 
@@ -247,6 +245,4 @@ Action* ActionHeap::pop()
   return action;
 }
 
-} // namespace resource
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::resource
index 0538f95..6a6deb4 100644 (file)
@@ -10,9 +10,7 @@
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(res_cpu, ker_resource, "CPU resource, fueling execution activites");
 
-namespace simgrid {
-namespace kernel {
-namespace resource {
+namespace simgrid::kernel::resource {
 
 /*********
  * Model *
@@ -217,6 +215,4 @@ std::list<CpuImpl*> CpuAction::cpus() const
 
   return retlist;
 }
-} // namespace resource
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::resource
index e0ee3e6..a7f094c 100644 (file)
@@ -13,9 +13,7 @@
 
 #include <list>
 
-namespace simgrid {
-namespace kernel {
-namespace resource {
+namespace simgrid::kernel::resource {
 
 /***********
  * Classes *
@@ -190,8 +188,6 @@ public:
   void suspend() override;
   void resume() override;
 };
-} // namespace resource
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::resource
 
 #endif /* CPU_IMPL_HPP_ */
index 8a45da6..29198e1 100644 (file)
@@ -19,9 +19,7 @@ static simgrid::config::Flag<std::string> cfg_disk_solver("disk/solver",
                                                           "Set linear equations solver used by disk model", "maxmin",
                                                           &simgrid::kernel::lmm::System::validate_solver);
 
-namespace simgrid {
-namespace kernel {
-namespace resource {
+namespace simgrid::kernel::resource {
 
 xbt::signal<void(DiskAction const&, Action::State, Action::State)> DiskAction::on_state_change;
 
@@ -179,6 +177,4 @@ void DiskAction::set_state(Action::State new_state)
     on_state_change(*this, previous_state, new_state);
   }
 }
-} // namespace resource
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::resource
index af027a7..611234d 100644 (file)
@@ -20,9 +20,7 @@
  * Model *
  *********/
 
-namespace simgrid {
-namespace kernel {
-namespace resource {
+namespace simgrid::kernel::resource {
 /***********
  * Classes *
  ***********/
@@ -127,7 +125,5 @@ public:
   void set_state(simgrid::kernel::resource::Action::State state) override;
 };
 
-} // namespace resource
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::resource
 #endif /* DISK_IMPL_HPP_ */
index 0f2c36a..5575fca 100644 (file)
@@ -10,9 +10,7 @@
 #include "src/kernel/resource/Resource.hpp"
 #include "xbt/PropertyHolder.hpp"
 
-namespace simgrid {
-namespace kernel {
-namespace resource {
+namespace simgrid::kernel::resource {
 
 /************
  * Resource *
@@ -44,8 +42,6 @@ public:
   virtual void set_concurrency_limit(int limit) const = 0;
 };
 
-} // namespace resource
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::resource
 
 #endif /* SIMGRID_KERNEL_RESOURCE_LINKIMPL_HPP */
index 84946da..89cac54 100644 (file)
@@ -8,9 +8,7 @@
 
 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(ker_resource);
 
-namespace simgrid {
-namespace kernel {
-namespace resource {
+namespace simgrid::kernel::resource {
 
 Model::Model(const std::string& name) : name_(name)
 {
@@ -181,6 +179,4 @@ void Model::update_actions_state_full(double /*now*/, double /*delta*/)
   THROW_UNIMPLEMENTED;
 }
 
-} // namespace resource
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::resource
index 354489e..01ded58 100644 (file)
@@ -21,9 +21,7 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(res_network, ker_resource, "Network resources, t
  * Model *
  *********/
 
-namespace simgrid {
-namespace kernel {
-namespace resource {
+namespace simgrid::kernel::resource {
 
 /** @brief Command-line option 'network/TCP-gamma' -- see @ref options_model_network_gamma */
 config::Flag<double> NetworkModel::cfg_tcp_gamma(
@@ -110,8 +108,6 @@ void insert_link_latency(std::vector<StandardLinkImpl*>& result, const std::vect
   add_latency(links, latency);
 }
 
-} // namespace resource
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::resource
 
 #endif /* NETWORK_INTERFACE_CPP_ */
index bfe6aa3..833cc1e 100644 (file)
@@ -12,9 +12,7 @@
 
 #include <list>
 
-namespace simgrid {
-namespace kernel {
-namespace resource {
+namespace simgrid::kernel::resource {
 
 /*********
  * Model *
@@ -140,8 +138,6 @@ void add_link_latency(std::vector<StandardLinkImpl*>& result, const std::vector<
 void insert_link_latency(std::vector<StandardLinkImpl*>& result, const std::vector<StandardLinkImpl*>& links,
                          double* latency);
 
-} // namespace resource
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::resource
 
 #endif /* SIMGRID_KERNEL_RESOURCE_NETWORKMODEL_HPP */
index 48f5a76..ea32b92 100644 (file)
@@ -17,9 +17,7 @@
 
 #include <string>
 
-namespace simgrid {
-namespace kernel {
-namespace resource {
+namespace simgrid::kernel::resource {
 
 /** @ingroup SURF_interface
  * @brief SURF resource interface class
@@ -110,9 +108,7 @@ public:
   bool is_used() const override { return model_->get_maxmin_system()->constraint_used(constraint_); }
 };
 
-} // namespace resource
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::resource
 
 namespace std {
 template <> class hash<simgrid::kernel::resource::Resource> {
index a74c2d7..cd4ec9f 100644 (file)
@@ -11,9 +11,7 @@ XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(res_network);
  * Model *
  *********/
 
-namespace simgrid {
-namespace kernel {
-namespace resource {
+namespace simgrid::kernel::resource {
 
 SplitDuplexLinkImpl::SplitDuplexLinkImpl(const std::string& name, StandardLinkImpl* link_up,
                                          StandardLinkImpl* link_down)
@@ -93,6 +91,4 @@ void SplitDuplexLinkImpl::set_concurrency_limit(int limit) const
   link_down_->set_concurrency_limit(limit);
 }
 
-} // namespace resource
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::resource
index 077c971..f1bdbe9 100644 (file)
@@ -9,9 +9,7 @@
 #include "src/kernel/resource/LinkImpl.hpp"
 #include "src/kernel/resource/StandardLinkImpl.hpp"
 
-namespace simgrid {
-namespace kernel {
-namespace resource {
+namespace simgrid::kernel::resource {
 
 /************
  * Resource *
@@ -70,8 +68,6 @@ public:
   void set_concurrency_limit(int limit) const override;
 };
 
-} // namespace resource
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::resource
 
 #endif /* SIMGRID_KERNEL_RESOURCE_SDLINKIMPL_HPP */
index 92e4291..6648c23 100644 (file)
@@ -15,9 +15,7 @@ XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(res_network);
  * Model *
  *********/
 
-namespace simgrid {
-namespace kernel {
-namespace resource {
+namespace simgrid::kernel::resource {
 
 StandardLinkImpl::StandardLinkImpl(const std::string& name) : LinkImpl(name), piface_(this)
 {
@@ -141,6 +139,4 @@ void StandardLinkImpl::set_concurrency_limit(int limit) const
   get_constraint()->set_concurrency_limit(limit);
 }
 
-} // namespace resource
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::resource
index 1b06a36..d79e687 100644 (file)
@@ -12,9 +12,7 @@
  * Classes *
  ***********/
 
-namespace simgrid {
-namespace kernel {
-namespace resource {
+namespace simgrid::kernel::resource {
 /************
  * Resource *
  ************/
@@ -76,8 +74,6 @@ public:
   void set_concurrency_limit(int limit) const override;
 };
 
-} // namespace resource
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::resource
 
 #endif /* SIMGRID_KERNEL_RESOURCE_STANDARDLINKIMPL_HPP */
index e698ccb..48f2492 100644 (file)
@@ -39,8 +39,7 @@ void surf_vm_model_init_HL13(simgrid::kernel::resource::CpuModel* cpu_pm_model)
 namespace simgrid {
 template class xbt::Extendable<kernel::resource::VirtualMachineImpl>;
 
-namespace kernel {
-namespace resource {
+namespace kernel::resource {
 
 /*********
  * Model *
@@ -414,6 +413,5 @@ void VirtualMachineImpl::seal()
   s4u::VirtualMachine::on_creation(*get_iface());
 }
 
-} // namespace resource
-} // namespace kernel
+} // namespace kernel::resource
 } // namespace simgrid
index 3628c77..81cd3d6 100644 (file)
@@ -14,8 +14,7 @@ namespace simgrid {
 
 extern template class XBT_PUBLIC xbt::Extendable<kernel::resource::VirtualMachineImpl>;
 
-namespace kernel {
-namespace resource {
+namespace kernel::resource {
 
 /************
  * Resource *
@@ -101,8 +100,7 @@ public:
     return nullptr;
   };
 };
-} // namespace resource
-} // namespace kernel
+} // namespace kernel::resource
 } // namespace simgrid
 
 #endif /* VM_INTERFACE_HPP_ */
index 8de4c54..556a7ff 100644 (file)
@@ -10,9 +10,7 @@
 
 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(res_network);
 
-namespace simgrid {
-namespace kernel {
-namespace resource {
+namespace simgrid::kernel::resource {
 
 /************
  * Resource *
@@ -94,6 +92,4 @@ void WifiLinkImpl::set_latency(double value)
 {
   xbt_assert(value == 0, "Latency cannot be set for WiFi Links.");
 }
-} // namespace resource
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::resource
index 5486b33..ea1e30a 100644 (file)
@@ -15,9 +15,7 @@
  * Classes *
  ***********/
 
-namespace simgrid {
-namespace kernel {
-namespace resource {
+namespace simgrid::kernel::resource {
 
 class XBT_PRIVATE WifiLinkAction;
 
@@ -73,7 +71,5 @@ public:
   WifiLinkImpl* get_dst_link() const { return dst_wifi_link_; }
 };
 
-} // namespace resource
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::resource
 #endif
index 4ae0817..62111e9 100644 (file)
@@ -8,9 +8,7 @@
 
 #include "simgrid/forward.h"
 
-namespace simgrid {
-namespace kernel {
-namespace profile {
+namespace simgrid::kernel::profile {
 
 class Event {
 public:
@@ -19,9 +17,7 @@ public:
   resource::Resource* resource;
   bool free_me;
 };
-} // namespace profile
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::profile
 /**
  * @brief Free a trace event structure
  *
index d693df2..dae5708 100644 (file)
@@ -7,9 +7,7 @@
 #include "src/kernel/resource/profile/Event.hpp"
 #include "src/kernel/resource/profile/Profile.hpp"
 
-namespace simgrid {
-namespace kernel {
-namespace profile {
+namespace simgrid::kernel::profile {
 
 simgrid::kernel::profile::FutureEvtSet future_evt_set; // FIXME: singleton antipattern
 
@@ -51,6 +49,4 @@ Event* FutureEvtSet::pop_leq(double date, double* value, resource::Resource** re
 
   return event;
 }
-} // namespace profile
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::profile
index 47eb652..a26afc6 100644 (file)
@@ -9,9 +9,7 @@
 #include "simgrid/forward.h"
 #include <queue>
 
-namespace simgrid {
-namespace kernel {
-namespace profile {
+namespace simgrid::kernel::profile {
 
 /** @brief Future Event Set (collection of iterators over the traces)
  * That's useful to quickly know which is the next occurring event in a set of traces. */
@@ -33,8 +31,6 @@ private:
 // FIXME: kill that singleton
 extern XBT_PRIVATE simgrid::kernel::profile::FutureEvtSet future_evt_set;
 
-} // namespace profile
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::profile
 
 #endif
index bc45ead..28ec0c7 100644 (file)
@@ -22,9 +22,7 @@
 
 static std::unordered_map<std::string, simgrid::kernel::profile::Profile*> trace_list;
 
-namespace simgrid {
-namespace kernel {
-namespace profile {
+namespace simgrid::kernel::profile {
 
 /** @brief Register this profile for that resource onto that FES,
  * and get an iterator over the integrated trace  */
@@ -75,9 +73,7 @@ Profile::Profile(const std::string& name, const std::function<ProfileBuilder::Up
   get_enough_events(0);
 }
 
-} // namespace profile
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::profile
 
 void tmgr_finalize()
 {
index 5c51540..2cc4e37 100644 (file)
@@ -15,9 +15,7 @@
 #include <vector>
 #include <string>
 
-namespace simgrid {
-namespace kernel {
-namespace profile {
+namespace simgrid::kernel::profile {
 
 /** @brief A profile is a set of timed values, encoding the value that a variable takes at what time
  *
@@ -63,9 +61,7 @@ private:
   }
 };
 
-} // namespace profile
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::profile
 
 /** Module finalizer: frees all profiles */
 XBT_PUBLIC void tmgr_finalize();
index e2ac345..1924d2d 100644 (file)
@@ -16,9 +16,7 @@
 #include <sstream>
 #include <string_view>
 
-namespace simgrid {
-namespace kernel {
-namespace profile {
+namespace simgrid::kernel::profile {
 
 bool DatedValue::operator==(DatedValue const& e2) const
 {
@@ -245,7 +243,4 @@ Profile* ProfileBuilder::from_callback(const std::string& name, const std::funct
   return new Profile(name, cb, repeat_delay);
 }
 
-
-} // namespace profile
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::profile
index 36d84b6..e0579e1 100644 (file)
@@ -8,9 +8,7 @@
 #include "xbt/random.hpp"
 #include <math.h>
 
-namespace simgrid {
-namespace kernel {
-namespace profile {
+namespace simgrid::kernel::profile {
 
 double StochasticDatedValue::draw(Distribution law, std::vector<double> params)
 {
@@ -52,6 +50,4 @@ bool StochasticDatedValue::operator==(StochasticDatedValue const& e2) const
          (e2.date_params == date_params);
 }
 
-} // namespace profile
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::profile
index 74c4dfa..2e0586f 100644 (file)
@@ -10,9 +10,7 @@
 #include "simgrid/kernel/ProfileBuilder.hpp"
 #include <vector>
 
-namespace simgrid {
-namespace kernel {
-namespace profile {
+namespace simgrid::kernel::profile {
 
 enum class Distribution { EXP, NORM, UNIF, DET };
 
@@ -38,8 +36,6 @@ private:
   static double draw(Distribution law, std::vector<double> params);
 };
 
-} // namespace profile
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::profile
 
 #endif
index 4f02317..b3abab4 100644 (file)
@@ -13,9 +13,7 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(ker_routing_cluster, ker_routing, "Kernel Cluste
 /* This routing is specifically setup to represent clusters, aka homogeneous sets of machines
  * Note that a router is created, easing the interconnection with the rest of the world. */
 
-namespace simgrid {
-namespace kernel {
-namespace routing {
+namespace simgrid::kernel::routing {
 
 void ClusterBase::set_loopback()
 {
@@ -116,6 +114,4 @@ void ClusterBase::fill_leaf_from_cb(unsigned long position, const std::vector<un
   *node_netpoint = netpoint;
 }
 
-} // namespace routing
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::routing
index 40335ed..03fdcbf 100644 (file)
@@ -16,8 +16,7 @@
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(ker_routing_dijkstra, ker_routing, "Kernel Dijkstra Routing");
 
 namespace simgrid {
-namespace kernel {
-namespace routing {
+namespace kernel::routing {
 
 class GraphNodeData {
 public:
@@ -245,8 +244,7 @@ void DijkstraZone::new_edge(unsigned long src_id, unsigned long dst_id, Route* r
   // Finally add it
   xbt_graph_new_edge(route_graph_.get(), src, dst, route);
 }
-} // namespace routing
-} // namespace kernel
+} // namespace kernel::routing
 
 namespace s4u {
 NetZone* create_dijkstra_zone(const std::string& name, bool cache)
index de5aa58..e1370f3 100644 (file)
@@ -15,8 +15,7 @@
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(ker_routing_dragonfly, ker_routing, "Kernel Dragonfly Routing");
 
 namespace simgrid {
-namespace kernel {
-namespace routing {
+namespace kernel::routing {
 
 DragonflyZone::DragonflyZone(const std::string& name) : ClusterBase(name) {}
 
@@ -366,8 +365,7 @@ void DragonflyZone::get_local_route(const NetPoint* src, const NetPoint* dst, Ro
   route->gw_src_ = get_gateway(src->id());
   route->gw_dst_ = get_gateway(dst->id());
 }
-} // namespace routing
-} // namespace kernel
+} // namespace kernel::routing
 
 namespace s4u {
 DragonflyParams::DragonflyParams(const std::pair<unsigned int, unsigned int>& groups,
index 9489a8b..cc4032f 100644 (file)
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(ker_routing_none, ker_routing, "Kernel No Routing");
 
 namespace simgrid {
-namespace kernel {
-namespace routing {
+namespace kernel::routing {
 
 void EmptyZone::get_graph(const s_xbt_graph_t* /*graph*/, std::map<std::string, xbt_node_t, std::less<>>* /*nodes*/,
                           std::map<std::string, xbt_edge_t, std::less<>>* /*edges*/)
 {
   xbt_die("No routing no graph");
 }
-} // namespace routing
-} // namespace kernel
+} // namespace kernel::routing
 
 namespace s4u {
 NetZone* create_empty_zone(const std::string& name)
index 7f7337d..851b140 100644 (file)
@@ -20,8 +20,7 @@
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(ker_routing_fat_tree, ker_routing, "Kernel Fat-Tree Routing");
 
 namespace simgrid {
-namespace kernel {
-namespace routing {
+namespace kernel::routing {
 
 bool FatTreeZone::is_in_sub_tree(const FatTreeNode* root, const FatTreeNode* node) const
 {
@@ -488,8 +487,7 @@ void FatTreeZone::generate_dot_file(const std::string& filename) const
   file << "}";
   file.close();
 }
-} // namespace routing
-} // namespace kernel
+} // namespace kernel::routing
 
 namespace s4u {
 FatTreeParams::FatTreeParams(unsigned int n_levels, const std::vector<unsigned int>& down_links,
index 867c140..91fc424 100644 (file)
@@ -14,8 +14,7 @@
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(ker_routing_floyd, ker_routing, "Kernel Floyd Routing");
 
 namespace simgrid {
-namespace kernel {
-namespace routing {
+namespace kernel::routing {
 
 void FloydZone::init_tables(unsigned int table_size)
 {
@@ -154,8 +153,7 @@ void FloydZone::do_seal()
     }
   }
 }
-} // namespace routing
-} // namespace kernel
+} // namespace kernel::routing
 
 namespace s4u {
 NetZone* create_floyd_zone(const std::string& name)
index 8112081..96992f6 100644 (file)
@@ -11,8 +11,7 @@
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(ker_routing_full, ker_routing, "Kernel Full Routing");
 
 namespace simgrid {
-namespace kernel {
-namespace routing {
+namespace kernel::routing {
 
 void FullZone::check_routing_table()
 {
@@ -95,8 +94,7 @@ void FullZone::add_route(NetPoint* src, NetPoint* dst, NetPoint* gw_src, NetPoin
         new_extended_route(get_hierarchy(), gw_src, gw_dst, get_link_list_impl(link_list, true), false));
   }
 }
-} // namespace routing
-} // namespace kernel
+} // namespace kernel::routing
 
 namespace s4u {
 NetZone* create_full_zone(const std::string& name)
index 003a87f..ff70528 100644 (file)
@@ -15,8 +15,7 @@ namespace simgrid {
 
 template class xbt::Extendable<kernel::routing::NetPoint>;
 
-namespace kernel {
-namespace routing {
+namespace kernel::routing {
 
 simgrid::xbt::signal<void(NetPoint&)> NetPoint::on_creation;
 
@@ -40,8 +39,7 @@ NetPoint* NetPoint::set_coordinates(const std::string& coords)
     new vivaldi::Coords(this, coords);
   return this;
 }
-} // namespace routing
-} // namespace kernel
+} // namespace kernel::routing
 } // namespace simgrid
 
 /** @brief Retrieve a netpoint from its name
index 6792cc7..ef3f4e3 100644 (file)
@@ -21,9 +21,7 @@
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(ker_routing, kernel, "Kernel routing-related information");
 
-namespace simgrid {
-namespace kernel {
-namespace routing {
+namespace simgrid::kernel::routing {
 
 /* Pick the right models for CPU, net and host, and call their model_init_preparse */
 static void surf_config_models_setup()
@@ -737,6 +735,4 @@ bool NetZoneImpl::is_component_recursive(const NetPoint* netpoint) const
   return std::any_of(begin(children_), end(children_),
                      [netpoint](const auto* child) { return child->is_component_recursive(netpoint); });
 }
-} // namespace routing
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::routing
index ebdeeee..6d078d7 100644 (file)
@@ -49,9 +49,7 @@ xbt_edge_t new_xbt_graph_edge(const s_xbt_graph_t* graph, xbt_node_t s, xbt_node
     return elm->second;
 }
 
-namespace simgrid {
-namespace kernel {
-namespace routing {
+namespace simgrid::kernel::routing {
 
 RoutedZone::RoutedZone(const std::string& name) : NetZoneImpl(name) {}
 
@@ -198,6 +196,4 @@ void RoutedZone::add_route_check_params(NetPoint* src, NetPoint* dst, NetPoint*
     NetZoneImpl::on_route_creation(symmetrical, gw_src, gw_dst, gw_src, gw_dst, get_link_list_impl(link_list, false));
   }
 }
-} // namespace routing
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::routing
index 2de8f5e..c223e25 100644 (file)
@@ -12,8 +12,7 @@
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(ker_routing_star, ker_routing, "Kernel Star Routing");
 
 namespace simgrid {
-namespace kernel {
-namespace routing {
+namespace kernel::routing {
 StarZone::StarZone(const std::string& name) : ClusterZone(name) {}
 
 void StarZone::add_links_to_route(const std::vector<resource::StandardLinkImpl*>& links, Route* route, double* latency,
@@ -178,8 +177,7 @@ void StarZone::do_seal()
   }
 }
 
-} // namespace routing
-} // namespace kernel
+} // namespace kernel::routing
 
 namespace s4u {
 NetZone* create_star_zone(const std::string& name)
index 33454a5..ab645a2 100644 (file)
@@ -17,8 +17,7 @@
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(ker_routing_torus, ker_routing, "Kernel Torus Routing");
 
 namespace simgrid {
-namespace kernel {
-namespace routing {
+namespace kernel ::routing {
 
 void TorusZone::create_torus_links(unsigned long id, int rank, unsigned long position)
 {
@@ -180,8 +179,7 @@ void TorusZone::get_local_route(const NetPoint* src, const NetPoint* dst, Route*
   route->gw_dst_ = get_gateway(dst->id());
 }
 
-} // namespace routing
-} // namespace kernel
+} // namespace kernel::routing
 
 namespace s4u {
 
index e8b8117..a96a9c6 100644 (file)
@@ -15,8 +15,7 @@
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(ker_routing_vivaldi, ker_routing, "Kernel Vivaldi Routing");
 
 namespace simgrid {
-namespace kernel {
-namespace routing {
+namespace kernel::routing {
 
 namespace vivaldi {
 
@@ -96,8 +95,7 @@ void VivaldiZone::get_local_route(const NetPoint* src, const NetPoint* dst, Rout
   }
 }
 
-} // namespace routing
-} // namespace kernel
+} // namespace kernel::routing
 
 namespace s4u {
 NetZone* create_vivaldi_zone(const std::string& name)
index a9b941c..70af014 100644 (file)
@@ -11,8 +11,7 @@
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(ker_routing_wifi, ker_routing, "Kernel Wifi Routing");
 
 namespace simgrid {
-namespace kernel {
-namespace routing {
+namespace kernel::routing {
 
 void WifiZone::do_seal()
 {
@@ -54,8 +53,7 @@ resource::StandardLinkImpl* WifiZone::do_create_link(const std::string& name, co
   wifi_link_->set_sharing_policy(s4u::Link::SharingPolicy::WIFI, {});
   return wifi_link_;
 }
-} // namespace routing
-} // namespace kernel
+} // namespace kernel::routing
 
 namespace s4u {
 NetZone* create_wifi_zone(const std::string& name)
index 93862c6..d6bda28 100644 (file)
@@ -6,9 +6,7 @@
 #include <simgrid/kernel/Timer.hpp>
 #include <simgrid/s4u/Engine.hpp>
 
-namespace simgrid {
-namespace kernel {
-namespace timer {
+namespace simgrid::kernel::timer {
 
 Timer* Timer::set(double date, xbt::Task<void()>&& callback)
 {
@@ -38,6 +36,4 @@ bool Timer::execute_all()
   return result;
 }
 
-} // namespace timer
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::timer
index b268609..2a2d78c 100644 (file)
@@ -9,8 +9,7 @@
 #include "src/mc/mc_forward.hpp"
 #include "src/mc/remote/RemotePtr.hpp"
 
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
 
 /** Options for read operations
  *
@@ -135,7 +134,6 @@ public:
   }
 };
 
-}
-}
+} // namespace simgrid::mc
 
 #endif
index 796aae4..1e3c2be 100644 (file)
@@ -28,8 +28,7 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_ModelChecker, mc, "ModelChecker");
 # define WAITPID_CHECKED_FLAGS 0
 #endif
 
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
 
 ModelChecker::ModelChecker(std::unique_ptr<RemoteProcess> remote_simulation, int sockfd)
     : checker_side_(sockfd), remote_process_(std::move(remote_simulation))
@@ -353,5 +352,4 @@ void ModelChecker::finalize_app(bool terminate_asap)
   xbt_assert(checker_side_.get_channel().receive(answer) != -1, "Could not receive answer to FINALIZE");
 }
 
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
index ecb376e..c4b1894 100644 (file)
@@ -15,8 +15,7 @@
 #include <memory>
 #include <set>
 
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
 
 /** State of the model-checker (global variables for the model checker)
  */
@@ -73,7 +72,6 @@ private:
   void handle_waitpid();
 };
 
-}
-}
+} // namespace simgrid::mc
 
 #endif
index 3e0fb61..7b4e357 100644 (file)
@@ -30,8 +30,7 @@
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_Session, mc, "Model-checker session");
 XBT_LOG_EXTERNAL_CATEGORY(mc_global);
 
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
 
 template <class Code> void run_child_process(int socket, Code code)
 {
@@ -176,5 +175,4 @@ void Session::check_deadlock() const
     throw DeadlockError();
   }
 }
-}
-}
+} // namespace simgrid::mc
index 520cbbf..b84e6fe 100644 (file)
@@ -12,8 +12,7 @@
 
 #include <functional>
 
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
 
 /** A model-checking session
  *
@@ -55,7 +54,6 @@ public:
 
   bool actor_is_enabled(aid_t pid) const;
 };
-}
-}
+} // namespace simgrid::mc
 
 #endif
index 16a6676..6e46c3c 100644 (file)
@@ -14,8 +14,7 @@
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_VisitedState, mc, "Logging specific to state equality detection mechanisms");
 
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
 
 /** @brief Save the current state */
 VisitedState::VisitedState(unsigned long state_number) : num(state_number)
@@ -86,5 +85,4 @@ VisitedStates::addVisitedState(unsigned long state_number, simgrid::mc::State* g
   return nullptr;
 }
 
-}
-}
+} // namespace simgrid::mc
index e58bc08..33f3d1a 100644 (file)
@@ -12,8 +12,7 @@
 #include <cstddef>
 #include <memory>
 
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
 
 class XBT_PRIVATE VisitedState {
 public:
@@ -37,7 +36,6 @@ private:
   void prune();
 };
 
-}
-}
+} // namespace simgrid::mc
 
 #endif
index 4800572..840ffef 100644 (file)
@@ -28,8 +28,7 @@
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(Api, mc, "Logging specific to MC Facade APIs ");
 XBT_LOG_EXTERNAL_CATEGORY(mc_global);
 
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
 
 simgrid::mc::Exploration* Api::initialize(char** argv, simgrid::mc::ExplorationAlgorithm algo)
 {
@@ -183,5 +182,4 @@ xbt_automaton_state_t Api::get_automaton_transition_dst(xbt_dynar_t const& dynar
   return transition->dst;
 }
 
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
index 085f299..88b2e0c 100644 (file)
@@ -17,8 +17,7 @@
 #include "xbt/automaton.hpp"
 #include "xbt/base.h"
 
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
 
 XBT_DECLARE_ENUM_CLASS(ExplorationAlgorithm, Safety, UDPOR, Liveness, CommDeterminism);
 
@@ -93,7 +92,6 @@ public:
   xbt_automaton_state_t get_automaton_transition_dst(xbt_dynar_t const& dynar, int index) const;
 };
 
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
 
 #endif
index 68d7517..e3048b1 100644 (file)
@@ -11,8 +11,7 @@
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_state, mc, "Logging specific to MC states");
 
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
 
 long State::expended_states_ = 0;
 
@@ -73,5 +72,4 @@ void State::execute_next(int next)
   transition_.reset(mc_model_checker->handle_simcall(aid, times_considered, true));
   mc_model_checker->wait_for_requests();
 }
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
index dd243f8..8432206 100644 (file)
@@ -10,8 +10,7 @@
 #include "src/mc/sosp/Snapshot.hpp"
 #include "src/mc/transition/Transition.hpp"
 
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
 
 /* A node in the exploration graph (kind-of) */
 class XBT_PRIVATE State : public xbt::Extendable<State> {
@@ -51,7 +50,6 @@ public:
   /* Returns the total amount of states created so far (for statistics) */
   static long get_expanded_states() { return expended_states_; }
 };
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
 
 #endif
index 54190db..6b7ffe1 100644 (file)
@@ -13,8 +13,7 @@
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_compare, mc, "Logging specific to mc_compare in mc");
 
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
 
 /*********************************** Heap comparison ***********************************/
 /***************************************************************************************/
@@ -125,8 +124,7 @@ public:
   void match_equals(const HeapLocationPairs* list);
 };
 
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
 
 /************************************************************************************/
 
@@ -153,8 +151,7 @@ static bool is_block_stack(const simgrid::mc::RemoteProcess& process, int block)
                      [block](auto const& stack) { return stack.block == block; });
 }
 
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
 
 void StateComparator::match_equals(const HeapLocationPairs* list)
 {
@@ -984,8 +981,7 @@ static bool heap_area_differ(const RemoteProcess& process, StateComparator& stat
     state.match_equals(previous);
   return false;
 }
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
 
 /************************** Snapshot comparison *******************************/
 /******************************************************************************/
@@ -1176,8 +1172,7 @@ static bool local_variables_differ(const simgrid::mc::RemoteProcess& process, si
   return false;
 }
 
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
 
 bool snapshot_equal(const Snapshot* s1, const Snapshot* s2)
 {
@@ -1265,5 +1260,4 @@ bool snapshot_equal(const Snapshot* s1, const Snapshot* s2)
 
   return true;
 }
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
index bd4fa6e..4464631 100644 (file)
@@ -16,8 +16,7 @@
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_comm_determinism, mc, "Logging specific to MC communication determinism detection");
 
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
 
 enum class CallType { NONE, SEND, RECV, WAIT, WAITANY };
 enum class CommPatternDifference { NONE, TYPE, MBOX, TAG, SRC_PROC, DST_PROC, DATA_SIZE };
@@ -370,5 +369,4 @@ Exploration* create_communication_determinism_checker(Session* session)
   return new DFSExplorer(session);
 }
 
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
index 6025a31..b39b7fb 100644 (file)
@@ -24,8 +24,7 @@
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_dfs, mc, "DFS exploration algorithm of the model-checker");
 
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
 
 xbt::signal<void()> DFSExplorer::on_exploration_start_signal;
 xbt::signal<void()> DFSExplorer::on_backtracking_signal;
@@ -319,5 +318,4 @@ Exploration* create_dfs_exploration(Session* session)
   return new DFSExplorer(session);
 }
 
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
index ceb2a7e..8c59356 100644 (file)
@@ -15,8 +15,7 @@
 #include <string>
 #include <vector>
 
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
 
 class XBT_PRIVATE DFSExplorer : public Exploration {
   ReductionMode reductionMode_ = ReductionMode::unset;
@@ -79,7 +78,6 @@ private:
   std::unique_ptr<VisitedState> visited_state_;
 };
 
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
 
 #endif
index 0be71ab..5b995f7 100644 (file)
@@ -9,8 +9,7 @@
 
 #include "src/mc/api.hpp"
 
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
 
 /** A model-checking exploration algorithm
  *
@@ -64,7 +63,6 @@ XBT_PUBLIC Exploration* create_dfs_exploration(Session* session);
 XBT_PUBLIC Exploration* create_communication_determinism_checker(Session* session);
 XBT_PUBLIC Exploration* create_udpor_checker(Session* session);
 
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
 
 #endif
index 699d506..461ce8a 100644 (file)
@@ -16,8 +16,7 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_liveness, mc, "Logging specific to algorithms
 
 /********* Static functions *********/
 
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
 
 VisitedPair::VisitedPair(int pair_num, xbt_automaton_state_t automaton_state,
                          std::shared_ptr<const std::vector<int>> atomic_propositions,
@@ -376,5 +375,4 @@ Exploration* create_liveness_checker(Session* session)
   return new LivenessChecker(session);
 }
 
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
index ea7c0e6..31aa65c 100644 (file)
@@ -15,8 +15,7 @@
 #include <memory>
 #include <vector>
 
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
 
 class XBT_PRIVATE Pair {
 public:
@@ -79,7 +78,6 @@ private:
   std::string previous_request_;
 };
 
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
 
 #endif
index fd932b6..7f43c4e 100644 (file)
@@ -8,8 +8,7 @@
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_udpor, mc, "Logging specific to MC safety verification ");
 
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
 
 UdporChecker::UdporChecker(Session* session) : Exploration(session) {}
 
@@ -34,5 +33,4 @@ Exploration* create_udpor_checker(Session* session)
   return new UdporChecker(session);
 }
 
-} // namespace mc
-} // namespace simgrid
\ No newline at end of file
+} // namespace simgrid::mc
index 069c515..168a14a 100644 (file)
@@ -10,8 +10,7 @@
 #include "src/mc/explo/Exploration.hpp"
 #include "src/mc/mc_record.hpp"
 
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
 
 class XBT_PRIVATE UdporChecker : public Exploration {
 public:
@@ -22,7 +21,6 @@ public:
   void log_state() override;
 };
 
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
 
 #endif
index 6f765c4..45c7c89 100644 (file)
@@ -15,8 +15,7 @@
 #include "src/mc/inspect/mc_dwarf.hpp"
 #include "src/mc/mc_private.hpp"
 
-namespace simgrid {
-namespace dwarf {
+namespace simgrid::dwarf {
 
 void execute(const Dwarf_Op* ops, std::size_t n, const ExpressionContext& context, ExpressionStack& stack)
 {
@@ -210,5 +209,4 @@ void execute(const Dwarf_Op* ops, std::size_t n, const ExpressionContext& contex
   }
 }
 
-} // namespace dwarf
-} // namespace simgrid
+} // namespace simgrid::dwarf
index fd9be9f..8e6cfd3 100644 (file)
@@ -25,8 +25,7 @@
  *  Evaluation of DWARF location expressions.
  */
 
-namespace simgrid {
-namespace dwarf {
+namespace simgrid::dwarf {
 
 /** A DWARF expression
  *
@@ -143,7 +142,6 @@ inline void execute(simgrid::dwarf::DwarfExpression const& expression, Expressio
   execute(expression.data(), expression.size(), context, stack);
 }
 
-} // namespace dwarf
-} // namespace simgrid
+} // namespace simgrid::dwarf
 
 #endif
index cb8b14d..5934de2 100644 (file)
@@ -10,8 +10,7 @@
 
 #include "src/mc/inspect/Frame.hpp"
 
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
 
 void* Frame::frame_base(unw_cursor_t& unw_cursor) const
 {
@@ -32,5 +31,4 @@ void* Frame::frame_base(unw_cursor_t& unw_cursor) const
     xbt_die("Unexpected location type");
 }
 
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
index f23039e..1cc4d57 100644 (file)
@@ -17,8 +17,7 @@
 #include "src/mc/inspect/Variable.hpp"
 #include "src/mc/mc_forward.hpp"
 
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
 
 /** Debug information about a given function or scope within a function */
 class Frame {
@@ -56,7 +55,6 @@ public:
   void* frame_base(unw_cursor_t& unw_cursor) const;
   void remove_variable(char* name);
 };
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
 
 #endif
index c7f6013..8cf649c 100644 (file)
@@ -18,8 +18,7 @@
 
 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(mc_dwarf);
 
-namespace simgrid {
-namespace dwarf {
+namespace simgrid::dwarf {
 
 /** Resolve a location expression */
 Location resolve(simgrid::dwarf::DwarfExpression const& expression, simgrid::mc::ObjectInformation* object_info,
@@ -95,5 +94,4 @@ LocationList location_list(const simgrid::mc::ObjectInformation& info, Dwarf_Att
 
   return locations;
 }
-} // namespace dwarf
-} // namespace simgrid
+} // namespace simgrid::dwarf
index e0d1548..12c79f0 100644 (file)
@@ -16,8 +16,7 @@
 #include <cstdint>
 #include <vector>
 
-namespace simgrid {
-namespace dwarf {
+namespace simgrid::dwarf {
 
 /** A DWARF expression with optional validity constraints */
 class LocationListEntry {
@@ -74,7 +73,6 @@ Location resolve(simgrid::dwarf::LocationList const& locations, simgrid::mc::Obj
 XBT_PRIVATE
 simgrid::dwarf::LocationList location_list(const simgrid::mc::ObjectInformation& info, Dwarf_Attribute& attr);
 
-} // namespace dwarf
-} // namespace simgrid
+} // namespace simgrid::dwarf
 
 #endif
index 9f53d2d..968d3aa 100644 (file)
@@ -14,8 +14,7 @@
 #include "src/mc/mc_private.hpp"
 #include "xbt/file.hpp"
 
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
 
 /* For an executable object, addresses are virtual address (there is no offset) i.e.
  *  \f$\text{virtual address} = \{dwarf address}\f$
@@ -195,5 +194,4 @@ void find_object_address(std::vector<xbt::VmMap> const& maps, ObjectInformation*
   xbt_assert(result->start_exec || result->start_rw || result->start_ro);
 }
 
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
index 8d7b7b1..0f3a614 100644 (file)
@@ -18,8 +18,7 @@
 
 #include "src/smpi/include/private.hpp"
 
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
 
 /** An entry in the functions index
  *
@@ -166,7 +165,6 @@ XBT_PRIVATE std::shared_ptr<ObjectInformation> createObjectInformation(std::vect
 /** Augment the current module with information about the other ones */
 XBT_PRIVATE void postProcessObjectInformation(const simgrid::mc::RemoteProcess* process,
                                               simgrid::mc::ObjectInformation* info);
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
 
 #endif
index c6d1655..6870ea8 100644 (file)
@@ -19,8 +19,7 @@
 #include "src/mc/inspect/LocationList.hpp"
 #include "src/mc/mc_forward.hpp"
 
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
 
 /** A member of a structure, union
  *
@@ -102,7 +101,6 @@ public:
   simgrid::mc::Type* full_type = nullptr; // The same (but more complete) type
 };
 
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
 
 #endif
index c3b5395..2f83794 100644 (file)
@@ -14,8 +14,7 @@
 #include "src/mc/inspect/LocationList.hpp"
 #include "src/mc/mc_forward.hpp"
 
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
 
 /** A variable (global or local) in the model-checked program */
 class Variable {
@@ -43,7 +42,6 @@ public:
   simgrid::mc::ObjectInformation* object_info = nullptr;
 };
 
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
 
 #endif
index 636d47e..553ec19 100644 (file)
@@ -103,8 +103,7 @@ static void MC_dwarf_handle_variable_die(simgrid::mc::ObjectInformation* info, D
  */
 static std::uint64_t MC_dwarf_at_type(Dwarf_Die* die);
 
-namespace simgrid {
-namespace dwarf {
+namespace simgrid::dwarf {
 
 enum class TagClass { Unknown, Type, Subprogram, Variable, Scope, Namespace };
 
@@ -204,8 +203,7 @@ inline XBT_PRIVATE const char* tagname(Dwarf_Die* die)
   return tagname(dwarf_tag(die));
 }
 
-} // namespace dwarf
-} // namespace simgrid
+} // namespace simgrid::dwarf
 
 // ***** Attributes
 
@@ -1124,8 +1122,7 @@ static void MC_post_process_types(simgrid::mc::ObjectInformation* info)
   }
 }
 
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
 
 void ObjectInformation::ensure_dwarf_loaded()
 {
@@ -1178,11 +1175,9 @@ void postProcessObjectInformation(const RemoteProcess* process, ObjectInformatio
   }
 }
 
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
 
-namespace simgrid {
-namespace dwarf {
+namespace simgrid::dwarf {
 
 /** Convert a DWARF register into a libunwind register
  *
@@ -1211,5 +1206,4 @@ int dwarf_register_to_libunwind(int dwarf_register)
 #endif
 }
 
-} // namespace dwarf
-} // namespace simgrid
+} // namespace simgrid::dwarf
index 33e2e63..b43ad14 100644 (file)
@@ -10,8 +10,7 @@
 
 #include "src/mc/mc_forward.hpp"
 
-namespace simgrid {
-namespace dwarf {
+namespace simgrid::dwarf {
 
 XBT_PRIVATE const char* attrname(int attr);
 XBT_PRIVATE const char* tagname(int tag);
@@ -22,7 +21,6 @@ XBT_PRIVATE void* resolve_member(const void* base, const simgrid::mc::Type* type
 XBT_PRIVATE
 int dwarf_register_to_libunwind(int dwarf_register);
 
-} // namespace dwarf
-} // namespace simgrid
+} // namespace simgrid::dwarf
 
 #endif
index e684c5b..b3eae04 100644 (file)
@@ -154,8 +154,7 @@ const std::unordered_map<int, const char*> attrname_map = {
 };
 }
 
-namespace simgrid {
-namespace dwarf {
+namespace simgrid::dwarf {
 
 /** @brief Get the name of an attribute (DW_AT_*) from its code
  *
@@ -169,5 +168,4 @@ const char* attrname(int attr)
   return name == attrname_map.end() ? "DW_AT_unknown" : name->second;
 }
 
-} // namespace dwarf
-} // namespace simgrid
+} // namespace simgrid::dwarf
index 87fc350..a75395b 100644 (file)
@@ -90,8 +90,7 @@ const std::unordered_map<int, const char*> tagname_map = {
 };
 }
 
-namespace simgrid {
-namespace dwarf {
+namespace simgrid::dwarf {
 
 /** @brief Get the name of a dwarf tag (DW_TAG_*) from its code
  *
@@ -105,5 +104,4 @@ const char* tagname(int tag)
   return name == tagname_map.end() ? "DW_TAG_unknown" : name->second;
 }
 
-} // namespace dwarf
-} // namespace simgrid
+} // namespace simgrid::dwarf
index d9fba29..1ab3a18 100644 (file)
@@ -7,8 +7,7 @@
 #include "src/mc/inspect/mc_dwarf.hpp"
 #include "src/mc/mc_private.hpp"
 
-namespace simgrid {
-namespace dwarf {
+namespace simgrid::dwarf {
 
 /** Resolve snapshot in the process address space
  *
@@ -30,5 +29,4 @@ void* resolve_member(const void* base, const simgrid::mc::Type* /*type*/, const
   return (void*)stack.top();
 }
 
-} // namespace dwarf
-} // namespace simgrid
+} // namespace simgrid::dwarf
index 97e9a53..5806cac 100644 (file)
@@ -25,8 +25,7 @@ typedef register_t greg_t;
 
 #include <libunwind.h>
 
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
 
 // ***** Implementation
 
@@ -250,5 +249,4 @@ unw_cursor_t UnwindContext::cursor()
   return cursor;
 }
 
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
index 49c9183..606dc63 100644 (file)
 #include <cstdio>
 #include <libunwind.h>
 
-namespace simgrid {
-namespace unw {
+namespace simgrid::unw {
 
 XBT_PRIVATE unw_addr_space_t create_addr_space();
 XBT_PRIVATE void* create_context(unw_addr_space_t as, pid_t pid);
-} // namespace unw
-} // namespace simgrid
+} // namespace simgrid::unw
 
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
 
 class UnwindContext {
   simgrid::mc::AddressSpace* address_space_ = nullptr;
@@ -68,7 +65,6 @@ public:
 };
 
 void dumpStack(FILE* file, unw_cursor_t* cursor);
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
 
 #endif
index 6588e36..4515ea6 100644 (file)
@@ -90,8 +90,7 @@ static int access_mem(const unw_addr_space_t as, const unw_word_t addr, unw_word
   return 0;
 }
 
-namespace simgrid {
-namespace unw {
+namespace simgrid::unw {
 
 unw_addr_space_t create_addr_space()
 {
@@ -119,5 +118,4 @@ void* create_context(unw_addr_space_t /*as*/, pid_t pid)
   return _UPT_create(pid);
 }
 
-} // namespace unw
-} // namespace simgrid
+} // namespace simgrid::unw
index ad173e5..fe612c9 100644 (file)
@@ -35,8 +35,7 @@ int MC_random(int min, int max)
   return simgrid::kernel::actor::simcall_answered([&observer] { return observer.get_value(); }, &observer);
 }
 
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
 
 void execute_actors()
 {
@@ -108,5 +107,4 @@ bool request_is_visible(const kernel::actor::Simcall* req)
     return false;
 }
 
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
index 84bf8be..5d30ac9 100644 (file)
@@ -9,8 +9,7 @@
 #include "simgrid/forward.h"
 #include <vector>
 
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
 
 /** Execute everything which is invisible
  *
@@ -38,7 +37,6 @@ XBT_PRIVATE bool actor_is_enabled(kernel::actor::ActorImpl* process);
 
 /** Check if the given simcall is visible */
 XBT_PRIVATE bool request_is_visible(const kernel::actor::Simcall* req);
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
 
 #endif
index 1b758b4..f33a895 100644 (file)
 #endif
 
 #if SIMGRID_HAVE_MC
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
 /* Configuration support */
 simgrid::mc::ReductionMode reduction_mode = simgrid::mc::ReductionMode::unset;
-}
-}
+} // namespace simgrid::mc
 #else
 #define _sg_do_model_check 0
 #endif
index 806b488..273384b 100644 (file)
@@ -18,15 +18,13 @@ constexpr int SIMGRID_MC_EXIT_PROGRAM_CRASH   = 6;
 
 constexpr int SIMGRID_MC_EXIT_ERROR           = 63;
 
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
 class XBT_PUBLIC DeadlockError : public std::exception {
 };
 class XBT_PUBLIC TerminationError : public std::exception {
 };
 class XBT_PUBLIC LivenessError : public std::exception {
 };
-}
-}
+} // namespace simgrid::mc
 
 #endif
index 5972ec1..df52571 100644 (file)
@@ -11,8 +11,7 @@
 #ifndef SIMGRID_MC_FORWARD_HPP
 #define SIMGRID_MC_FORWARD_HPP
 
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
 
 class PageStore;
 class ChunkedData;
@@ -30,8 +29,7 @@ class ActorInformation;
 
 class Session;
 class Exploration;
-}
-}
+} // namespace simgrid::mc
 
 // TODO, try to get rid of the global ModelChecker variable
 extern simgrid::mc::ModelChecker* mc_model_checker;
index 24631fe..ef21204 100644 (file)
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_global, mc, "Logging specific to MC (global)");
 
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
 
 std::vector<double> processes_time;
 
-}
 }
 
 #if SIMGRID_HAVE_MC
@@ -53,9 +51,7 @@ void MC_init_dot_output()
           "digraph graphname{\n fixedsize=true; rankdir=TB; ranksep=.25; edge [fontsize=12]; node [fontsize=10, shape=circle,width=.5 ]; graph [resolution=20, fontsize=10];\n");
 }
 
-
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
 
 /* Liveness */
 xbt_automaton_t property_automaton = nullptr;
@@ -88,8 +84,7 @@ void dumpStack(FILE* file, unw_cursor_t* cursor)
   } while (unw_step(cursor));
 }
 
-}
-}
+} // namespace simgrid::mc
 #endif
 
 double MC_process_clock_get(const simgrid::kernel::actor::ActorImpl* process)
index 3a9118a..8b667d0 100644 (file)
@@ -16,8 +16,7 @@
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_hash, mc, "Logging specific to mc_hash");
 
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
 
 namespace {
 
@@ -49,5 +48,4 @@ hash_type hash(Snapshot const& snapshot)
   return hash.value();
 }
 
-}
-}
+} // namespace simgrid::mc
index 9c9cbf1..03110a7 100644 (file)
@@ -9,14 +9,12 @@
 #include "xbt/base.h"
 #include "src/mc/mc_forward.hpp"
 
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
 
 using hash_type = std::uint64_t;
 
 XBT_PRIVATE hash_type hash(simgrid::mc::Snapshot const& snapshot);
 
-}
-}
+} // namespace simgrid::mc
 
 #endif
index 5d20836..d1c2e02 100644 (file)
@@ -18,10 +18,8 @@ extern "C" int xbt_pagesize;
 /** Number of bits of addresses inside a given page, log2(xbt_pagesize). */
 extern "C" int xbt_pagebits;
 
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc::mmu {
 // TODO, do not depend on xbt_pagesize/xbt_pagebits but our own chunk size
-namespace mmu {
 
 /** @brief How many memory pages are necessary to store size bytes?
  *
@@ -57,8 +55,6 @@ static XBT_ALWAYS_INLINE bool same_chunk(std::uintptr_t a, std::uintptr_t b)
 {
   return (a >> xbt_pagebits) == (b >> xbt_pagebits);
 }
-}
-}
-}
+} // namespace simgrid::mc::mmu
 
 #endif
index a901c14..8702a24 100644 (file)
@@ -9,8 +9,7 @@
 #include "src/kernel/activity/CommImpl.hpp"
 #include "src/mc/remote/RemotePtr.hpp"
 
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
 
 /* On every state, each actor has an entry of the following type.
  * This represents both the actor and its transition because
@@ -51,7 +50,6 @@ public:
   void set_done() { this->state_ = InterleavingType::done; }
 };
 
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
 
 #endif
index d026f59..fc37957 100644 (file)
@@ -19,8 +19,7 @@ XBT_PRIVATE void MC_init_dot_output();
 XBT_PRIVATE extern FILE* dot_output;
 
 /********************************** Miscellaneous **********************************/
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
 
 XBT_PRIVATE void find_object_address(std::vector<simgrid::xbt::VmMap> const& maps,
                                      simgrid::mc::ObjectInformation* result);
@@ -30,7 +29,6 @@ bool snapshot_equal(const Snapshot* s1, const Snapshot* s2);
 
 // Move is somewhere else (in the LivenessChecker class, in the Session class?):
 extern XBT_PRIVATE xbt_automaton_t property_automaton;
-}
-}
+} // namespace simgrid::mc
 
 #endif
index e074d8e..72483fe 100644 (file)
@@ -18,8 +18,7 @@
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_record, mc, "Logging specific to MC record/replay facility");
 
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
 
 void RecordTrace::replay() const
 {
@@ -92,5 +91,4 @@ std::string simgrid::mc::RecordTrace::to_string() const
 
 #endif
 
-}
-}
+} // namespace simgrid::mc
index e63da61..d8cf3a3 100644 (file)
@@ -22,8 +22,7 @@
 #include <string>
 #include <vector>
 
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
 
 class RecordTrace {
   std::vector<Transition*> transitions_;
@@ -45,7 +44,6 @@ public:
   static void replay(const std::string& trace);
 };
 
-}
-}
+} // namespace simgrid::mc
 
 #endif
index 077d7ed..e16f12e 100644 (file)
@@ -8,8 +8,7 @@
 
 #include "xbt/base.h"
 
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
 
 enum class ReductionMode {
   unset,
@@ -18,7 +17,6 @@ enum class ReductionMode {
 };
 
 extern XBT_PRIVATE simgrid::mc::ReductionMode reduction_mode;
-}
-}
+} // namespace simgrid::mc
 
 #endif
index 344212f..7593fc2 100644 (file)
@@ -53,8 +53,7 @@ static void MC_process_refresh_simix_actor_dynar(const simgrid::mc::RemoteProces
   }
   ::operator delete(data);
 }
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
 
 void RemoteProcess::refresh_simix()
 {
@@ -66,5 +65,4 @@ void RemoteProcess::refresh_simix()
   this->cache_flags_ |= RemoteProcess::cache_simix_processes;
 }
 
-}
-}
+} // namespace simgrid::mc
index e222ab7..8d612f1 100644 (file)
@@ -30,8 +30,7 @@
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_client, mc, "MC client logic");
 
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
 
 std::unique_ptr<AppSide> AppSide::instance_;
 
@@ -284,5 +283,4 @@ void AppSide::declare_stack(void* stack, size_t size, ucontext_t* context) const
   message.stack_region = region;
   xbt_assert(channel_.send(message) == 0, "Could not send STACK_REGION to model-checker");
 }
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
index beeb920..393f1ea 100644 (file)
@@ -12,8 +12,7 @@
 
 #include <memory>
 
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
 
 /** Model-checked-side of the communication protocol
  *
@@ -53,7 +52,6 @@ public:
   static AppSide* initialize(xbt_dynar_t actors_addr);
   static AppSide* get() { return instance_.get(); }
 };
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
 
 #endif
index 43ace95..8155d84 100644 (file)
@@ -15,8 +15,7 @@
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_Channel, mc, "MC interprocess communication");
 
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
 
 Channel::~Channel()
 {
@@ -46,5 +45,4 @@ ssize_t Channel::receive(void* message, size_t size, bool block) const
     XBT_ERROR("Channel::receive failure: %s", strerror(errno));
   return res;
 }
-}
-}
+} // namespace simgrid::mc
index 0da0a08..8dfef7e 100644 (file)
@@ -10,8 +10,7 @@
 
 #include <type_traits>
 
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
 
 /** A channel for exchanging messages between model-checker and model-checked app
  *
@@ -52,7 +51,6 @@ public:
 
   int get_socket() const { return socket_; }
 };
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
 
 #endif
index 353e050..06c489a 100644 (file)
@@ -7,8 +7,7 @@
 #include <csignal>
 #include <sys/wait.h>
 
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
 
 void CheckerSide::start(void (*handler)(int, short, void*), ModelChecker* mc)
 {
@@ -34,5 +33,4 @@ void CheckerSide::break_loop() const
   event_base_loopbreak(base_.get());
 }
 
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
index c45602a..c4355ce 100644 (file)
@@ -13,8 +13,7 @@
 #include <functional>
 #include <memory>
 
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
 
 class CheckerSide {
   std::unique_ptr<event_base, decltype(&event_base_free)> base_{nullptr, &event_base_free};
@@ -39,7 +38,6 @@ public:
   void break_loop() const;
 };
 
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
 
 #endif
index cb574a5..654717d 100644 (file)
@@ -25,8 +25,7 @@
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_process, mc, "MC process information");
 
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
 
 // ***** Helper stuff
 
@@ -445,5 +444,4 @@ void RemoteProcess::dump_stack() const
   _UPT_destroy(context);
   unw_destroy_addr_space(as);
 }
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
index 1eec7fa..47f6151 100644 (file)
@@ -18,8 +18,7 @@
 #include <libunwind.h>
 #include <vector>
 
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
 
 class ActorInformation {
 public:
@@ -253,7 +252,6 @@ public:
 
 /** Open a FD to a remote process memory (`/dev/$pid/mem`) */
 XBT_PRIVATE int open_vm(pid_t pid, int flags);
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
 
 #endif
index 90ad5c5..b8dc09a 100644 (file)
@@ -8,8 +8,7 @@
 
 #include "src/kernel/actor/ActorImpl.hpp"
 
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
 
 /** HACK, A value from another process
  *
@@ -135,7 +134,6 @@ template <class T = void> inline RemotePtr<T> remote(uint64_t p)
 {
   return RemotePtr<T>(p);
 }
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
 
 #endif
index 67716eb..e83a281 100644 (file)
 #include <xbt/utility.hpp>
 
 // ***** Messages
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
 
 XBT_DECLARE_ENUM_CLASS(MessageType, NONE, INITIAL_ADDRESSES, CONTINUE, IGNORE_HEAP, UNIGNORE_HEAP, IGNORE_MEMORY,
                        STACK_REGION, REGISTER_SYMBOL, DEADLOCK_CHECK, DEADLOCK_CHECK_REPLY, WAITING, SIMCALL_EXECUTE,
                        SIMCALL_EXECUTE_ANSWER, ASSERTION_FAILED, ACTOR_ENABLED, ACTOR_ENABLED_REPLY, FINALIZE);
 
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
 
 constexpr unsigned MC_MESSAGE_LENGTH = 512;
 constexpr unsigned SIMCALL_SERIALIZATION_BUFFER_SIZE = 2048;
index d3fc111..b3c0cb8 100644 (file)
@@ -6,8 +6,7 @@
 #include "src/mc/AddressSpace.hpp"
 #include "src/mc/sosp/ChunkedData.hpp"
 
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
 
 /** Take a per-page snapshot of a region
  *
@@ -39,5 +38,4 @@ ChunkedData::ChunkedData(PageStore& store, const AddressSpace& as, RemotePtr<voi
   }
 }
 
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
index b5f9e85..449873f 100644 (file)
@@ -12,8 +12,7 @@
 #include "src/mc/remote/RemotePtr.hpp"
 #include "src/mc/sosp/PageStore.hpp"
 
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
 
 /** A byte-string represented as a sequence of chunks from a PageStore
  *
@@ -89,7 +88,6 @@ public:
   ChunkedData(PageStore& store, const AddressSpace& as, RemotePtr<void> addr, std::size_t page_count);
 };
 
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
 
 #endif
index f37ae08..5944652 100644 (file)
@@ -19,8 +19,7 @@
 #include <cstring> // memcpy, memcmp
 #include <unistd.h>
 
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
 
 /** @brief Compute a hash for the given memory page
  *
@@ -156,5 +155,4 @@ std::size_t PageStore::store_page(const void* page)
   return pageno;
 }
 
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
index 1764483..6079621 100644 (file)
@@ -17,8 +17,7 @@
 #define XBT_ALWAYS_INLINE inline __attribute__((always_inline))
 #endif
 
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
 
 /** @brief Storage for snapshot memory pages
  *
@@ -189,7 +188,6 @@ XBT_ALWAYS_INLINE std::size_t PageStore::capacity() const
   return this->capacity_;
 }
 
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
 
 #endif
index e33d13c..74b573f 100644 (file)
@@ -15,8 +15,7 @@
 #define MAP_POPULATE MAP_PREFAULT_READ
 #endif
 
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
 
 Region::Region(RegionType region_type, void* start_addr, size_t size)
     : region_type_(region_type), start_addr_(start_addr), size_(size)
@@ -89,8 +88,7 @@ void* Region::read(void* target, const void* addr, std::size_t size) const
   return target;
 }
 
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
 
 /** Compare memory between snapshots (with known regions)
  *
index 9a20d47..e1685d1 100644 (file)
@@ -12,8 +12,7 @@
 #include <memory>
 #include <vector>
 
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
 
 enum class RegionType { Heap = 1, Data = 2 };
 
@@ -71,8 +70,7 @@ public:
   void* read(void* target, const void* addr, std::size_t size) const;
 };
 
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
 
 int MC_snapshot_region_memcmp(const void* addr1, const simgrid::mc::Region* region1, const void* addr2,
                               const simgrid::mc::Region* region2, std::size_t size);
index cb495f0..6b07c1f 100644 (file)
@@ -10,8 +10,7 @@
 #include <cstddef> /* std::size_t */
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_snapshot, mc, "Taking and restoring snapshots");
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
 /************************************* Take Snapshot ************************************/
 /****************************************************************************************/
 
@@ -289,5 +288,4 @@ void Snapshot::restore(RemoteProcess* process) const
   process->clear_cache();
 }
 
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
index 3b2a40d..412c7b9 100644 (file)
@@ -54,8 +54,7 @@ struct XBT_PRIVATE s_mc_snapshot_stack_t {
 using mc_snapshot_stack_t       = s_mc_snapshot_stack_t*;
 using const_mc_snapshot_stack_t = const s_mc_snapshot_stack_t*;
 
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
 
 class XBT_PRIVATE Snapshot final : public AddressSpace {
 public:
@@ -91,7 +90,6 @@ private:
   void snapshot_regions(RemoteProcess* process);
   void snapshot_stacks(RemoteProcess* process);
 };
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
 
 #endif
index c01936c..9b41ff6 100644 (file)
@@ -20,8 +20,7 @@
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_transition, mc, "Logging specific to MC transitions");
 
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
 unsigned long Transition::executed_transitions_ = 0;
 unsigned long Transition::replayed_transitions_ = 0;
 
@@ -103,5 +102,4 @@ Transition* deserialize_transition(aid_t issuer, int times_considered, std::stri
 #endif
 }
 
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
index e06a460..19e30b9 100644 (file)
@@ -12,8 +12,7 @@
 #include <sstream>
 #include <string>
 
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
 
 /** An element in the recorded path
  *
@@ -79,7 +78,6 @@ public:
 /** Make a new transition from serialized description */
 Transition* deserialize_transition(aid_t issuer, int times_considered, std::stringstream& stream);
 
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
 
 #endif
index 74c84e0..d590c5f 100644 (file)
@@ -16,8 +16,7 @@
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_trans_any, mc_transition, "Logging specific to MC WaitAny / TestAny transitions");
 
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
 
 TestAnyTransition::TestAnyTransition(aid_t issuer, int times_considered, std::stringstream& stream)
     : Transition(Type::TESTANY, issuer, times_considered)
@@ -65,5 +64,4 @@ bool WaitAnyTransition::depends(const Transition* other) const
   return transitions_[times_considered_]->depends(other);
 }
 
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
index 25f67dd..2774d28 100644 (file)
@@ -12,8 +12,7 @@
 #include <sstream>
 #include <string>
 
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
 
 class TestAnyTransition : public Transition {
   std::vector<Transition*> transitions_;
@@ -37,7 +36,6 @@ public:
   Transition* get_current_transition() const { return transitions_.at(times_considered_); }
 };
 
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
 
 #endif
index 1ddabd1..916dd8b 100644 (file)
@@ -17,8 +17,7 @@
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_trans_comm, mc_transition,
                                 "Logging specific to MC transitions about communications");
 
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
 
 CommWaitTransition::CommWaitTransition(aid_t issuer, int times_considered, std::stringstream& stream)
     : Transition(Type::COMM_WAIT, issuer, times_considered)
@@ -210,5 +209,4 @@ bool CommSendTransition::depends(const Transition* other) const
   return false; // Comm transitions are INDEP with non-comm transitions
 }
 
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
index bca9fc2..e5d0a7a 100644 (file)
@@ -12,8 +12,7 @@
 #include <sstream>
 #include <string>
 
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
 
 class CommRecvTransition;
 class CommSendTransition;
@@ -133,7 +132,6 @@ public:
 /** Make a new transition from serialized description */
 Transition* deserialize_transition(aid_t issuer, int times_considered, std::stringstream& stream);
 
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
 
 #endif
index 79f9932..aa01c70 100644 (file)
@@ -11,8 +11,7 @@
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_trans_rand, mc_transition, "Logging specific to MC Random transitions");
 
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
 std::string RandomTransition::to_string(bool verbose) const
 {
   return xbt::string_printf("Random([%d;%d] ~> %d)", min_, max_, times_considered_);
@@ -24,5 +23,4 @@ RandomTransition::RandomTransition(aid_t issuer, int times_considered, std::stri
   xbt_assert(stream >> min_ >> max_);
 }
 
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
index a47a097..8c53c3b 100644 (file)
@@ -8,8 +8,7 @@
 
 #include "src/mc/transition/Transition.hpp"
 
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
 
 class RandomTransition : public Transition {
   int min_;
@@ -21,7 +20,6 @@ public:
   bool depends(const Transition* other) const override { return false; } // Independent with any other transition
 };
 
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
 
 #endif
index 2c6b916..99aa4c2 100644 (file)
@@ -13,8 +13,7 @@
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_trans_synchro, mc_transition, "Logging specific to MC synchronization transitions");
 
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
 
 std::string BarrierTransition::to_string(bool verbose) const
 {
@@ -148,5 +147,4 @@ bool SemaphoreTransition::depends(const Transition* o) const
   return false; // semaphores are INDEP with non-semaphore transitions
 }
 
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
index bea07f2..9f53a3a 100644 (file)
@@ -8,8 +8,7 @@
 
 #include "src/mc/transition/Transition.hpp"
 
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
 
 class BarrierTransition : public Transition {
   unsigned bar_;
@@ -40,7 +39,6 @@ public:
   bool depends(const Transition* other) const override;
 };
 
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
 
 #endif
index 8241c22..b381524 100644 (file)
@@ -9,8 +9,7 @@
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_udpor_global, mc, "udpor_global");
 
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
 
 EventSet EvtSetTools::makeUnion(const EventSet& s1, const EventSet& s2)
 {
@@ -31,5 +30,4 @@ bool EvtSetTools::contains(const EventSet& events, const UnfoldingEvent* e)
   return std::any_of(events.begin(), events.end(), [e](const UnfoldingEvent* evt) { return *evt == *e; });
 }
 
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
index 72ea179..60a6eb0 100644 (file)
@@ -10,8 +10,7 @@
 #include <queue>
 #include <string_view>
 
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
 
 class UnfoldingEvent;
 using EventSet = std::deque<UnfoldingEvent*>;
@@ -94,6 +93,5 @@ private:
   bool transition_is_ISend(const UnfoldingEvent* testedEvt, const UnfoldingEvent* SdRcEvt) const;
   bool check_tr_concern_same_comm(bool& chk1, bool& chk2, UnfoldingEvent* evt1, UnfoldingEvent* evt2) const;
 };
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
 #endif
index 318d93c..049c669 100644 (file)
@@ -13,8 +13,7 @@
 #include "src/instr/instr_private.hpp"
 #include "src/msg/msg_private.hpp"
 
-namespace simgrid {
-namespace msg {
+namespace simgrid::msg {
 
 bool Comm::test()
 {
@@ -60,8 +59,7 @@ msg_error_t Comm::wait_for(double timeout)
 
   return status_;
 }
-} // namespace msg
-} // namespace simgrid
+} // namespace simgrid::msg
 
 /**
  * @brief Checks whether a communication is done, and if yes, finalizes it.
index c7fc090..521bf66 100644 (file)
@@ -7,8 +7,6 @@
 
 XBT_LOG_NEW_CATEGORY(producer_consumer, "Producer-Consumer plugin logging category");
 
-namespace simgrid {
-namespace plugin {
+namespace simgrid::plugin {
 unsigned long pc_id = 0;
 }
-}
index 763f33c..9245029 100644 (file)
@@ -66,10 +66,7 @@ static simgrid::config::Flag<int>
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(host_dvfs, kernel, "Logging specific to the HostDvfs plugin");
 
-namespace simgrid {
-namespace plugin {
-
-namespace dvfs {
+namespace simgrid::plugin::dvfs {
 
 /**
  *  Add this to your host tag:
@@ -361,9 +358,7 @@ public:
   void update() override {}
 };
 #endif
-} // namespace dvfs
-} // namespace plugin
-} // namespace simgrid
+} // namespace simgrid::plugin::dvfs
 
 /* **************************** events  callback *************************** */
 static void on_host_added(simgrid::s4u::Host& host)
index fa9578f..6d9483d 100644 (file)
@@ -115,8 +115,7 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(host_energy, kernel, "Logging specific to the ho
 // Forwards declaration needed to make this function a friend (because friends have external linkage by default)
 static void on_simulation_end();
 
-namespace simgrid {
-namespace plugin {
+namespace simgrid::plugin {
 
 class PowerRange {
 public:
@@ -391,8 +390,7 @@ void HostEnergy::init_watts_range_list()
 
   has_pstate_power_values_ = true;
 }
-} // namespace plugin
-} // namespace simgrid
+} // namespace simgrid::plugin
 
 using simgrid::plugin::HostEnergy;
 
index da3e76a..0c1d075 100644 (file)
@@ -34,8 +34,7 @@ It attaches an extension to each host to store some data, and places callbacks i
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(host_load, kernel, "Logging specific to the HostLoad plugin");
 
-namespace simgrid {
-namespace plugin {
+namespace simgrid::plugin {
 
 static const double activity_uninitialized_remaining_cost = -1;
 
@@ -190,8 +189,7 @@ void HostLoad::reset()
   current_flops_   = host_->get_load();
   current_speed_   = host_->get_speed();
 }
-} // namespace plugin
-} // namespace simgrid
+} // namespace simgrid::plugin
 
 using simgrid::plugin::HostLoad;
 
index 5046420..51bd89c 100644 (file)
@@ -41,8 +41,7 @@ SIMGRID_REGISTER_PLUGIN(link_energy, "Link energy consumption.", &sg_link_energy
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(link_energy, kernel, "Logging specific to the LinkEnergy plugin");
 
-namespace simgrid {
-namespace plugin {
+namespace simgrid::plugin {
 
 class LinkEnergy {
   s4u::Link* link_{};
@@ -141,8 +140,7 @@ double LinkEnergy::get_consumed_energy()
     kernel::actor::simcall_answered(std::bind(&LinkEnergy::update, this));
   return this->total_energy_;
 }
-} // namespace plugin
-} // namespace simgrid
+} // namespace simgrid::plugin
 
 using simgrid::plugin::LinkEnergy;
 
index 954a54f..5b46eb9 100644 (file)
@@ -22,8 +22,7 @@ SIMGRID_REGISTER_PLUGIN(link_energy_wifi, "Energy wifi test", &sg_wifi_energy_pl
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(link_energy_wifi, kernel, "Logging specific to the link energy wifi plugin");
 
-namespace simgrid {
-namespace plugin {
+namespace simgrid::plugin {
 
 class XBT_PRIVATE LinkEnergyWifi {
   // associative array keeping size of data already sent for a given flow (required for interleaved actions)
@@ -261,8 +260,7 @@ void LinkEnergyWifi::init_watts_range_list()
   }
 }
 
-} // namespace plugin
-} // namespace simgrid
+} // namespace simgrid::plugin
 
 using simgrid::plugin::LinkEnergyWifi;
 /* **************************** events  callback *************************** */
index f6089c9..0ecac0c 100644 (file)
@@ -34,8 +34,7 @@ SIMGRID_REGISTER_PLUGIN(link_load, "Link cumulated load.", &sg_link_load_plugin_
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(link_load, kernel, "Logging specific to the LinkLoad plugin");
 
-namespace simgrid {
-namespace plugin {
+namespace simgrid::plugin {
 
 class LinkLoad {
   s4u::Link* link_{};      /*< The link onto which this data is attached*/
@@ -156,8 +155,7 @@ double LinkLoad::get_average_bytes()
     return 0;
 }
 
-} // namespace plugin
-} // namespace simgrid
+} // namespace simgrid::plugin
 
 using simgrid::plugin::LinkLoad;
 
index 4ac6b36..192c4b2 100644 (file)
@@ -12,9 +12,7 @@
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(vm_live_migration, s4u, "S4U virtual machines live migration");
 
-namespace simgrid {
-namespace plugin {
-namespace vm {
+namespace simgrid::plugin::vm {
 xbt::Extension<s4u::Host, VmMigrationExt> VmMigrationExt::EXTENSION_ID;
 
 void VmMigrationExt::ensureVmMigrationExtInstalled()
@@ -269,9 +267,7 @@ void MigrationTx::operator()()
   // effectively the VM on the DST node.
   XBT_DEBUG("mig: tx_done");
 }
-} // namespace vm
-} // namespace plugin
-} // namespace simgrid
+} // namespace simgrid::plugin::vm
 
 using simgrid::plugin::vm::VmMigrationExt;
 
index a1cb867..26ed66c 100644 (file)
@@ -10,9 +10,7 @@
 #ifndef VM_LIVE_MIGRATION_HPP_
 #define VM_LIVE_MIGRATION_HPP_
 
-namespace simgrid {
-namespace plugin {
-namespace vm {
+namespace simgrid::plugin::vm {
 class VmMigrationExt {
 public:
   s4u::ActorPtr issuer_ = nullptr;
@@ -65,7 +63,5 @@ public:
   void operator()();
   sg_size_t sendMigrationData(sg_size_t size, int stage, int stage2_round, double mig_speed, double timeout);
 };
-} // namespace vm
-} // namespace plugin
-} // namespace simgrid
+} // namespace simgrid::plugin::vm
 #endif
index dc0b8d5..bb83cae 100644 (file)
@@ -10,9 +10,7 @@
 #include "src/kernel/activity/ExecImpl.hpp"
 #include "src/kernel/resource/VirtualMachineImpl.hpp"
 
-namespace simgrid {
-namespace plugin {
-namespace vm {
+namespace simgrid::plugin::vm {
 class DirtyPageTrackingExt {
   bool dp_tracking_ = false;
   std::map<kernel::activity::ExecImpl const*, double> dp_objs_;
@@ -67,9 +65,7 @@ double DirtyPageTrackingExt::computed_flops_lookup()
 
   return total;
 }
-} // namespace vm
-} // namespace plugin
-} // namespace simgrid
+} // namespace simgrid::plugin::vm
 
 using simgrid::plugin::vm::DirtyPageTrackingExt;
 
index f22b711..b7f0c99 100644 (file)
@@ -13,8 +13,7 @@
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(s4u_barrier, s4u, "S4U barrier");
 
-namespace simgrid {
-namespace s4u {
+namespace simgrid::s4u {
 
 /** @brief Create a new barrier
  *
@@ -67,8 +66,7 @@ void intrusive_ptr_release(Barrier* barrier)
 {
   intrusive_ptr_release(barrier->pimpl_);
 }
-} // namespace s4u
-} // namespace simgrid
+} // namespace simgrid::s4u
 
 /* **************************** Public C interface *************************** */
 
index 1020047..d1fe6f6 100644 (file)
@@ -18,8 +18,7 @@
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(s4u_comm, s4u_activity, "S4U asynchronous communications");
 
-namespace simgrid {
-namespace s4u {
+namespace simgrid::s4u {
 xbt::signal<void(Comm const&)> Comm::on_send;
 xbt::signal<void(Comm const&)> Comm::on_recv;
 
@@ -472,8 +471,7 @@ size_t Comm::wait_all_for(const std::vector<CommPtr>& comms, double timeout)
   }
   return comms.size();
 }
-} // namespace s4u
-} // namespace simgrid
+} // namespace simgrid::s4u
 /* **************************** Public C interface *************************** */
 void sg_comm_detach(sg_comm_t comm, void (*clean_function)(void*))
 {
index 2558b04..e7e7724 100644 (file)
@@ -12,8 +12,7 @@
 
 #include <mutex>
 
-namespace simgrid {
-namespace s4u {
+namespace simgrid::s4u {
 
 ConditionVariablePtr ConditionVariable::create()
 {
@@ -95,8 +94,7 @@ void intrusive_ptr_release(const ConditionVariable* cond)
   intrusive_ptr_release(cond->pimpl_);
 }
 
-} // namespace s4u
-} // namespace simgrid
+} // namespace simgrid::s4u
 
 /* **************************** Public C interface *************************** */
 sg_cond_t sg_cond_init()
index d0160a0..b768ab4 100644 (file)
@@ -30,8 +30,7 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(s4u_engine, s4u, "Logging specific to S4U (engin
 
 static simgrid::kernel::actor::ActorCode maestro_code;
 
-namespace simgrid {
-namespace s4u {
+namespace simgrid::s4u {
 xbt::signal<void()> Engine::on_platform_creation;
 xbt::signal<void()> Engine::on_platform_created;
 xbt::signal<void()> Engine::on_simulation_start;
@@ -460,8 +459,7 @@ Engine* Engine::set_default_comm_data_copy_callback(
   return this;
 }
 
-} // namespace s4u
-} // namespace simgrid
+} // namespace simgrid::s4u
 
 /* **************************** Public C interface *************************** */
 void simgrid_init(int* argc, char** argv)
index 58b5abf..259ed33 100644 (file)
@@ -14,8 +14,7 @@
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(s4u_exec, s4u_activity, "S4U asynchronous executions");
 
-namespace simgrid {
-namespace s4u {
+namespace simgrid::s4u {
 xbt::signal<void(Exec const&)> Exec::on_start;
 
 Exec::Exec(kernel::activity::ExecImplPtr pimpl)
@@ -245,8 +244,7 @@ bool Exec::is_assigned() const
 {
   return not boost::static_pointer_cast<kernel::activity::ExecImpl>(pimpl_)->get_hosts().empty();
 }
-} // namespace s4u
-} // namespace simgrid
+} // namespace simgrid::s4u
 
 /* **************************** Public C interface *************************** */
 void sg_exec_set_bound(sg_exec_t exec, double bound)
index cd1cdbe..7132643 100644 (file)
@@ -11,8 +11,7 @@
 #include "src/kernel/actor/ActorImpl.hpp"
 #include "src/kernel/actor/SimcallObserver.hpp"
 
-namespace simgrid {
-namespace s4u {
+namespace simgrid::s4u {
 xbt::signal<void(Io const&)> Io::on_start;
 
 Io::Io(kernel::activity::IoImplPtr pimpl)
@@ -113,5 +112,4 @@ bool Io::is_assigned() const
   return boost::static_pointer_cast<kernel::activity::IoImpl>(pimpl_)->get_disk() != nullptr;
 }
 
-} // namespace s4u
-} // namespace simgrid
+} // namespace simgrid::s4u
index fb6de63..7a26692 100644 (file)
@@ -12,8 +12,7 @@
 XBT_LOG_EXTERNAL_CATEGORY(s4u);
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(s4u_channel, s4u, "S4U Communication Mailboxes");
 
-namespace simgrid {
-namespace s4u {
+namespace simgrid::s4u {
 
 const xbt::string& Mailbox::get_name() const
 {
@@ -140,8 +139,7 @@ void Mailbox::clear()
   kernel::actor::simcall_answered([this]() { this->pimpl_->clear(); });
 }
 
-} // namespace s4u
-} // namespace simgrid
+} // namespace simgrid::s4u
 
 /* **************************** Public C interface *************************** */
 sg_mailbox_t sg_mailbox_by_name(const char* alias)
index 6542263..0adc7f0 100644 (file)
@@ -11,8 +11,7 @@
 #include "src/kernel/actor/SynchroObserver.hpp"
 #include "src/mc/mc_replay.hpp"
 
-namespace simgrid {
-namespace s4u {
+namespace simgrid::s4u {
 
 /** @brief Blocks the calling actor until the mutex can be obtained */
 void Mutex::lock()
@@ -72,8 +71,7 @@ void intrusive_ptr_release(const Mutex* mutex)
   intrusive_ptr_release(mutex->pimpl_);
 }
 
-} // namespace s4u
-} // namespace simgrid
+} // namespace simgrid::s4u
 
 /* **************************** Public C interface *************************** */
 sg_mutex_t sg_mutex_init()
index d2fb7b3..bd00dc9 100644 (file)
@@ -14,8 +14,7 @@
 
 #include "src/kernel/resource/NetworkModel.hpp"
 
-namespace simgrid {
-namespace s4u {
+namespace simgrid::s4u {
 
 xbt::signal<void(NetZone const&)> NetZone::on_creation;
 xbt::signal<void(NetZone const&)> NetZone::on_seal;
@@ -200,8 +199,7 @@ kernel::resource::NetworkModelIntf* NetZone::get_network_model() const
   kernel::resource::NetworkModelIntf* model = pimpl_->get_network_model().get();
   return model;
 }
-} // namespace s4u
-} // namespace simgrid
+} // namespace simgrid::s4u
 
 /* **************************** Public C interface *************************** */
 
index 2b9bbdc..c2021e5 100644 (file)
@@ -11,8 +11,7 @@
 #include "src/kernel/actor/SynchroObserver.hpp"
 #include "src/mc/mc_replay.hpp"
 
-namespace simgrid {
-namespace s4u {
+namespace simgrid::s4u {
 
 SemaphorePtr Semaphore::create(unsigned int initial_capacity)
 {
@@ -75,8 +74,7 @@ void intrusive_ptr_release(const Semaphore* sem)
   intrusive_ptr_release(sem->pimpl_);
 }
 
-} // namespace s4u
-} // namespace simgrid
+} // namespace simgrid::s4u
 
 /* **************************** Public C interface *************************** */
 /** @brief creates a semaphore object of the given initial capacity */
index bcb7c1e..284e5eb 100644 (file)
@@ -12,8 +12,7 @@
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(s4u_vm, s4u, "S4U virtual machines");
 
-namespace simgrid {
-namespace s4u {
+namespace simgrid::s4u {
 xbt::signal<void(VirtualMachine&)> VirtualMachine::on_creation;
 xbt::signal<void(VirtualMachine const&)> VirtualMachine::on_start;
 xbt::signal<void(VirtualMachine const&)> VirtualMachine::on_started;
@@ -158,8 +157,7 @@ void VirtualMachine::end_migration() const
   pimpl_vm_->end_migration();
 }
 
-} // namespace s4u
-} // namespace simgrid
+} // namespace simgrid::s4u
 
 /* **************************** Public C interface *************************** */
 
index bc28636..c12a9a4 100644 (file)
@@ -9,8 +9,7 @@
 
 #include <xbt/base.h>
 
-namespace simgrid {
-namespace util {
+namespace simgrid::util {
 
 /** Find a pointer to a value stores in a map (or nullptr) */
 template<typename C, typename K>
@@ -35,7 +34,6 @@ typename C::mapped_type const* find_map_ptr(C const& c, K const& k)
     return &i->second;
 }
 
-} // namespace util
-} // namespace simgrid
+} // namespace simgrid::util
 
 #endif
index 1189a1d..94d5507 100644 (file)
@@ -106,9 +106,7 @@ static bool is_2dmesh(int num, int* i, int* j)
  * Author: Ahmad Faraj
 ****************************************************************************/
 
-namespace simgrid{
-namespace smpi{
-
+namespace simgrid::smpi {
 
 int
 allgather__2dmesh(const void *send_buff, int send_count, MPI_Datatype
@@ -196,5 +194,4 @@ allgather__2dmesh(const void *send_buff, int send_count, MPI_Datatype
   return MPI_SUCCESS;
 }
 
-}
-}
+} // namespace simgrid::smpi
index 40fd291..c1c94d5 100644 (file)
@@ -92,9 +92,7 @@ static bool is_3dmesh(int num, int* i, int* j, int* k)
  * follows "simple"
  * Author: Ahmad Faraj
 ****************************************************************************/
-namespace simgrid{
-namespace smpi{
-
+namespace simgrid::smpi {
 
 int allgather__3dmesh(const void *send_buff, int send_count,
                       MPI_Datatype send_type, void *recv_buff,
@@ -208,6 +206,4 @@ int allgather__3dmesh(const void *send_buff, int send_count,
   return MPI_SUCCESS;
 }
 
-
-}
-}
+} // namespace simgrid::smpi
index 8ad1bc1..b99d9df 100644 (file)
@@ -6,8 +6,7 @@
 
 #include "../colls_private.hpp"
 
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 // Allgather - gather/bcast algorithm
 int allgather__GB(const void *send_buff, int send_count,
                   MPI_Datatype send_type, void *recv_buff,
@@ -22,5 +21,4 @@ int allgather__GB(const void *send_buff, int send_count,
   return MPI_SUCCESS;
 }
 
-}
-}
+} // namespace simgrid::smpi
index 764c7ac..dbf78e3 100644 (file)
@@ -6,8 +6,7 @@
 
 #include "../colls_private.hpp"
 
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 
 // Allgather-Non-Topology-Specific-Logical-Ring algorithm
 int
@@ -69,5 +68,4 @@ allgather__NTSLR_NB(const void *sbuf, int scount, MPI_Datatype stype,
   return MPI_SUCCESS;
 }
 
-}
-}
+} // namespace simgrid::smpi
index 103c474..782f72b 100644 (file)
@@ -6,8 +6,7 @@
 
 #include "../colls_private.hpp"
 
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 
 // Allgather-Non-Topology-Specific-Logical-Ring algorithm
 int
@@ -57,6 +56,4 @@ allgather__NTSLR(const void *sbuf, int scount, MPI_Datatype stype,
   return MPI_SUCCESS;
 }
 
-
-}
-}
+} // namespace simgrid::smpi
index db0e689..2656955 100644 (file)
@@ -6,9 +6,7 @@
 
 #include "../colls_private.hpp"
 
-namespace simgrid{
-namespace smpi{
-
+namespace simgrid::smpi {
 
 int allgather__SMP_NTS(const void *sbuf, int scount,
                        MPI_Datatype stype, void *rbuf,
@@ -163,6 +161,4 @@ int allgather__SMP_NTS(const void *sbuf, int scount,
   return MPI_SUCCESS;
 }
 
-
-}
-}
+} // namespace simgrid::smpi
index a4e3f11..ed4983e 100644 (file)
@@ -67,10 +67,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *          Ahmad Faraj.
  ****************************************************************************/
 
-namespace simgrid{
-namespace smpi{
-
-
+namespace simgrid::smpi {
 
 int allgather__bruck(const void *send_buff, int send_count,
                      MPI_Datatype send_type, void *recv_buff,
@@ -137,6 +134,4 @@ int allgather__bruck(const void *send_buff, int send_count,
   return MPI_SUCCESS;
 }
 
-
-}
-}
+} // namespace simgrid::smpi
index eb0e004..67debf5 100644 (file)
@@ -6,9 +6,7 @@
 
 #include "../colls_private.hpp"
 
-namespace simgrid{
-namespace smpi{
-
+namespace simgrid::smpi {
 
 int allgather__loosely_lr(const void *sbuf, int scount,
                           MPI_Datatype stype, void *rbuf,
@@ -137,6 +135,4 @@ if(comm->get_leaders_comm()==MPI_COMM_NULL){
   return MPI_SUCCESS;
 }
 
-
-}
-}
+} // namespace simgrid::smpi
index 1b07fb4..c465b0c 100644 (file)
@@ -35,8 +35,7 @@
  *      See COPYRIGHT in top-level directory.
  */
 #include "../colls_private.hpp"
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 
 int allgather__mvapich2_smp(const void *sendbuf,int sendcnt, MPI_Datatype sendtype,
                             void *recvbuf, int recvcnt,MPI_Datatype recvtype,
@@ -142,5 +141,4 @@ int allgather__mvapich2_smp(const void *sendbuf,int sendcnt, MPI_Datatype sendty
     return mpi_errno;
 }
 
-}
-}
+} // namespace simgrid::smpi
index b81517d..66195e5 100644 (file)
@@ -64,8 +64,7 @@
 
 #include "../colls_private.hpp"
 
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 
 int
 allgather__ompi_neighborexchange(const void *sbuf, int scount,
@@ -183,6 +182,4 @@ allgather__ompi_neighborexchange(const void *sbuf, int scount,
    return err;
 }
 
-
-}
-}
+} // namespace simgrid::smpi
index a41e0b1..1654901 100644 (file)
@@ -65,9 +65,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  * Author: Ahmad Faraj
  ****************************************************************************/
 
-namespace simgrid{
-namespace smpi{
-
+namespace simgrid::smpi {
 
 int
 allgather__pair(const void *send_buff, int send_count,
@@ -107,6 +105,4 @@ allgather__pair(const void *send_buff, int send_count,
   return MPI_SUCCESS;
 }
 
-
-}
-}
+} // namespace simgrid::smpi
index 314a390..54441b8 100644 (file)
@@ -6,8 +6,7 @@
 #include "../colls_private.hpp"
 #include "smpi_status.hpp"
 
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 
 int
 allgather__rdb(const void *sbuf, int send_count,
@@ -131,6 +130,4 @@ allgather__rdb(const void *sbuf, int send_count,
   return success;
 }
 
-
-}
-}
+} // namespace simgrid::smpi
index e7dae7a..6992e4d 100644 (file)
@@ -6,9 +6,7 @@
 
 #include "../colls_private.hpp"
 
-namespace simgrid{
-namespace smpi{
-
+namespace simgrid::smpi {
 
 // now only work with power of two processes
 
@@ -100,6 +98,4 @@ allgather__rhv(const void *sbuf, int send_count,
   return MPI_SUCCESS;
 }
 
-
-}
-}
+} // namespace simgrid::smpi
index 8933927..3ab4176 100644 (file)
@@ -64,9 +64,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  * Author: Ahmad Faraj
  ****************************************************************************/
 
-namespace simgrid{
-namespace smpi{
-
+namespace simgrid::smpi {
 
 int
 allgather__ring(const void *send_buff, int send_count,
@@ -103,6 +101,4 @@ allgather__ring(const void *send_buff, int send_count,
   return MPI_SUCCESS;
 }
 
-
-}
-}
+} // namespace simgrid::smpi
index 71180e0..e69e2e8 100644 (file)
@@ -6,9 +6,7 @@
 
 #include "../colls_private.hpp"
 
-namespace simgrid{
-namespace smpi{
-
+namespace simgrid::smpi {
 
 int allgather__smp_simple(const void *send_buf, int scount,
                           MPI_Datatype stype, void *recv_buf,
@@ -125,6 +123,4 @@ int allgather__smp_simple(const void *send_buf, int scount,
   return MPI_SUCCESS;
 }
 
-
-}
-}
+} // namespace simgrid::smpi
index 9836c3f..095aad1 100644 (file)
@@ -67,9 +67,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  * Author: Ahmad Faraj
  ****************************************************************************/
 
-namespace simgrid{
-namespace smpi{
-
+namespace simgrid::smpi {
 
 int
 allgather__spreading_simple(const void *send_buff, int send_count,
@@ -116,5 +114,4 @@ allgather__spreading_simple(const void *send_buff, int send_count,
   return MPI_SUCCESS;
 }
 
-}
-}
+} // namespace simgrid::smpi
index 8a5c8d0..a168ce9 100644 (file)
@@ -6,8 +6,7 @@
 
 #include "../colls_private.hpp"
 
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 
 // Allgather - gather/bcast algorithm
 int allgatherv__GB(const void *send_buff, int send_count,
@@ -28,5 +27,4 @@ int allgatherv__GB(const void *send_buff, int send_count,
   return MPI_SUCCESS;
 }
 
-}
-}
+} // namespace simgrid::smpi
index 6e6e5c2..97acd93 100644 (file)
@@ -10,8 +10,7 @@
 #include "smpi_status.hpp"
 #include <algorithm>
 
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 
 int allgatherv__mpich_rdb(
   const void *sendbuf,
@@ -202,5 +201,4 @@ int allgatherv__mpich_rdb(
   return MPI_SUCCESS;
 }
 
-}
-}
+} // namespace simgrid::smpi
index b30ebda..a7c6564 100644 (file)
@@ -25,8 +25,7 @@
  *   comm: communication
  ****************************************************************************/
 
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 
 int allgatherv__mpich_ring(const void *sendbuf, int sendcount,
                            MPI_Datatype send_type, void *recvbuf,
@@ -126,5 +125,4 @@ int allgatherv__mpich_ring(const void *sendbuf, int sendcount,
   return MPI_SUCCESS;
 }
 
-}
-}
+} // namespace simgrid::smpi
index 0533925..8b08989 100644 (file)
@@ -77,8 +77,7 @@
  *         [6]    [6]    [6]    [6]    [6]    [6]    [6]
  */
 
-namespace simgrid {
-namespace smpi {
+namespace simgrid::smpi {
 
 int allgatherv__ompi_bruck(const void *sbuf, int scount,
                            MPI_Datatype sdtype,
@@ -174,6 +173,4 @@ int allgatherv__ompi_bruck(const void *sbuf, int scount,
 
 }
 
-
-}
-}
+} // namespace simgrid::smpi
index 845a242..56e3a1f 100644 (file)
@@ -65,8 +65,7 @@
 
 #include "../colls_private.hpp"
 
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 
 int
 allgatherv__ompi_neighborexchange(const void *sbuf, int scount,
@@ -218,5 +217,4 @@ allgatherv__ompi_neighborexchange(const void *sbuf, int scount,
     return err;
 }
 
-}
-}
+} // namespace simgrid::smpi
index b09e413..820fcf4 100644 (file)
@@ -65,8 +65,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  * Author: Ahmad Faraj
  ****************************************************************************/
 
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 
 int
 allgatherv__pair(const void *send_buff, int send_count,
@@ -105,5 +104,4 @@ allgatherv__pair(const void *send_buff, int send_count,
   return MPI_SUCCESS;
 }
 
-}
-}
+} // namespace simgrid::smpi
index 8b476b0..94f69cf 100644 (file)
@@ -64,8 +64,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  * Author: Ahmad Faraj
  ****************************************************************************/
 
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 
 int
 allgatherv__ring(const void *send_buff, int send_count,
@@ -103,5 +102,4 @@ allgatherv__ring(const void *send_buff, int send_count,
   return MPI_SUCCESS;
 }
 
-}
-}
+} // namespace simgrid::smpi
index b6e277d..7270c21 100644 (file)
@@ -18,8 +18,7 @@
 */
 
 //#include <star-reduction.c>
-namespace simgrid {
-namespace smpi {
+namespace simgrid::smpi {
 int allreduce__lr(const void *sbuf, void *rbuf, int rcount,
                   MPI_Datatype dtype, MPI_Op op, MPI_Comm comm)
 {
@@ -101,5 +100,4 @@ int allreduce__lr(const void *sbuf, void *rbuf, int rcount,
 
   return 0;
 }
-}
-}
+} // namespace simgrid::smpi
index 7d33c76..6cb04ff 100644 (file)
@@ -24,8 +24,7 @@
 #include "../colls_private.hpp"
 #include <algorithm>
 
-namespace simgrid {
-namespace smpi {
+namespace simgrid::smpi {
 int allreduce__mvapich2_rs(const void *sendbuf,
                            void *recvbuf,
                            int count,
@@ -284,5 +283,4 @@ int allreduce__mvapich2_rs(const void *sendbuf,
 
 }
 
-}
-}
+} // namespace simgrid::smpi
index 68c93b6..b643cdb 100644 (file)
@@ -53,9 +53,7 @@ extern int (*MV2_Allreduce_intra_function)(const void *sendbuf,
     MPI_Datatype datatype,
     MPI_Op op, MPI_Comm comm);
 
-
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 static  int MPIR_Allreduce_reduce_p2p_MV2(const void *sendbuf,
     void *recvbuf,
     int count,
@@ -171,5 +169,4 @@ int allreduce__mvapich2_two_level(const void *sendbuf,
     return (mpi_errno);
 
 }
-}
-}
+} // namespace simgrid::smpi
index e9b3ffe..dfb6100 100644 (file)
 
 #include "../colls_private.hpp"
 
-namespace simgrid {
-namespace smpi {
+namespace simgrid::smpi {
 int allreduce__ompi_ring_segmented(const void *sbuf, void *rbuf, int count,
                                    MPI_Datatype dtype,
                                    MPI_Op op,
@@ -396,5 +395,4 @@ int allreduce__ompi_ring_segmented(const void *sbuf, void *rbuf, int count,
    smpi_free_tmp_buffer(inbuf[1]);
    return ret;
 }
-}
-}
+} // namespace simgrid::smpi
index 1f5f7ab..3b0a605 100644 (file)
@@ -5,8 +5,7 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include "../colls_private.hpp"
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 int allreduce__rab_rdb(const void *sbuff, void *rbuff, int count,
                        MPI_Datatype dtype, MPI_Op op,
                        MPI_Comm comm)
@@ -191,5 +190,4 @@ int allreduce__rab_rdb(const void *sbuff, void *rbuff, int count,
   smpi_free_tmp_buffer(tmp_buf);
   return MPI_SUCCESS;
 }
-}
-}
+} // namespace simgrid::smpi
index 997598a..179f7fa 100644 (file)
@@ -6,8 +6,7 @@
 
 #include "../colls_private.hpp"
 //#include <star-reduction.c>
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 // NP pow of 2 for now
 int allreduce__rab1(const void *sbuff, void *rbuff,
                     int count, MPI_Datatype dtype,
@@ -107,5 +106,4 @@ int allreduce__rab1(const void *sbuff, void *rbuff,
 
   return MPI_SUCCESS;
 }
-}
-}
+} // namespace simgrid::smpi
index 6768e6b..238b8be 100644 (file)
@@ -7,8 +7,7 @@
 #include "../colls_private.hpp"
 //#include <star-reduction.c>
 
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 // this requires that count >= NP
 int allreduce__rab2(const void *sbuff, void *rbuff,
                     int count, MPI_Datatype dtype,
@@ -83,5 +82,4 @@ int allreduce__rab2(const void *sbuff, void *rbuff,
 
   return MPI_SUCCESS;
 }
-}
-}
+} // namespace simgrid::smpi
index 1eeba10..bde40d2 100644 (file)
@@ -6,8 +6,7 @@
 
 #include "../colls_private.hpp"
 //#include <star-reduction.c>
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 int allreduce__rdb(const void *sbuff, void *rbuff, int count,
                    MPI_Datatype dtype, MPI_Op op, MPI_Comm comm)
 {
@@ -128,5 +127,4 @@ int allreduce__rdb(const void *sbuff, void *rbuff, int count,
   smpi_free_tmp_buffer(tmp_buf);
   return MPI_SUCCESS;
 }
-}
-}
+} // namespace simgrid::smpi
index 9d1e5f1..dc2eea5 100644 (file)
@@ -5,8 +5,7 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include "../colls_private.hpp"
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 int allreduce__redbcast(const void *buf, void *buf2, int count,
                         MPI_Datatype datatype, MPI_Op op,
                         MPI_Comm comm)
@@ -15,5 +14,4 @@ int allreduce__redbcast(const void *buf, void *buf2, int count,
   colls::bcast(buf2, count, datatype, 0, comm);
   return MPI_SUCCESS;
 }
-}
-}
+} // namespace simgrid::smpi
index c00a716..f7c1b02 100644 (file)
@@ -36,8 +36,7 @@ This function performs all-reduce operation as follow. ** in a pipeline fashion
 3) binomial_tree bcast intra-communication between root of each SMP node
 4) binomial_tree bcast inside each SMP node
 */
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 int allreduce__smp_binomial_pipeline(const void *send_buf,
                                      void *recv_buf, int count,
                                      MPI_Datatype dtype,
@@ -199,5 +198,4 @@ int allreduce__smp_binomial_pipeline(const void *send_buf,
   smpi_free_tmp_buffer(tmp_buf);
   return MPI_SUCCESS;
 }
-}
-}
+} // namespace simgrid::smpi
index d79da41..c53fc38 100644 (file)
@@ -26,8 +26,7 @@ This function performs all-reduce operation as follow.
 3) binomial_tree bcast intra-communication between root of each SMP node
 4) binomial_tree bcast inside each SMP node
 */
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 int allreduce__smp_binomial(const void *send_buf, void *recv_buf,
                             int count, MPI_Datatype dtype,
                             MPI_Op op, MPI_Comm comm)
@@ -153,5 +152,4 @@ int allreduce__smp_binomial(const void *send_buf, void *recv_buf,
   smpi_free_tmp_buffer(tmp_buf);
   return MPI_SUCCESS;
 }
-}
-}
+} // namespace simgrid::smpi
index 39e87b2..ca90a55 100644 (file)
@@ -25,8 +25,7 @@ This function performs all-reduce operation as follow.
 2) Recursive doubling intra-communication between root of each SMP node
 3) binomial_tree bcast inside each SMP node
 */
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 int allreduce__smp_rdb(const void *send_buf, void *recv_buf, int count,
                        MPI_Datatype dtype, MPI_Op op,
                        MPI_Comm comm)
@@ -185,5 +184,4 @@ int allreduce__smp_rdb(const void *send_buf, void *recv_buf, int count,
   smpi_free_tmp_buffer(tmp_buf);
   return MPI_SUCCESS;
 }
-}
-}
+} // namespace simgrid::smpi
index 3d7057d..cd6eac4 100644 (file)
@@ -14,8 +14,7 @@ This function performs all-reduce operation as follow.
 3) allgather - inter between root of each SMP node
 4) binomial_tree bcast inside each SMP node
 */
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 int allreduce__smp_rsag_lr(const void *send_buf, void *recv_buf,
                            int count, MPI_Datatype dtype,
                            MPI_Op op, MPI_Comm comm)
@@ -256,5 +255,4 @@ int allreduce__smp_rsag_lr(const void *send_buf, void *recv_buf,
   smpi_free_tmp_buffer(tmp_buf);
   return MPI_SUCCESS;
 }
-}
-}
+} // namespace simgrid::smpi
index cbc8ab7..034f9f8 100644 (file)
@@ -18,8 +18,7 @@ This function performs all-reduce operation as follow.
 3) allgather - inter between root of each SMP node
 4) binomial_tree bcast inside each SMP node
 */
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 int allreduce__smp_rsag_rab(const void *sbuf, void *rbuf, int count,
                             MPI_Datatype dtype, MPI_Op op,
                             MPI_Comm comm)
@@ -193,5 +192,4 @@ int allreduce__smp_rsag_rab(const void *sbuf, void *rbuf, int count,
   smpi_free_tmp_buffer(tmp_buf);
   return MPI_SUCCESS;
 }
-}
-}
+} // namespace simgrid::smpi
index 273118e..5f43edc 100644 (file)
@@ -13,8 +13,7 @@ This function performs all-reduce operation as follow.
 3) allgather - inter between root of each SMP node
 4) binomial_tree bcast inside each SMP node
 */
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 int allreduce__smp_rsag(const void *send_buf, void *recv_buf,
                         int count, MPI_Datatype dtype, MPI_Op op,
                         MPI_Comm comm)
@@ -224,5 +223,4 @@ int allreduce__smp_rsag(const void *send_buf, void *recv_buf,
   smpi_free_tmp_buffer(tmp_buf);
   return MPI_SUCCESS;
 }
-}
-}
+} // namespace simgrid::smpi
index 0aeca6e..aa63c41 100644 (file)
@@ -52,8 +52,7 @@ static int alltoall_check_is_2dmesh(int num, int *i, int *j)
   }
   return 0;
 }
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 
 int alltoall__2dmesh(const void *send_buff, int send_count,
                      MPI_Datatype send_type,
@@ -171,5 +170,4 @@ int alltoall__2dmesh(const void *send_buff, int send_count,
   smpi_free_tmp_buffer(tmp_buff2);
   return MPI_SUCCESS;
 }
-}
-}
+} // namespace simgrid::smpi
index bf22c1d..3dceba3 100644 (file)
@@ -45,8 +45,7 @@ static int alltoall_check_is_3dmesh(int num, int *i, int *j, int *k)
   }
   return 0;
 }
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 int alltoall__3dmesh(const void *send_buff, int send_count,
                      MPI_Datatype send_type,
                      void *recv_buff, int recv_count,
@@ -181,5 +180,4 @@ int alltoall__3dmesh(const void *send_buff, int send_count,
   smpi_free_tmp_buffer(tmp_buff2);
   return MPI_SUCCESS;
 }
-}
-}
+} // namespace simgrid::smpi
index e85d510..9ee08af 100644 (file)
@@ -8,10 +8,7 @@
 
 /*Naive and simple basic alltoall implementation. */
 
-
-namespace simgrid{
-namespace smpi{
-
+namespace simgrid::smpi {
 
 int alltoall__basic_linear(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                            void *recvbuf, int recvcount, MPI_Datatype recvtype, MPI_Comm comm)
@@ -63,5 +60,4 @@ int alltoall__basic_linear(const void *sendbuf, int sendcount, MPI_Datatype send
   return err;
 }
 
-}
-}
+} // namespace simgrid::smpi
index a24dc9f..da338eb 100644 (file)
@@ -27,9 +27,7 @@
 
 #include "../colls_private.hpp"
 
-namespace simgrid{
-namespace smpi{
-
+namespace simgrid::smpi {
 
 int
 alltoall__bruck(const void *send_buff, int send_count,
@@ -118,5 +116,4 @@ alltoall__bruck(const void *send_buff, int send_count,
   return MPI_SUCCESS;
 }
 
-}
-}
+} // namespace simgrid::smpi
index ca6b376..99a8456 100644 (file)
@@ -42,8 +42,7 @@
 #define MV2_ALLTOALL_THROTTLE_FACTOR         4
 
 #include "../colls_private.hpp"
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 int alltoall__mvapich2_scatter_dest(const void *sendbuf,
                                     int sendcount,
                                     MPI_Datatype sendtype,
@@ -133,5 +132,4 @@ int alltoall__mvapich2_scatter_dest(const void *sendbuf,
     return (mpi_errno);
 
 }
-}
-}
+} // namespace simgrid::smpi
index 7968199..5bdbcd0 100644 (file)
@@ -27,8 +27,7 @@
  * Author: Ahmad Faraj
 
  ****************************************************************************/
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 int
 alltoall__pair_light_barrier(const void *send_buff, int send_count,
                              MPI_Datatype send_type,
@@ -76,5 +75,4 @@ alltoall__pair_light_barrier(const void *send_buff, int send_count,
   }
   return MPI_SUCCESS;
 }
-}
-}
+} // namespace simgrid::smpi
index b2d455b..88467b1 100644 (file)
@@ -27,8 +27,7 @@
  * Author: Ahmad Faraj
 
  ****************************************************************************/
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 int
 alltoall__pair_mpi_barrier(const void *send_buff, int send_count,
                            MPI_Datatype send_type,
@@ -63,5 +62,4 @@ alltoall__pair_mpi_barrier(const void *send_buff, int send_count,
   }
   return MPI_SUCCESS;
 }
-}
-}
+} // namespace simgrid::smpi
index c4e7662..27275aa 100644 (file)
@@ -26,8 +26,7 @@
  * Author: Ahmad Faraj
 
  ****************************************************************************/
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 int
 alltoall__pair_one_barrier(const void *send_buff, int send_count,
                            MPI_Datatype send_type,
@@ -65,5 +64,4 @@ alltoall__pair_one_barrier(const void *send_buff, int send_count,
 
   return MPI_SUCCESS;
 }
-}
-}
+} // namespace simgrid::smpi
index e991df0..b73d5b2 100644 (file)
@@ -28,8 +28,7 @@
  * Author: Ahmad Faraj
 
  ****************************************************************************/
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 int alltoall__pair_rma(const void *send_buff, int send_count, MPI_Datatype send_type,
                        void *recv_buff, int recv_count, MPI_Datatype recv_type,
                        MPI_Comm comm)
@@ -96,5 +95,4 @@ int alltoall__pair(const void *send_buff, int send_count,
 
   return MPI_SUCCESS;
 }
-}
-}
+} // namespace simgrid::smpi
index f12da0a..ed942b9 100644 (file)
@@ -28,8 +28,7 @@
  * Author: MPICH / slightly modified by Ahmad Faraj.
 
  ****************************************************************************/
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 int alltoall__rdb(const void *send_buff, int send_count,
                   MPI_Datatype send_type,
                   void *recv_buff, int recv_count,
@@ -154,5 +153,4 @@ int alltoall__rdb(const void *send_buff, int send_count,
   smpi_free_tmp_buffer(tmp_buff);
   return MPI_SUCCESS;
 }
-}
-}
+} // namespace simgrid::smpi
index 553e365..804dbca 100644 (file)
@@ -27,8 +27,7 @@
  * Author: Ahmad Faraj
 
  ****************************************************************************/
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 int
 alltoall__ring_light_barrier(const void *send_buff, int send_count,
                              MPI_Datatype send_type,
@@ -76,5 +75,4 @@ alltoall__ring_light_barrier(const void *send_buff, int send_count,
 
   return MPI_SUCCESS;
 }
-}
-}
+} // namespace simgrid::smpi
index 4dcaafd..0810da0 100644 (file)
@@ -26,8 +26,7 @@
  * Author: Ahmad Faraj
 
  ****************************************************************************/
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 int
 alltoall__ring_mpi_barrier(const void *send_buff, int send_count,
                            MPI_Datatype send_type,
@@ -62,5 +61,4 @@ alltoall__ring_mpi_barrier(const void *send_buff, int send_count,
 
   return MPI_SUCCESS;
 }
-}
-}
+} // namespace simgrid::smpi
index d57047c..748d689 100644 (file)
@@ -25,8 +25,7 @@
  * Author: Ahmad Faraj
 
  ****************************************************************************/
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 int
 alltoall__ring_one_barrier(const void *send_buff, int send_count,
                            MPI_Datatype send_type,
@@ -60,5 +59,4 @@ alltoall__ring_one_barrier(const void *send_buff, int send_count,
   }
   return MPI_SUCCESS;
 }
-}
-}
+} // namespace simgrid::smpi
index 82c9dc7..306734e 100644 (file)
@@ -25,8 +25,7 @@
  * Author: Ahmad Faraj
 
  ****************************************************************************/
-namespace simgrid {
-namespace smpi {
+namespace simgrid::smpi {
 int alltoall__ring(const void *send_buff, int send_count,
                    MPI_Datatype send_type, void *recv_buff,
                    int recv_count, MPI_Datatype recv_type,
@@ -58,5 +57,4 @@ int alltoall__ring(const void *send_buff, int send_count,
   }
   return MPI_SUCCESS;
 }
-}
-}
+} // namespace simgrid::smpi
index f6bc827..6a7268f 100644 (file)
@@ -13,8 +13,7 @@
  * FIXME: uh, check smpi_pmpi again, but this routine is called for > 12, not
  * less...
  **/
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 int alltoallv__bruck(const void *sendbuf, const int *sendcounts, const int *senddisps,
                      MPI_Datatype sendtype, void *recvbuf,
                      const int *recvcounts,const int *recvdisps, MPI_Datatype recvtype,
@@ -86,5 +85,4 @@ int alltoallv__bruck(const void *sendbuf, const int *sendcounts, const int *send
   }
   return MPI_SUCCESS;
 }
-}
-}
+} // namespace simgrid::smpi
index 8c0db4b..431d14f 100644 (file)
@@ -14,8 +14,7 @@
  * differently and so will not have to duplicate code.
  * GEF Oct05 after asking Jeff.
  */
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 int alltoallv__ompi_basic_linear(const void *sbuf, const int *scounts, const int *sdisps,
                                  MPI_Datatype sdtype,
                                  void *rbuf, const int *rcounts, const int *rdisps,
@@ -91,5 +90,4 @@ int alltoallv__ompi_basic_linear(const void *sbuf, const int *scounts, const int
 
   return MPI_SUCCESS;
 }
-}
-}
+} // namespace simgrid::smpi
index a99e36c..c773e31 100644 (file)
@@ -27,8 +27,7 @@
  * Author: Ahmad Faraj
 
  ****************************************************************************/
-namespace simgrid {
-namespace smpi {
+namespace simgrid::smpi {
 int alltoallv__pair_light_barrier(const void *send_buff, const int *send_counts, const int *send_disps,
                                   MPI_Datatype send_type,
                                   void *recv_buff, const int *recv_counts, const int *recv_disps,
@@ -72,5 +71,4 @@ int alltoallv__pair_light_barrier(const void *send_buff, const int *send_counts,
   }
   return MPI_SUCCESS;
 }
-}
-}
+} // namespace simgrid::smpi
index 4f1f8b3..c901225 100644 (file)
@@ -27,8 +27,7 @@
  * Author: Ahmad Faraj
 
  ****************************************************************************/
-namespace simgrid {
-namespace smpi {
+namespace simgrid::smpi {
 int alltoallv__pair_mpi_barrier(const void *send_buff, const int *send_counts, const int *send_disps,
                                 MPI_Datatype send_type,
                                 void *recv_buff, const int *recv_counts, const int *recv_disps,
@@ -59,5 +58,4 @@ int alltoallv__pair_mpi_barrier(const void *send_buff, const int *send_counts, c
   }
   return MPI_SUCCESS;
 }
-}
-}
+} // namespace simgrid::smpi
index a5e481d..5a2bb88 100644 (file)
@@ -26,8 +26,7 @@
  * Author: Ahmad Faraj
 
  ****************************************************************************/
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 int alltoallv__pair_one_barrier(const void *send_buff, const int *send_counts, const int *send_disps,
                                 MPI_Datatype send_type,
                                 void *recv_buff,  const int *recv_counts, const int *recv_disps,                                                                                  MPI_Datatype recv_type, MPI_Comm comm)
@@ -60,5 +59,4 @@ int alltoallv__pair_one_barrier(const void *send_buff, const int *send_counts, c
 
   return MPI_SUCCESS;
 }
-}
-}
+} // namespace simgrid::smpi
index 433fb71..a099450 100644 (file)
@@ -27,8 +27,7 @@
  * Author: Ahmad Faraj
 
  ****************************************************************************/
-namespace simgrid {
-namespace smpi {
+namespace simgrid::smpi {
 int alltoallv__pair(const void *send_buff, const int *send_counts, const int *send_disps,
                     MPI_Datatype send_type,
                     void *recv_buff, const int *recv_counts, const int *recv_disps,
@@ -58,5 +57,4 @@ int alltoallv__pair(const void *send_buff, const int *send_counts, const int *se
   }
   return MPI_SUCCESS;
 }
-}
-}
+} // namespace simgrid::smpi
index 9cc2ff2..8231ebe 100644 (file)
@@ -27,8 +27,7 @@
  * Author: Ahmad Faraj
 
  ****************************************************************************/
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 int alltoallv__ring_light_barrier(const void *send_buff, const int *send_counts, const int *send_disps,
                                   MPI_Datatype send_type,
                                   void *recv_buff, const int *recv_counts, const int *recv_disps,
@@ -72,5 +71,4 @@ int alltoallv__ring_light_barrier(const void *send_buff, const int *send_counts,
 
   return MPI_SUCCESS;
 }
-}
-}
+} // namespace simgrid::smpi
index 0ce4424..38cd26d 100644 (file)
@@ -26,8 +26,7 @@
  * Author: Ahmad Faraj
 
  ****************************************************************************/
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 int alltoallv__ring_mpi_barrier(const void *send_buff, const int *send_counts, const int *send_disps,
                                 MPI_Datatype send_type,
                                 void *recv_buff, const int *recv_counts, const int *recv_disps,
@@ -58,5 +57,4 @@ int alltoallv__ring_mpi_barrier(const void *send_buff, const int *send_counts, c
 
   return MPI_SUCCESS;
 }
-}
-}
+} // namespace simgrid::smpi
index 533635a..5007f91 100644 (file)
@@ -25,8 +25,7 @@
  * Author: Ahmad Faraj
 
  ****************************************************************************/
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 int alltoallv__ring_one_barrier(const void *send_buff, const int *send_counts, const int *send_disps,
                                 MPI_Datatype send_type,
                                 void *recv_buff, const int *recv_counts, const int *recv_disps,
@@ -56,5 +55,4 @@ int alltoallv__ring_one_barrier(const void *send_buff, const int *send_counts, c
   }
   return MPI_SUCCESS;
 }
-}
-}
+} // namespace simgrid::smpi
index d94a569..661a434 100644 (file)
@@ -25,8 +25,7 @@
  * Author: Ahmad Faraj
 
  ****************************************************************************/
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 int alltoallv__ring(const void* send_buff, const int* send_counts, const int* send_disps, MPI_Datatype send_type,
                     void* recv_buff, const int* recv_counts, const int* recv_disps, MPI_Datatype recv_type,
                     MPI_Comm comm)
@@ -61,5 +60,4 @@ int alltoallv__ring(const void* send_buff, const int* send_counts, const int* se
   }
   return MPI_SUCCESS;
 }
-}
-}
+} // namespace simgrid::smpi
index 3135a2d..eee6c2f 100644 (file)
@@ -15,8 +15,7 @@
 #include "../coll_tuned_topo.hpp"
 #include "../colls_private.hpp"
 
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 int barrier__mpich_smp(MPI_Comm comm)
 {
     int mpi_errno = MPI_SUCCESS;
@@ -63,6 +62,4 @@ int barrier__mpich_smp(MPI_Comm comm)
     return mpi_errno;
 }
 
-}
-}
-
+} // namespace simgrid::smpi
index 8def355..4b5a0aa 100644 (file)
@@ -42,8 +42,7 @@
 #include "../coll_tuned_topo.hpp"
 #include "../colls_private.hpp"
 #include "smpi_actor.hpp"
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 int barrier__mvapich2_pair(MPI_Comm comm)
 {
 
@@ -96,5 +95,4 @@ int barrier__mvapich2_pair(MPI_Comm comm)
 
 }
 
-}
-}
+} // namespace simgrid::smpi
index 5c921c8..e897a3f 100644 (file)
@@ -43,8 +43,7 @@
  * synchronous guarantee made by last ring of sends are synchronous
  *
  */
-namespace simgrid {
-namespace smpi {
+namespace simgrid::smpi {
 int barrier__ompi_doublering(MPI_Comm comm)
 {
     int rank, size;
@@ -301,5 +300,4 @@ int barrier__ompi_tree(MPI_Comm comm)
     return MPI_SUCCESS;
 }
 
-}
-}
+} // namespace simgrid::smpi
index 0afac62..bfd343b 100644 (file)
@@ -7,8 +7,7 @@
 #include "../colls_private.hpp"
 
 int bcast_NTSB_segment_size_in_byte = 8192;
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 int bcast__NTSB(void *buf, int count, MPI_Datatype datatype,
                 int root, MPI_Comm comm)
 {
@@ -172,5 +171,4 @@ int bcast__NTSB(void *buf, int count, MPI_Datatype datatype,
   return MPI_SUCCESS;
 }
 
-}
-}
+} // namespace simgrid::smpi
index a1495c1..6cfcd11 100644 (file)
@@ -11,8 +11,7 @@ static int bcast_NTSL_segment_size_in_byte = 8192;
 /* Non-topology-specific pipelined linear-bcast function
    0->1, 1->2 ,2->3, ....., ->last node : in a pipeline fashion
 */
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 int bcast__NTSL_Isend(void *buf, int count, MPI_Datatype datatype,
                       int root, MPI_Comm comm)
 {
@@ -123,5 +122,4 @@ int bcast__NTSL_Isend(void *buf, int count, MPI_Datatype datatype,
   return MPI_SUCCESS;
 }
 
-}
-}
+} // namespace simgrid::smpi
index 735b5d1..9fdb21d 100644 (file)
@@ -11,8 +11,7 @@ static int bcast_NTSL_segment_size_in_byte = 8192;
 /* Non-topology-specific pipelined linear-bcast function
    0->1, 1->2 ,2->3, ....., ->last node : in a pipeline fashion
 */
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 int bcast__NTSL(void *buf, int count, MPI_Datatype datatype,
                 int root, MPI_Comm comm)
 {
@@ -123,5 +122,4 @@ int bcast__NTSL(void *buf, int count, MPI_Datatype datatype,
   return MPI_SUCCESS;
 }
 
-}
-}
+} // namespace simgrid::smpi
index 5af3dd2..0e2bc60 100644 (file)
@@ -7,8 +7,7 @@
 #include "../colls_private.hpp"
 
 int bcast_SMP_binary_segment_byte = 8192;
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 int bcast__SMP_binary(void *buf, int count,
                       MPI_Datatype datatype, int root,
                       MPI_Comm comm)
@@ -222,5 +221,4 @@ int bcast__SMP_binary(void *buf, int count,
   return 1;
 }
 
-}
-}
+} // namespace simgrid::smpi
index 38e8153..4c9589f 100644 (file)
@@ -5,8 +5,7 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include "../colls_private.hpp"
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 int bcast__SMP_binomial(void *buf, int count,
                         MPI_Datatype datatype, int root,
                         MPI_Comm comm)
@@ -109,5 +108,4 @@ int bcast__SMP_binomial(void *buf, int count,
   return MPI_SUCCESS;
 }
 
-}
-}
+} // namespace simgrid::smpi
index 902bcd0..9d4dacd 100644 (file)
@@ -7,8 +7,7 @@
 #include "../colls_private.hpp"
 
 int bcast_SMP_linear_segment_byte = 8192;
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 int bcast__SMP_linear(void *buf, int count,
                       MPI_Datatype datatype, int root,
                       MPI_Comm comm)
@@ -171,5 +170,4 @@ int bcast__SMP_linear(void *buf, int count,
   return MPI_SUCCESS;
 }
 
-}
-}
+} // namespace simgrid::smpi
index 7367b40..6e17bd4 100644 (file)
@@ -15,8 +15,7 @@ int bcast_arrival_pattern_aware_wait_segment_size_in_byte = 8192;
 #ifndef BCAST_ARRIVAL_PATTERN_AWARE_MAX_NODE
 #define BCAST_ARRIVAL_PATTERN_AWARE_MAX_NODE 128
 #endif
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 /* Non-topology-specific pipelined linear-bcast function */
 int bcast__arrival_pattern_aware_wait(void *buf, int count,
                                       MPI_Datatype datatype,
@@ -241,5 +240,4 @@ int bcast__arrival_pattern_aware_wait(void *buf, int count,
   return MPI_SUCCESS;
 }
 
-}
-}
+} // namespace simgrid::smpi
index 4cd0815..f2952be 100644 (file)
@@ -11,8 +11,7 @@ static int bcast_NTSL_segment_size_in_byte = 8192;
 #define HEADER_SIZE 1024
 #define MAX_NODE 1024
 
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 /* Non-topology-specific pipelined linear-bcast function */
 int bcast__arrival_pattern_aware(void *buf, int count,
                                  MPI_Datatype datatype, int root,
@@ -356,5 +355,4 @@ int bcast__arrival_pattern_aware(void *buf, int count,
   return MPI_SUCCESS;
 }
 
-}
-}
+} // namespace simgrid::smpi
index 78fb739..d4d03e1 100644 (file)
@@ -13,8 +13,7 @@
 #ifndef BCAST_ARRIVAL_PATTERN_AWARE_MAX_NODE
 #define BCAST_ARRIVAL_PATTERN_AWARE_MAX_NODE 128
 #endif
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 /* Non-topology-specific pipelined linear-bcast function */
 int bcast__arrival_scatter(void *buf, int count,
                            MPI_Datatype datatype, int root,
@@ -233,5 +232,4 @@ int bcast__arrival_scatter(void *buf, int count,
   return MPI_SUCCESS;
 }
 
-}
-}
+} // namespace simgrid::smpi
index 8d7076a..0f19627 100644 (file)
@@ -67,8 +67,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  * Author: MPIH / modified by Ahmad Faraj
 
  ****************************************************************************/
-namespace simgrid {
-namespace smpi {
+namespace simgrid::smpi {
 int bcast__binomial_tree(void *buff, int count,
                          MPI_Datatype data_type, int root,
                          MPI_Comm comm)
@@ -107,5 +106,4 @@ int bcast__binomial_tree(void *buff, int count,
   return MPI_SUCCESS;
 }
 
-}
-}
+} // namespace simgrid::smpi
index 5ee6e2f..a144646 100644 (file)
@@ -7,8 +7,7 @@
 #include "../colls_private.hpp"
 
 int flattree_segment_in_byte = 8192;
-namespace simgrid {
-namespace smpi {
+namespace simgrid::smpi {
 int bcast__flattree_pipeline(void *buff, int count,
                              MPI_Datatype data_type, int root,
                              MPI_Comm comm)
@@ -59,5 +58,4 @@ int bcast__flattree_pipeline(void *buff, int count,
   return MPI_SUCCESS;
 }
 
-}
-}
+} // namespace simgrid::smpi
index 8ae4577..800777f 100644 (file)
@@ -5,8 +5,7 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include "../colls_private.hpp"
-namespace simgrid {
-namespace smpi {
+namespace simgrid::smpi {
 int bcast__flattree(void *buff, int count, MPI_Datatype data_type,
                     int root, MPI_Comm comm)
 {
@@ -39,5 +38,4 @@ int bcast__flattree(void *buff, int count, MPI_Datatype data_type,
   return MPI_SUCCESS;
 }
 
-}
-}
+} // namespace simgrid::smpi
index 5c55f32..50ea2ae 100644 (file)
@@ -73,8 +73,7 @@ extern int mv2_intra_node_knomial_factor;
 #define mv2_bcast_large_msg            512*1024
 #define mv2_knomial_intra_node_threshold 131072
 #define mv2_scatter_rd_inter_leader_bcast 1
-namespace simgrid {
-namespace smpi {
+namespace simgrid::smpi {
 int bcast__mvapich2_inter_node(void *buffer,
                                int count,
                                MPI_Datatype datatype,
@@ -380,5 +379,4 @@ int bcast__mvapich2_intra_node(void *buffer,
 
 }
 
-}
-}
+} // namespace simgrid::smpi
index e4c06fb..e57fc37 100644 (file)
@@ -9,8 +9,7 @@
 
 #define MAXTREEFANOUT 32
 
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 int bcast__ompi_pipeline( void* buffer,
                           int original_count,
                           MPI_Datatype datatype,
@@ -211,5 +210,4 @@ int bcast__ompi_pipeline( void* buffer,
     return (MPI_SUCCESS);
 }
 
-}
-}
+} // namespace simgrid::smpi
index a99933f..437905a 100644 (file)
@@ -58,8 +58,7 @@
 #include "../coll_tuned_topo.hpp"
 #include "../colls_private.hpp"
 #define MAXTREEFANOUT 32
-namespace simgrid {
-namespace smpi {
+namespace simgrid::smpi {
 
 int bcast__ompi_split_bintree( void* buffer,
                                int count,
@@ -292,6 +291,4 @@ int bcast__ompi_split_bintree( void* buffer,
 
 }
 
-}
-}
-
+} // namespace simgrid::smpi
index aca6957..dcf2148 100644 (file)
@@ -67,8 +67,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  * Author: MPIH / modified by Ahmad Faraj
 
  ****************************************************************************/
-namespace simgrid {
-namespace smpi {
+namespace simgrid::smpi {
 int bcast__scatter_LR_allgather(void *buff, int count,
                                 MPI_Datatype data_type, int root,
                                 MPI_Comm comm)
@@ -177,5 +176,4 @@ int bcast__scatter_LR_allgather(void *buff, int count,
   return MPI_SUCCESS;
 }
 
-}
-}
+} // namespace simgrid::smpi
index 0c41344..1612f14 100644 (file)
@@ -6,8 +6,7 @@
 #include "../colls_private.hpp"
 #include "smpi_status.hpp"
 
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 
 static int scatter_for_bcast(
     int root,
@@ -328,5 +327,4 @@ fn_exit:
   return mpi_errno;
 }
 
-}
-}
+} // namespace simgrid::smpi
index 3eb2a1b..e4ee3dc 100644 (file)
@@ -55,8 +55,7 @@ extern MV2_Gather_function_ptr MV2_Gather_intra_node_function;
 #define TEMP_BUF_HAS_NO_DATA (false)
 #define TEMP_BUF_HAS_DATA (true)
 
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 
 /* sendbuf           - (in) sender's buffer
  * sendcnt           - (in) sender's element count
@@ -394,6 +393,4 @@ int gather__mvapich2_two_level(const void *sendbuf,
 
     return (mpi_errno);
 }
-}
-}
-
+} // namespace simgrid::smpi
index 45dfc3a..6ee45a8 100644 (file)
@@ -22,8 +22,7 @@
 #include "../coll_tuned_topo.hpp"
 #include "../colls_private.hpp"
 
-namespace simgrid {
-namespace smpi {
+namespace simgrid::smpi {
 
 int gather__ompi_binomial(const void* sbuf, int scount, MPI_Datatype sdtype, void* rbuf, int rcount,
                           MPI_Datatype rdtype, int root, MPI_Comm comm)
@@ -409,5 +408,4 @@ int gather__ompi_basic_linear(const void* sbuf, int scount, MPI_Datatype sdtype,
     return MPI_SUCCESS;
 }
 
-}
-}
+} // namespace simgrid::smpi
index a0b2925..27eb434 100644 (file)
@@ -12,8 +12,7 @@ int reduce_NTSL_segment_size_in_byte = 8192;
 /* Non-topology-specific pipelined linear-bcast function
    0->1, 1->2 ,2->3, ....., ->last node : in a pipeline fashion
 */
-namespace simgrid {
-namespace smpi {
+namespace simgrid::smpi {
 int reduce__NTSL(const void *buf, void *rbuf, int count,
                  MPI_Datatype datatype, MPI_Op op, int root,
                  MPI_Comm comm)
@@ -140,5 +139,4 @@ int reduce__NTSL(const void *buf, void *rbuf, int count,
   smpi_free_tmp_buffer(tmp_buf);
   return MPI_SUCCESS;
 }
-}
-}
+} // namespace simgrid::smpi
index fbd52c6..e9d0282 100644 (file)
@@ -16,8 +16,7 @@ int reduce_arrival_pattern_aware_segment_size_in_byte = 8192;
 #ifndef MAX_NODE
 #define MAX_NODE 1024
 #endif
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 /* Non-topology-specific pipelined linear-reduce function */
 int reduce__arrival_pattern_aware(const void *buf, void *rbuf,
                                   int count,
@@ -340,5 +339,4 @@ int reduce__arrival_pattern_aware(const void *buf, void *rbuf,
 
   return MPI_SUCCESS;
 }
-}
-}
+} // namespace simgrid::smpi
index 80a4b66..b88575d 100644 (file)
@@ -8,8 +8,7 @@
 #include <algorithm>
 
 //#include <star-reduction.c>
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 int reduce__binomial(const void *sendbuf, void *recvbuf, int count,
                      MPI_Datatype datatype, MPI_Op op, int root,
                      MPI_Comm comm)
@@ -92,5 +91,4 @@ int reduce__binomial(const void *sendbuf, void *recvbuf, int count,
 
   return 0;
 }
-}
-}
+} // namespace simgrid::smpi
index 40d1df6..0dd1668 100644 (file)
@@ -6,8 +6,7 @@
 
 #include "../colls_private.hpp"
 //#include <star-reduction.c>
-namespace simgrid {
-namespace smpi {
+namespace simgrid::smpi {
 int reduce__flat_tree(const void *sbuf, void *rbuf, int count,
                      MPI_Datatype dtype, MPI_Op op,
                      int root, MPI_Comm comm)
@@ -64,5 +63,4 @@ int reduce__flat_tree(const void *sbuf, void *rbuf, int count,
   /* All done */
   return 0;
 }
-}
-}
+} // namespace simgrid::smpi
index 8c7f0ac..e875ede 100644 (file)
@@ -116,8 +116,7 @@ static int MPIR_Reduce_knomial_trace(int root, int reduce_knomial_factor,
     return 0;
 }
 
-namespace simgrid {
-namespace smpi {
+namespace simgrid::smpi {
 int reduce__mvapich2_knomial(
         const void *sendbuf,
         void *recvbuf,
@@ -224,5 +223,4 @@ int reduce__mvapich2_knomial(
 
     return mpi_errno;
 }
-}
-}
+} // namespace simgrid::smpi
index c99ec42..cf090d0 100644 (file)
@@ -73,8 +73,7 @@ static int (*reduce_fn)(const void *sendbuf,
                              int count,
                              MPI_Datatype datatype,
                              MPI_Op op, int root, MPI_Comm  comm);
-namespace simgrid {
-namespace smpi {
+namespace simgrid::smpi {
 int reduce__mvapich2_two_level( const void *sendbuf,
                                 void *recvbuf,
                                 int count,
@@ -295,5 +294,4 @@ int reduce__mvapich2_two_level( const void *sendbuf,
   fn_exit:
     return mpi_errno;
 }
-}
-}
+} // namespace simgrid::smpi
index 1a30e78..f1db121 100644 (file)
@@ -22,8 +22,7 @@
 #include "../coll_tuned_topo.hpp"
 #include "../colls_private.hpp"
 
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 
 int smpi_coll_tuned_ompi_reduce_generic(const void* sendbuf, void* recvbuf, int original_count,
                                     MPI_Datatype datatype, MPI_Op  op,
@@ -680,6 +679,4 @@ int reduce__ompi_basic_linear(const void *sbuf, void *rbuf, int count,
 
 /* copied function (with appropriate renaming) ends here */
 
-
-}
-}
+} // namespace simgrid::smpi
index 38f2f88..758cf32 100644 (file)
@@ -581,8 +581,7 @@ static void MPI_I_do_op(void* b1, void* b2, void* rslt, int cnt, MPIM_Datatype d
 }
 
 REDUCE_LIMITS
-namespace simgrid {
-namespace smpi {
+namespace simgrid::smpi {
 static int MPI_I_anyReduce(const void* Sendbuf, void* Recvbuf, int count, MPI_Datatype mpi_datatype, MPI_Op mpi_op,
                            int root, MPI_Comm comm, bool is_all)
 {
@@ -1024,5 +1023,4 @@ int allreduce__rab(const void* Sendbuf, void* Recvbuf, int count, MPI_Datatype d
 {
   return MPI_I_anyReduce(Sendbuf, Recvbuf, count, datatype, op, -1, comm, true);
 }
-}
-}
+} // namespace simgrid::smpi
index 5c7a9d0..40242f3 100644 (file)
@@ -10,8 +10,7 @@
   reduce
   Author: MPICH
  */
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 int reduce__scatter_gather(const void *sendbuf, void *recvbuf,
                            int count, MPI_Datatype datatype,
                            MPI_Op op, int root, MPI_Comm comm)
@@ -395,5 +394,4 @@ int reduce__scatter_gather(const void *sendbuf, void *recvbuf,
 
   return 0;
 }
-}
-}
+} // namespace simgrid::smpi
index 3e3278a..f2607b9 100644 (file)
@@ -21,8 +21,7 @@ static inline int MPIU_Mirror_permutation(unsigned int x, int bits)
 
     return retval;
 }
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 
 int reduce_scatter__mpich_pair(const void *sendbuf, void *recvbuf, const int recvcounts[],
                                MPI_Datatype datatype, MPI_Op op, MPI_Comm comm)
@@ -482,7 +481,5 @@ int reduce_scatter__mpich_rdb(const void *sendbuf, void *recvbuf, const int recv
     smpi_free_tmp_buffer(tmp_recvbuf);
     smpi_free_tmp_buffer(tmp_results);
     return MPI_SUCCESS;
-        }
-}
 }
-
+} // namespace simgrid::smpi
index 6398ff3..bd651f4 100644 (file)
@@ -41,8 +41,7 @@
  *  Returns:    - MPI_SUCCESS or error code
  *  Limitation: - Works only for commutative operations.
  */
-namespace simgrid {
-namespace smpi {
+namespace simgrid::smpi {
 int reduce_scatter__ompi_basic_recursivehalving(const void *sbuf,
                                                 void *rbuf,
                                                 const int *rcounts,
@@ -803,5 +802,4 @@ cleanup_and_return:
         free(tmpbuf[1]);
     return err;
 }
-}
-}
+} // namespace simgrid::smpi
index 02bb56d..901d14e 100644 (file)
@@ -43,8 +43,7 @@ extern int (*MV2_Scatter_intra_function) (const void *sendbuf, int sendcount, MP
     void *recvbuf, int recvcount, MPI_Datatype recvtype,
     int root, MPI_Comm comm);
 
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 
 int scatter__mvapich2_two_level_direct(const void *sendbuf,
                                        int sendcnt,
@@ -401,6 +400,4 @@ int scatter__mvapich2_two_level_binomial(const void *sendbuf,
     return (mpi_errno);
 }
 
-}
-}
-
+} // namespace simgrid::smpi
index 67984b0..db47ef7 100644 (file)
@@ -22,8 +22,7 @@
 #include "../coll_tuned_topo.hpp"
 #include "../colls_private.hpp"
 
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 
 int scatter__ompi_binomial(const void* sbuf, int scount, MPI_Datatype sdtype, void* rbuf, int rcount,
                            MPI_Datatype rdtype, int root, MPI_Comm comm)
@@ -324,5 +323,4 @@ err_hndl:
     return err;
 }
 
-}
-}
+} // namespace simgrid::smpi
index b7efd1a..01c108c 100644 (file)
@@ -63,8 +63,7 @@
     return (min_coll != -1) ? MPI_SUCCESS : MPI_ERR_INTERN;                                                            \
   }
 
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 
 COLL_APPLY(AUTOMATIC_COLL_BENCH, COLL_ALLGATHERV_SIG, (send_buff, send_count, send_type, recv_buff, recv_count, recv_disps, recv_type, comm))
 COLL_APPLY(AUTOMATIC_COLL_BENCH, COLL_ALLREDUCE_SIG, (sbuf, rbuf, rcount, dtype, op, comm))
@@ -78,5 +77,4 @@ COLL_APPLY(AUTOMATIC_COLL_BENCH, COLL_REDUCE_SCATTER_SIG ,(sbuf,rbuf, rcounts,dt
 COLL_APPLY(AUTOMATIC_COLL_BENCH, COLL_SCATTER_SIG ,(sendbuf, sendcount, sendtype,recvbuf, recvcount, recvtype,root, comm))
 COLL_APPLY(AUTOMATIC_COLL_BENCH, COLL_BARRIER_SIG,(comm))
 
-}
-}
+} // namespace simgrid::smpi
index c8c322e..3d704cd 100644 (file)
@@ -17,8 +17,7 @@
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_coll, smpi, "Logging specific to SMPI collectives.");
 
-namespace simgrid {
-namespace smpi {
+namespace simgrid::smpi {
 
 std::map<std::string, std::vector<s_mpi_coll_description_t>, std::less<>> smpi_coll_descriptions(
     {{std::string("gather"),
@@ -482,5 +481,4 @@ int colls::alltoallw(const void* sendbuf, const int* sendcounts, const int* send
   return Request::wait(&request, MPI_STATUS_IGNORE);
 }
 
-}
-}
+} // namespace simgrid::smpi
index c16593c..efea3a1 100644 (file)
@@ -8,8 +8,7 @@
 #include "colls_private.hpp"
 #include "src/smpi/include/smpi_actor.hpp"
 
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 
 int bcast__default(void *buf, int count, MPI_Datatype datatype, int root, MPI_Comm comm)
 {
@@ -131,6 +130,4 @@ int alltoallv__default(const void *sendbuf, const int *sendcounts, const int *se
   return Request::wait(&request, MPI_STATUS_IGNORE);
 }
 
-}
-}
-
+} // namespace simgrid::smpi
index 86e0508..fd4b879 100644 (file)
@@ -47,8 +47,7 @@ MPI_Allreduce
   as Shumilin's ring algorithm is unknown, default to ring'
 */
 
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 
 int (*intel_allreduce_functions_table[])(const void *sendbuf,
       void *recvbuf,
@@ -2302,5 +2301,4 @@ COLL_APPLY(IMPI_COLL_SELECT, COLL_REDUCE_SCATTER_SIG ,(sbuf,rbuf, rcounts,dtype,
 COLL_APPLY(IMPI_COLL_SELECT, COLL_SCATTER_SIG ,(sendbuf, sendcount, sendtype,recvbuf, recvcount, recvtype,root, comm))
 COLL_APPLY(IMPI_COLL_SELECT, COLL_BARRIER_SIG,(comm))
 
-}
-}
+} // namespace simgrid::smpi
index 16f01f0..4a3a6ae 100644 (file)
@@ -58,8 +58,7 @@
 
    End Algorithm: MPI_Allreduce
 */
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 int allreduce__mpich(const void *sbuf, void *rbuf, int count,
                         MPI_Datatype dtype, MPI_Op op, MPI_Comm comm)
 {
@@ -704,6 +703,4 @@ int scatter__mpich(const void *sbuf, int scount,
   }
   return scatter__ompi_binomial(sbuf, scount, sdtype, rbuf, rcount, rdtype, root, comm);
 }
-}
-}
-
+} // namespace simgrid::smpi
index 5c2524f..c79a308 100644 (file)
@@ -10,9 +10,7 @@
 
 #include "smpi_mvapich2_selector_stampede.hpp"
 
-namespace simgrid {
-namespace smpi {
-
+namespace simgrid::smpi {
 
 int alltoall__mvapich2( const void *sendbuf, int sendcount,
                         MPI_Datatype sendtype,
@@ -974,8 +972,7 @@ int scatter__mvapich2(const void *sendbuf,
   return (mpi_errno);
 }
 
-}
-}
+} // namespace simgrid::smpi
 
 void smpi_coll_cleanup_mvapich2()
 {
index 4996a96..cd893b0 100644 (file)
@@ -8,8 +8,7 @@
 #include "colls_private.hpp"
 #include "src/smpi/include/smpi_actor.hpp"
 
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 
 int colls::ibarrier(MPI_Comm comm, MPI_Request* request, int external)
 {
@@ -550,5 +549,4 @@ int colls::ireduce_scatter(const void* sendbuf, void* recvbuf, const int* recvco
   return MPI_SUCCESS;
 }
 
-}
-}
+} // namespace simgrid::smpi
index d030955..404cbfa 100644 (file)
@@ -11,8 +11,7 @@
 
 #include <memory>
 
-namespace simgrid {
-namespace smpi {
+namespace simgrid::smpi {
 
 int allreduce__ompi(const void *sbuf, void *rbuf, int count,
                     MPI_Datatype dtype, MPI_Op op, MPI_Comm comm)
@@ -1336,5 +1335,4 @@ int scatter__ompi(const void *sbuf, int scount,
     return funcs[alg-1](sbuf, scount, sdtype, rbuf, rcount, rdtype, root, comm);
 }
 
-}
-}
+} // namespace simgrid::smpi
index c2d324a..5879ef6 100644 (file)
@@ -12,8 +12,7 @@
 #include "xbt/xbt_os_time.h"
 #include <string_view>
 
-namespace simgrid {
-namespace smpi {
+namespace simgrid::smpi {
 
 class ActorExt {
   double simulated_ = 0 /* Used to time with simulated_start/elapsed */;
@@ -95,7 +94,6 @@ public:
   int set_bsend_buffer(void* buf, int size);
 };
 
-} // namespace smpi
-} // namespace simgrid
+} // namespace simgrid::smpi
 
 #endif
index 963de8a..06e66e4 100644 (file)
@@ -46,8 +46,7 @@
 #define COLL_BARRIER_SIG barrier, int,                                                                                 \
     (MPI_Comm comm)
 
-namespace simgrid {
-namespace smpi {
+namespace simgrid::smpi {
 
 struct s_mpi_coll_description_t {
   std::string name;
@@ -337,6 +336,5 @@ int barrier__mvapich2 (MPI_Comm comm);
 int barrier__impi(MPI_Comm comm);
 int barrier__automatic(MPI_Comm comm);
 
-}
-}
+} // namespace simgrid::smpi
 #endif
index dee8666..1ba249e 100644 (file)
@@ -15,8 +15,7 @@
 #include "smpi_topo.hpp"
 #include "smpi_config.hpp"
 
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 
 class Comm : public F2C, public Keyval{
   friend Topo;
@@ -103,7 +102,6 @@ public:
   void increment_collectives_count();
 };
 
-} // namespace smpi
-} // namespace simgrid
+} // namespace simgrid::smpi
 
 #endif
index 5f67115..a2e404e 100644 (file)
@@ -82,8 +82,7 @@ struct integer128_t {
   int64_t index;
 };
 
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 class Datatype_contents {
   public:
   int combiner_;
@@ -179,7 +178,6 @@ public:
   static Datatype* f2c(int id);
 };
 
-}
-}
+} // namespace simgrid::smpi
 
 #endif
index 64d02b5..cd7a9e0 100644 (file)
@@ -9,8 +9,7 @@
 
 #include "smpi_datatype.hpp"
 
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 
 class Type_Contiguous: public Datatype {
   int block_count_;
@@ -93,7 +92,6 @@ public:
   void unserialize(const void* contiguous_vector, void* noncontiguous_vector, int count, MPI_Op op) override;
 };
 
-} // namespace smpi
-} // namespace simgrid
+} // namespace simgrid::smpi
 
 #endif
index f3be169..c401849 100644 (file)
@@ -9,9 +9,7 @@
 #include "smpi_f2c.hpp"
 #include <smpi/smpi.h>
 
-
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 
 class Errhandler: public F2C {
   private:
@@ -32,7 +30,6 @@ class Errhandler: public F2C {
   static void unref(Errhandler* errhandler);
   static Errhandler* f2c(int id);
 };
-}
-}
+} // namespace simgrid::smpi
 
 #endif
index 3433712..5b10ba7 100644 (file)
@@ -13,8 +13,7 @@
 #include <unordered_map>
 #include <string>
 
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 
 class F2C {
 private:
@@ -59,7 +58,6 @@ public:
   const std::string& call_location() const { return call_location_; }
 };
 
-}
-}
+} // namespace simgrid::smpi
 
 #endif
index efda1cd..b79164b 100644 (file)
@@ -16,8 +16,7 @@
 
 XBT_LOG_EXTERNAL_CATEGORY(smpi_pmpi);
 
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 class File : public F2C{
   MPI_Comm comm_;
   int flags_;
@@ -194,7 +193,6 @@ int File::op_all(void* buf, int count, const Datatype* datatype, MPI_Status* sta
   smpi_free_tmp_buffer(sendbuf);
   return MPI_SUCCESS;
 }
-}
-}
+} // namespace simgrid::smpi
 
 #endif
index 1cec217..aed599b 100644 (file)
@@ -12,8 +12,7 @@
 #include <map>
 #include <vector>
 
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 
 class Group : public F2C{
   /* This is actually a map from int to aid_t. We could use std::map here, but looking up a value there costs
@@ -50,7 +49,6 @@ public:
 
   static Group* f2c(int id);
 };
-}
-}
+} // namespace simgrid::smpi
 
 #endif
index e398448..d75aa0f 100644 (file)
@@ -13,8 +13,7 @@
 #include <vector>
 #include <xbt/Extendable.hpp>
 
-namespace simgrid {
-namespace smpi {
+namespace simgrid::smpi {
 
 class Host {
   std::vector<s_smpi_factor_t> orecv_parsed_values;
@@ -37,6 +36,5 @@ public:
   double oisend(size_t size, s4u::Host* src, s4u::Host* dst);
 };
 
-}
-}
+} // namespace simgrid::smpi
 #endif
index c9f789f..d406801 100644 (file)
@@ -12,8 +12,7 @@
 #include <string>
 #include <map>
 
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 
 class Info : public F2C{
   std::map<std::string, std::string, std::less<>> map_;
@@ -34,7 +33,6 @@ public:
   static Info* f2c(int id);
 };
 
-}
-}
+} // namespace simgrid::smpi
 
 #endif
index 4c00298..a4a0305 100644 (file)
@@ -38,8 +38,7 @@ struct smpi_key_elem {
   bool delete_attr; // if true, xbt_free(attr) on delete: used by Fortran bindings
 };
 
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 
 class Keyval{
   private:
@@ -163,7 +162,6 @@ template <typename T> void Keyval::cleanup_attr(){
   attributes().clear();
 }
 
-}
-}
+} // namespace simgrid::smpi
 
 #endif
index 66a561d..c8573db 100644 (file)
@@ -9,8 +9,7 @@
 
 #include "smpi_info.hpp"
 
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 
 class Op : public F2C{
   MPI_User_function* func_;
@@ -41,7 +40,6 @@ public:
   static void unref(MPI_Op* op);
 };
 
-}
-}
+} // namespace simgrid::smpi
 
 #endif
index d17d5fb..1f00a19 100644 (file)
@@ -35,9 +35,7 @@ XBT_PRIVATE unsigned char* smpi_get_tmp_recvbuffer(size_t size);
 
 XBT_PRIVATE void log_timed_action(const simgrid::xbt::ReplayAction& action, double clock);
 
-namespace simgrid {
-namespace smpi {
-namespace replay {
+namespace simgrid::smpi::replay {
 extern MPI_Datatype MPI_DEFAULT_TYPE;
 
 class RequestStorage; // Forward decl
@@ -356,8 +354,6 @@ public:
   void kernel(xbt::ReplayAction& action) override;
 };
 
-} // namespace replay
-} // namespace smpi
-} // namespace simgrid
+} // namespace simgrid::smpi::replay
 
 #endif
index a91b6ab..d63ed7b 100644 (file)
@@ -11,8 +11,7 @@
 
 #include <memory>
 
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 
 struct smpi_mpi_generalized_request_funcs_t {
   MPI_Grequest_query_function *query_fn;
@@ -129,8 +128,6 @@ public:
   static Request* f2c(int);
 };
 
-
-}
-}
+} // namespace simgrid::smpi
 
 #endif
index a6e2160..2544698 100644 (file)
@@ -9,8 +9,7 @@
 
 #include "smpi/smpi.h"
 
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 
 //Status has to stay in C, as its fields are public.
 //So status class only defines static methods to handle the C struct.
@@ -23,7 +22,5 @@ static void set_elements(MPI_Status* status, const Datatype*, int count);
 static int get_count(const MPI_Status* status, const Datatype* datatype);
 };
 
-
-}
-}
+} // namespace simgrid::smpi
 #endif
index cdce35a..0f5ff72 100644 (file)
@@ -12,8 +12,7 @@
 
 using MPI_Topology = std::shared_ptr<SMPI_Topology>;
 
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 
 class Topo {
   MPI_Comm comm_ = MPI_COMM_NULL;
@@ -56,8 +55,6 @@ class Topo_Dist_Graph: public Topo {
   std::vector<int> out_weights_;
 };
 
-}
-}
-
+} // namespace simgrid::smpi
 
 #endif
index ad70252..99ff9c7 100644 (file)
@@ -21,9 +21,7 @@ struct s_smpi_factor_t {
   std::vector<double> values;
 };
 
-namespace simgrid {
-namespace smpi {
-namespace utils {
+namespace simgrid::smpi::utils {
 
 XBT_PUBLIC std::vector<s_smpi_factor_t> parse_factor(const std::string& smpi_coef_string);
 XBT_PUBLIC void add_benched_time(double time);
@@ -39,7 +37,5 @@ XBT_PUBLIC size_t get_buffer_size(const void* ptr);
 XBT_PUBLIC void account_free(const void* ptr);
 XBT_PUBLIC int check_collectives_ordering(MPI_Comm comm, const std::string& call);
 
-} // namespace utils
-} // namespace smpi
-} // namespace simgrid
+} // namespace simgrid::smpi::utils
 #endif
index 339b3c2..ea8b9c4 100644 (file)
@@ -16,8 +16,7 @@
 #include <vector>
 #include <list>
 
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 
 class Win : public F2C, public Keyval {
   void* base_;
@@ -102,8 +101,6 @@ public:
   void set_errhandler( MPI_Errhandler errhandler);
 };
 
-
-}
-}
+} // namespace simgrid::smpi
 
 #endif
index 389adc4..e513fab 100644 (file)
@@ -18,8 +18,7 @@
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_process, smpi, "Logging specific to SMPI (kernel)");
 
-namespace simgrid {
-namespace smpi {
+namespace simgrid::smpi {
 simgrid::xbt::Extension<simgrid::s4u::Actor, ActorExt> ActorExt::EXTENSION_ID;
 
 ActorExt::ActorExt(s4u::Actor* actor) : actor_(actor)
@@ -273,5 +272,4 @@ int ActorExt::set_bsend_buffer(void* buf, int size)
   return MPI_SUCCESS;
 }
 
-} // namespace smpi
-} // namespace simgrid
+} // namespace simgrid::smpi
index 18abaa6..abc235f 100644 (file)
@@ -13,9 +13,7 @@
 
 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(smpi);
 
-namespace simgrid {
-namespace smpi {
-namespace app {
+namespace simgrid::smpi::app {
 
 static int universe_size = 0;
 
@@ -33,9 +31,7 @@ public:
   unsigned int finalized_ranks_ = 0;
   MPI_Comm comm_world_;
 };
-}
-}
-}
+} // namespace simgrid::smpi::app
 
 using simgrid::smpi::app::Instance;
 
index bef0db3..d8daf0d 100644 (file)
@@ -29,8 +29,7 @@ void smpi_cleanup_op_cost_callback()
   cost_cbs.clear();
 }
 
-namespace simgrid {
-namespace smpi {
+namespace simgrid::smpi {
 
 xbt::Extension<s4u::Host, smpi::Host> Host::EXTENSION_ID;
 
@@ -155,5 +154,4 @@ Host::Host(s4u::Host* ptr) : host(ptr)
   }
 }
 
-} // namespace smpi
-} // namespace simgrid
+} // namespace simgrid::smpi
index 803906f..218f14d 100644 (file)
@@ -97,10 +97,7 @@ static MPI_Datatype parse_datatype(const simgrid::xbt::ReplayAction& action, uns
   return i < action.size() ? simgrid::smpi::Datatype::decode(action[i]) : simgrid::smpi::replay::MPI_DEFAULT_TYPE;
 }
 
-namespace simgrid {
-namespace smpi {
-
-namespace replay {
+namespace simgrid::smpi::replay {
 MPI_Datatype MPI_DEFAULT_TYPE;
 
 class RequestStorage {
@@ -801,8 +798,7 @@ void AllToAllVAction::kernel(simgrid::xbt::ReplayAction&)
 
   TRACE_smpi_comm_out(get_pid());
 }
-} // Replay Namespace
-}} // namespace simgrid::smpi
+} // namespace simgrid::smpi::replay
 
 static std::unordered_map<aid_t, simgrid::smpi::replay::RequestStorage> storage;
 /** @brief Only initialize the replay, don't do it for real */
index 61974bd..967e729 100644 (file)
@@ -22,9 +22,7 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_utils, smpi, "Logging specific to SMPI (uti
 extern std::string surf_parsed_filename;
 extern int surf_parse_lineno;
 
-namespace simgrid {
-namespace smpi {
-namespace utils {
+namespace simgrid::smpi::utils {
 
 double total_benched_time=0;
 unsigned long total_malloc_size=0;
@@ -367,6 +365,4 @@ int check_collectives_ordering(MPI_Comm comm, const std::string& call)
   }
   return MPI_SUCCESS;
 }
-}
-}
-} // namespace simgrid
+} // namespace simgrid::smpi::utils
index 117f08f..2aab0ff 100644 (file)
@@ -33,8 +33,7 @@ MPI_Comm MPI_COMM_WORLD = MPI_COMM_UNINITIALIZED;
 /* Support for cartesian topology was added, but there are 2 other types of topology, graph et dist graph. In order to
  * support them, we have to add a field SMPI_Topo_type, and replace the MPI_Topology field by an union. */
 
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 
 std::unordered_map<int, smpi_key_elem> Comm::keyvals_;
 int Comm::keyval_id_=0;
@@ -676,5 +675,4 @@ void Comm::increment_collectives_count()
   }
 }
 
-} // namespace smpi
-} // namespace simgrid
+} // namespace simgrid::smpi
index 3be3ace..e2b8640 100644 (file)
@@ -104,9 +104,7 @@ CREATE_MPI_DATATYPE(PTR, 58, void*, DT_FLAG_PREDEFINED)
 CREATE_MPI_DATATYPE(COUNT, 59, long long, DT_FLAG_MULTILANG)
 MPI_Datatype MPI_PTR = &smpi_MPI_PTR;
 
-
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 
 std::unordered_map<int, smpi_key_elem> Datatype::keyvals_; // required by the Keyval class implementation
 int Datatype::keyval_id_=0; // required by the Keyval class implementation
@@ -654,5 +652,4 @@ Datatype* Datatype::f2c(int id)
   return static_cast<Datatype*>(F2C::f2c(id));
 }
 
-} // namespace smpi
-} // namespace simgrid
+} // namespace simgrid::smpi
index 0a98959..3e3b379 100644 (file)
@@ -11,8 +11,7 @@
 #include <array>
 #include <cstring>
 
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 
 Datatype_contents::Datatype_contents(int combiner, int number_of_integers, const int* integers, int number_of_addresses,
                                      const MPI_Aint* addresses, int number_of_datatypes, const MPI_Datatype* datatypes)
@@ -335,5 +334,4 @@ void Type_Struct::unserialize(const void* contiguous_buf, void *noncontiguous_bu
   }
 }
 
-}
-}
+} // namespace simgrid::smpi
index e795736..300a0b2 100644 (file)
@@ -11,8 +11,7 @@
 simgrid::smpi::Errhandler smpi_MPI_ERRORS_RETURN;
 simgrid::smpi::Errhandler smpi_MPI_ERRORS_ARE_FATAL;
 
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 
 MPI_Errhandler Errhandler::f2c(int id) {
   if (F2C::lookup() != nullptr && id >= 0) {
@@ -52,6 +51,4 @@ void Errhandler::unref(Errhandler* errhandler){
   }
 }
 
-}
-
-}
+} // namespace simgrid::smpi
index 746a3b4..ab1da74 100644 (file)
@@ -13,8 +13,7 @@ int mpi_bottom_;
 int mpi_status_ignore_;
 int mpi_statuses_ignore_;
 
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 
 std::unique_ptr<F2C::f2c_lookup_type> F2C::f2c_lookup_    = nullptr;
 int F2C::f2c_id_ = 0;
@@ -56,5 +55,4 @@ F2C* F2C::f2c(int id)
     return nullptr;
 }
 
-}
-}
+} // namespace simgrid::smpi
index 38dbf19..c6a65c8 100644 (file)
@@ -23,8 +23,7 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_io, smpi, "Logging specific to SMPI (RMA op
 
 MPI_Errhandler SMPI_default_File_Errhandler =  _smpi_cfg_default_errhandler_is_error ? MPI_ERRORS_ARE_FATAL : MPI_ERRORS_RETURN;;
 
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 
 File::File(MPI_Comm comm, const char* filename, int amode, MPI_Info info) : comm_(comm), flags_(amode), info_(info)
 {
@@ -345,5 +344,4 @@ File* File::f2c(int id)
 {
   return static_cast<File*>(F2C::f2c(id));
 }
-} // namespace smpi
-} // namespace simgrid
+} // namespace simgrid::smpi
index 86a3403..1c3b813 100644 (file)
@@ -10,8 +10,7 @@
 
 simgrid::smpi::Group smpi_MPI_GROUP_EMPTY;
 
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 
 Group::Group(const Group* origin)
 {
@@ -214,5 +213,4 @@ MPI_Group Group::f2c(int id) {
   }
 }
 
-}
-}
+} // namespace simgrid::smpi
index dfcc335..31f157a 100644 (file)
@@ -7,8 +7,7 @@
 #include "smpi_comm.hpp"
 #include "simgrid/Exception.hpp"
 
-namespace simgrid {
-namespace smpi {
+namespace simgrid::smpi {
 
 Info::Info(const Info* orig)
 {
@@ -84,5 +83,4 @@ Info* Info::f2c(int id){
   return static_cast<Info*>(F2C::f2c(id));
 }
 
-}
-}
+} // namespace simgrid::smpi
index 2fd3fd0..5abfecc 100644 (file)
@@ -7,8 +7,7 @@
 #include "smpi_keyvals.hpp"
 #include "xbt/sysdep.h"
 
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 
 template <> int Keyval::call_deleter<Comm>(Comm* obj, const smpi_key_elem& elem, int keyval, void* value, int* /*flag*/)
 {
@@ -47,5 +46,4 @@ int Keyval::call_deleter<Datatype>(Datatype* obj, const smpi_key_elem& elem, int
   return ret;
 }
 
-}
-}
+} // namespace simgrid::smpi
index d2e9c50..0daff56 100644 (file)
@@ -260,8 +260,7 @@ CREATE_MPI_OP(MINLOC, minloc_func, DT_FLAG_REDUCTION)
 CREATE_MPI_OP(REPLACE, replace_func, 0)
 CREATE_MPI_OP(NO_OP, no_func, 0)
 
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 
 void Op::apply(const void* invec, void* inoutvec, const int* len, MPI_Datatype datatype) const
 {
@@ -299,5 +298,4 @@ void Op::unref(MPI_Op* op){
   }
 }
 
-}
-}
+} // namespace simgrid::smpi
index e52317b..0ceb1a3 100644 (file)
@@ -36,8 +36,7 @@ std::vector<s_smpi_factor_t> smpi_ois_values;
 
 extern std::function<void(simgrid::kernel::activity::CommImpl*, void*, size_t)> smpi_comm_copy_data_callback;
 
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 
 Request::Request(const void* buf, int count, MPI_Datatype datatype, aid_t src, aid_t dst, int tag, MPI_Comm comm,
                  unsigned flags, MPI_Op op)
@@ -1355,5 +1354,4 @@ std::vector<MPI_Request> Request::get_nbc_requests() const
 {
   return nbc_requests_;
 }
-}
-}
+} // namespace simgrid::smpi
index 0c3a110..9c6b765 100644 (file)
@@ -7,8 +7,7 @@
 #include "private.hpp"
 #include "smpi_datatype.hpp"
 
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 
 void Status::empty(MPI_Status * status)
 {
@@ -41,5 +40,4 @@ int Status::get_count(const MPI_Status* status, const Datatype* datatype)
   return status->count / datatype->size();
 }
 
-}
-}
+} // namespace simgrid::smpi
index 750f020..12ca7ec 100644 (file)
@@ -16,8 +16,7 @@
 static int assignnodes(int ndim, const std::vector<int>& factors, std::vector<int>& dims);
 static int getfactors(int num, std::vector<int>& factors);
 
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 
 void Topo::setComm(MPI_Comm comm)
 {
@@ -320,8 +319,7 @@ int Topo_Cart::Dims_create(int nnodes, int ndims, int dims[])
   return MPI_SUCCESS;
 }
 
-}
-}
+} // namespace simgrid::smpi
 
 /*
  *  assignnodes
index 8eb022d..c78dc3c 100644 (file)
@@ -35,8 +35,7 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_rma, smpi, "Logging specific to SMPI (RMA o
       return MPI_ERR_WIN;                                                                                              \
   }
 
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 std::unordered_map<int, smpi_key_elem> Win::keyvals_;
 int Win::keyval_id_=0;
 
@@ -684,5 +683,4 @@ void Win::set_errhandler(MPI_Errhandler errhandler)
   if (errhandler_ != MPI_ERRHANDLER_NULL)
     errhandler_->ref();
 }
-} // namespace smpi
-} // namespace simgrid
+} // namespace simgrid::smpi
index 78477dc..35c981a 100644 (file)
@@ -80,16 +80,10 @@ extern "C" void* _sampi_realloc(void* ptr, size_t size)
   return result;
 }
 
-namespace simgrid {
-namespace smpi {
-namespace plugin {
-namespace ampi {
+namespace simgrid::smpi::plugin::ampi {
 xbt::signal<void(s4u::Actor const&)> on_iteration_in;
 xbt::signal<void(s4u::Actor const&)> on_iteration_out;
-} // namespace ampi
-} // namespace plugin
-} // namespace smpi
-} // namespace simgrid
+} // namespace simgrid::smpi::plugin::ampi
 
 /* FIXME The following contains several times "rank() + 1". This works for one
  * instance, but we need to find a way to deal with this for several instances and
index 5578556..1923d73 100644 (file)
@@ -8,15 +8,9 @@
 
 #include <simgrid/s4u.hpp>
 
-namespace simgrid {
-namespace smpi {
-namespace plugin {
-namespace ampi {
+namespace simgrid::smpi::plugin::ampi {
 extern xbt::signal<void(s4u::Actor const&)> on_iteration_out;
 extern xbt::signal<void(s4u::Actor const&)> on_iteration_in;
-} // namespace ampi
-} // namespace plugin
-} // namespace smpi
-} // namespace simgrid
+} // namespace simgrid::smpi::plugin::ampi
 
 #endif
index 51f7f98..5e7d0da 100644 (file)
@@ -18,9 +18,7 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(res_host, ker_resource, "Host resources agregate
  * Callbacks *t
  *************/
 
-namespace simgrid {
-namespace kernel {
-namespace resource {
+namespace simgrid::kernel::resource {
 
 /*********
  * Model *
@@ -240,6 +238,4 @@ void HostImpl::seal()
   for (auto const& [_, vm] : vms_)
     vm->seal();
 }
-} // namespace resource
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::resource
index d82906d..610068b 100644 (file)
@@ -13,9 +13,7 @@
 
 #include <vector>
 
-namespace simgrid {
-namespace kernel {
-namespace resource {
+namespace simgrid::kernel::resource {
 /*********
  * Model *
  *********/
@@ -104,8 +102,6 @@ public:
       function(actor);
   }
 };
-} // namespace resource
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::resource
 
 #endif /* HOST_INTERFACE_HPP */
index b2710f5..8112b6a 100644 (file)
@@ -53,9 +53,7 @@ void surf_cpu_model_init_Cas01()
   engine->get_netzone_root()->set_cpu_pm_model(cpu_model_pm);
 }
 
-namespace simgrid {
-namespace kernel {
-namespace resource {
+namespace simgrid::kernel::resource {
 
 CpuCas01Model::CpuCas01Model(const std::string& name) : CpuModel(name)
 {
@@ -205,6 +203,4 @@ CpuCas01Action::CpuCas01Action(Model* model, double cost, bool failed, double sp
   model->get_maxmin_system()->expand(constraint, get_variable(), 1.0);
 }
 
-} // namespace resource
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::resource
index ec8de09..94ab188 100644 (file)
@@ -9,9 +9,7 @@
 #include "src/kernel/resource/CpuImpl.hpp"
 #include "xbt/base.h"
 
-namespace simgrid {
-namespace kernel {
-namespace resource {
+namespace simgrid::kernel::resource {
 
 /***********
  * Classes *
@@ -68,8 +66,6 @@ public:
   int requested_core() const { return requested_core_; }
 };
 
-} // namespace resource
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::resource
 
 #endif
index d5f2153..6f1121b 100644 (file)
@@ -19,9 +19,7 @@ constexpr double EPSILON = 0.000000001;
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(cpu_ti, res_cpu, "CPU resource, Trace Integration model");
 
-namespace simgrid {
-namespace kernel {
-namespace resource {
+namespace simgrid::kernel::resource {
 
 /*********
  * Trace *
@@ -619,6 +617,4 @@ double CpuTiAction::get_remains()
   return get_remains_no_update();
 }
 
-} // namespace resource
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::resource
index 16dcd5f..c1c72bb 100644 (file)
@@ -11,9 +11,7 @@
 #include <boost/intrusive/list.hpp>
 #include <memory>
 
-namespace simgrid {
-namespace kernel {
-namespace resource {
+namespace simgrid::kernel::resource {
 
 /***********
  * Classes *
@@ -152,8 +150,6 @@ public:
   CpuTiList modified_cpus_;
 };
 
-} // namespace resource
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::resource
 
 #endif /* SURF_MODEL_CPUTI_HPP_ */
index d1df923..a6f894f 100644 (file)
@@ -27,9 +27,7 @@ void surf_disk_model_init_default()
   engine->get_netzone_root()->set_disk_model(disk_model);
 }
 
-namespace simgrid {
-namespace kernel {
-namespace resource {
+namespace simgrid::kernel::resource {
 
 DiskImpl* DiskS19Model::create_disk(const std::string& name, double read_bandwidth, double write_bandwidth)
 {
@@ -134,6 +132,4 @@ void DiskS19Action::update_remains_lazy(double /*now*/)
 {
   THROW_IMPOSSIBLE;
 }
-} // namespace resource
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::resource
index 414ca8b..a6413dd 100644 (file)
@@ -10,9 +10,7 @@
 #ifndef DISK_S19_HPP_
 #define DISK_S19_HPP_
 
-namespace simgrid {
-namespace kernel {
-namespace resource {
+namespace simgrid::kernel::resource {
 
 /***********
  * Classes *
@@ -59,7 +57,5 @@ public:
   void update_remains_lazy(double now) override;
 };
 
-} // namespace resource
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::resource
 #endif /* DISK_S19_HPP_ */
index 87e1ec3..0005ed4 100644 (file)
@@ -33,9 +33,7 @@ void surf_host_model_init_compound()
   engine->get_netzone_root()->set_host_model(host_model);
 }
 
-namespace simgrid {
-namespace kernel {
-namespace resource {
+namespace simgrid::kernel::resource {
 
 double HostCLM03Model::next_occurring_event(double /*now*/)
 {
@@ -102,6 +100,4 @@ Action* HostCLM03Model::execute_thread(const s4u::Host* host, double flops_amoun
   return cpu->execution_start(thread_count * flops_amount, thread_count, -1);
 }
 
-} // namespace resource
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::resource
index 7e1a81f..e972cb7 100644 (file)
@@ -12,9 +12,7 @@
  * Classes *
  ***********/
 
-namespace simgrid {
-namespace kernel {
-namespace resource {
+namespace simgrid::kernel::resource {
 
 class XBT_PRIVATE HostCLM03Model : public HostModel {
 public:
@@ -25,8 +23,6 @@ public:
   Action* execute_parallel(const std::vector<s4u::Host*>& host_list, const double* flops_amount,
                            const double* bytes_amount, double rate) override;
 };
-} // namespace resource
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::resource
 
 #endif /* HOST_CLM03_HPP_ */
index e981df7..c7f15ec 100644 (file)
@@ -79,9 +79,7 @@ void surf_network_model_init_CM02()
   engine->get_netzone_root()->set_network_model(net_model);
 }
 
-namespace simgrid {
-namespace kernel {
-namespace resource {
+namespace simgrid::kernel::resource {
 
 NetworkCm02Model::NetworkCm02Model(const std::string& name) : NetworkModel(name)
 {
@@ -580,6 +578,4 @@ void NetworkCm02Action::update_remains_lazy(double now)
   set_last_value(get_rate());
 }
 
-} // namespace resource
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::resource
index eb93747..2fb8af7 100644 (file)
@@ -17,9 +17,7 @@
  * Classes *
  ***********/
 
-namespace simgrid {
-namespace kernel {
-namespace resource {
+namespace simgrid::kernel::resource {
 
 class XBT_PRIVATE NetworkCm02Model;
 class XBT_PRIVATE NetworkCm02Action;
@@ -90,7 +88,5 @@ public:
   using NetworkAction::NetworkAction;
   void update_remains_lazy(double now) override;
 };
-} // namespace resource
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::resource
 #endif /* SURF_NETWORK_CM02_HPP_ */
index 4f6e486..c811874 100644 (file)
@@ -23,9 +23,7 @@ void surf_network_model_init_Constant()
   engine->get_netzone_root()->set_network_model(net_model);
 }
 
-namespace simgrid {
-namespace kernel {
-namespace resource {
+namespace simgrid::kernel::resource {
 
 StandardLinkImpl* NetworkConstantModel::create_link(const std::string& name, const std::vector<double>& /*bandwidth*/)
 {
@@ -94,6 +92,4 @@ void NetworkConstantAction::update_remains_lazy(double /*now*/)
   THROW_IMPOSSIBLE;
 }
 
-} // namespace resource
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::resource
index 5828d69..229043a 100644 (file)
@@ -8,9 +8,7 @@
 
 #include "src/kernel/resource/NetworkModel.hpp"
 
-namespace simgrid {
-namespace kernel {
-namespace resource {
+namespace simgrid::kernel::resource {
 
 class NetworkConstantModel : public NetworkModel {
 public:
@@ -29,8 +27,6 @@ public:
   void update_remains_lazy(double now) override;
 };
 
-} // namespace resource
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::resource
 
 #endif /* NETWORK_CONSTANT_HPP_ */
index a272167..0592a7d 100644 (file)
@@ -45,9 +45,7 @@ void surf_network_model_init_IB()
   simgrid::config::set_default<double>("network/weight-S", 8775);
 }
 
-namespace simgrid {
-namespace kernel {
-namespace resource {
+namespace simgrid::kernel::resource {
 
 void NetworkIBModel::IB_create_host_callback(s4u::Host const& host)
 {
@@ -205,6 +203,4 @@ void NetworkIBModel::update_IB_factors(NetworkAction* action, IBNode* from, IBNo
   update_IB_factors_rec(from, updated);
   XBT_DEBUG("IB - Finished updating %d", from->id_);
 }
-} // namespace resource
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::resource
index f130d1c..69b52fc 100644 (file)
@@ -13,9 +13,7 @@
 #include <map>
 #include <vector>
 
-namespace simgrid {
-namespace kernel {
-namespace resource {
+namespace simgrid::kernel::resource {
 
 class XBT_PRIVATE IBNode;
 
@@ -57,7 +55,5 @@ public:
   static void IB_action_state_changed_callback(NetworkAction& action, Action::State /*previous*/);
   static void IB_comm_start_callback(const activity::CommImpl& comm);
 };
-} // namespace resource
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::resource
 #endif
index 9255c7e..cdef260 100644 (file)
@@ -308,8 +308,7 @@ static simgrid::config::Flag<std::string> ns3_seed(
     });
 
 namespace simgrid {
-namespace kernel {
-namespace resource {
+namespace kernel::resource {
 
 NetworkNS3Model::NetworkNS3Model(const std::string& name) : NetworkModel(name)
 {
@@ -570,8 +569,7 @@ void NetworkNS3Action::update_remains_lazy(double /*now*/)
   THROW_IMPOSSIBLE;
 }
 
-} // namespace resource
-} // namespace kernel
+} // namespace kernel::resource
 
 ns3::Ptr<ns3::Node> get_ns3node_from_sghost(const simgrid::s4u::Host* host)
 {
index 275d45d..a0328a2 100644 (file)
@@ -11,9 +11,7 @@
 #include "src/kernel/resource/NetworkModel.hpp"
 #include "src/kernel/resource/StandardLinkImpl.hpp"
 
-namespace simgrid {
-namespace kernel {
-namespace resource {
+namespace simgrid ::kernel::resource {
 
 class NetworkNS3Model : public NetworkModel {
 public:
@@ -61,8 +59,6 @@ public:
   double last_sent_ = 0;
 };
 
-} // namespace resource
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::resource
 
 #endif /* NETWORK_NS3_HPP_ */
index 36c8a85..02d6a00 100644 (file)
@@ -39,9 +39,7 @@ void surf_network_model_init_SMPI()
   simgrid::config::set_default<double>("network/weight-S", 8775);
 }
 
-namespace simgrid {
-namespace kernel {
-namespace resource {
+namespace simgrid::kernel::resource {
 
 void NetworkSmpiModel::check_lat_factor_cb()
 {
@@ -96,6 +94,4 @@ double NetworkSmpiModel::get_latency_factor(double size)
 
   return current;
 }
-} // namespace resource
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::resource
index cba39f9..a2c81fd 100644 (file)
@@ -11,9 +11,7 @@
 
 #include "network_cm02.hpp"
 
-namespace simgrid {
-namespace kernel {
-namespace resource {
+namespace simgrid::kernel::resource {
 
 class XBT_PRIVATE NetworkSmpiModel : public NetworkCm02Model {
 public:
@@ -26,8 +24,6 @@ protected:
   void check_lat_factor_cb() override;
   void check_bw_factor_cb() override;
 };
-} // namespace resource
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::resource
 
 #endif
index 88eac8f..012f9ef 100644 (file)
@@ -43,9 +43,7 @@ void surf_host_model_init_ptask_L07()
   engine->get_netzone_root()->set_host_model(host_model);
 }
 
-namespace simgrid {
-namespace kernel {
-namespace resource {
+namespace simgrid::kernel::resource {
 
 HostL07Model::HostL07Model(const std::string& name, lmm::System* sys) : HostModel(name)
 {
@@ -446,6 +444,4 @@ void L07Action::updateBound()
   }
 }
 
-} // namespace resource
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::resource
index 9c0cbf2..0bb5a46 100644 (file)
@@ -12,9 +12,7 @@
 #ifndef HOST_L07_HPP_
 #define HOST_L07_HPP_
 
-namespace simgrid {
-namespace kernel {
-namespace resource {
+namespace simgrid::kernel::resource {
 
 /***********
  * Classes *
@@ -163,8 +161,6 @@ public:
   void update_latency(double delta, double precision) { double_update(&latency_, delta, precision); }
 };
 
-} // namespace resource
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::resource
 
 #endif /* HOST_L07_HPP_ */
index 57af0e9..f7f4837 100644 (file)
 
 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(surf_parse);
 
-namespace simgrid {
-namespace kernel {
-namespace routing {
+namespace simgrid::kernel::routing {
 xbt::signal<void(ClusterCreationArgs const&)> on_cluster_creation;
-} // namespace routing
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::routing
 
 static simgrid::kernel::routing::ClusterZoneCreationArgs
     zone_cluster; /* temporary store data for irregular clusters, created with <zone routing="Cluster"> */
index ebcf964..99b2dd1 100644 (file)
@@ -17,9 +17,7 @@
 #include <string>
 #include <vector>
 
-namespace simgrid {
-namespace kernel {
-namespace routing {
+namespace simgrid::kernel::routing {
 /* ***************************************** */
 /*
  * Platform creation functions. Instead of passing 123 arguments to the creation functions
@@ -170,9 +168,7 @@ public:
 
 extern XBT_PRIVATE xbt::signal<void(ClusterCreationArgs const&)> on_cluster_creation;
 
-} // namespace routing
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::routing
 
 /********** Routing **********/
 void routing_cluster_add_backbone(std::unique_ptr<simgrid::kernel::routing::LinkCreationArgs> link);
index b29a665..6582689 100644 (file)
@@ -8,8 +8,7 @@
 #include <condition_variable>
 #include <mutex>
 
-namespace simgrid {
-namespace xbt {
+namespace simgrid::xbt {
 class XBT_PUBLIC OsSemaphore {
 public:
   explicit inline OsSemaphore(unsigned int capa) : capa_(capa) {}
@@ -33,5 +32,4 @@ private:
   std::mutex mutex_;
   std::condition_variable condition_;
 };
-} // namespace xbt
-} // namespace simgrid
+} // namespace simgrid::xbt
index bb798c9..958daa6 100644 (file)
@@ -8,8 +8,7 @@
 #include <map>
 #include <memory>
 
-namespace simgrid {
-namespace xbt {
+namespace simgrid::xbt {
 
 /** @brief Return the property associated to the provided key (or nullptr if not existing) */
 const char* PropertyHolder::get_property(const std::string& key) const
@@ -53,5 +52,4 @@ template <class Assoc> void PropertyHolder::set_properties(const Assoc& properti
 template void PropertyHolder::set_properties(const std::map<std::string, std::string, std::less<>>& properties);
 template void PropertyHolder::set_properties(const std::unordered_map<std::string, std::string>& properties);
 
-} // namespace xbt
-} // namespace simgrid
+} // namespace simgrid::xbt
index e651243..bead658 100644 (file)
@@ -30,8 +30,7 @@ void xbt_backtrace_display_current()
   simgrid::xbt::Backtrace().display();
 }
 
-namespace simgrid {
-namespace xbt {
+namespace simgrid::xbt {
 
 class BacktraceImpl {
 #if HAVE_BOOST_STACKTRACE_BACKTRACE || HAVE_BOOST_STACKTRACE_ADDR2LINE
@@ -83,5 +82,4 @@ void Backtrace::display() const
                backtrace.empty() ? "(backtrace not set -- did you install Boost.Stacktrace?)" : backtrace.c_str());
 }
 
-} // namespace xbt
-} // namespace simgrid
+} // namespace simgrid::xbt
index 08b403b..64c5b99 100644 (file)
@@ -31,8 +31,7 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(xbt_cfg, xbt, "configuration support");
 
 XBT_EXPORT_NO_IMPORT xbt_cfg_t simgrid_config = nullptr;
 
-namespace simgrid {
-namespace config {
+namespace simgrid::config {
 
 namespace {
 
@@ -448,8 +447,7 @@ void help()
 {
   simgrid_config->help();
 }
-}
-}
+} // namespace simgrid::config
 
 /*----[ Setting ]---------------------------------------------------------*/
 
index bf5caf1..28d1c34 100644 (file)
@@ -24,8 +24,7 @@ void _xbt_throw(char* message, const char* file, int line, const char* func)
   throw e;
 }
 
-namespace simgrid {
-namespace xbt {
+namespace simgrid::xbt {
 
 ImpossibleError::~ImpossibleError()         = default;
 InitializationError::~InitializationError() = default;
@@ -129,8 +128,7 @@ void install_exception_handler()
   });
 }
 
-} // namespace xbt
-} // namespace simgrid
+} // namespace simgrid::xbt
 
 void xbt_throw_impossible(const char* file, int line, const char* func)
 {
index b54dce6..90e5c5f 100644 (file)
@@ -65,8 +65,7 @@
   } else                                                                                                               \
     ((void)0)
 
-namespace simgrid {
-namespace xbt {
+namespace simgrid::xbt {
 
 /**
  * \todo This function contains many cases that do not allow for a
@@ -419,5 +418,4 @@ std::vector<VmMap> get_memory_map(pid_t pid)
   return ret;
 }
 
-}
-}
+} // namespace simgrid::xbt
index d505496..d85f0b7 100644 (file)
@@ -11,8 +11,7 @@
 #include <string>
 #include <vector>
 
-namespace simgrid {
-namespace xbt {
+namespace simgrid::xbt {
 
 /** An virtual memory map entry from /proc/$pid/maps */
 struct VmMap {
@@ -28,7 +27,6 @@ struct VmMap {
 };
 
 std::vector<VmMap> get_memory_map(pid_t pid);
-}
-}
+} // namespace simgrid::xbt
 
 #endif
index af2cfd4..cb53f80 100644 (file)
@@ -15,9 +15,7 @@
 XBT_LOG_EXTERNAL_CATEGORY(xbt);
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(xbt_random, xbt, "Random");
 
-namespace simgrid {
-namespace xbt {
-namespace random {
+namespace simgrid::xbt::random {
 
 bool Random::read_state(const std::string& filename)
 {
@@ -157,6 +155,4 @@ double normal(double mean, double sd)
   return default_random->normal(mean, sd);
 }
 
-} // namespace random
-} // namespace xbt
-} // namespace simgrid
+} // namespace simgrid::xbt::random
index 45f6348..412b22e 100644 (file)
@@ -10,8 +10,7 @@
 #include <cstdarg>
 #include <cstdio>
 
-namespace simgrid {
-namespace xbt {
+namespace simgrid::xbt {
 
 #if SIMGRID_HAVE_MC
 
@@ -52,5 +51,4 @@ std::string string_printf(const char *fmt, ...)
   return res;
 }
 
-}
-}
+} // namespace simgrid::xbt
index 41ae101..065f79a 100644 (file)
@@ -35,12 +35,10 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(module, xbt, "module handling");
 
 XBT_LOG_NEW_CATEGORY(smpi, "All SMPI categories"); /* lives here even if that's a bit odd to solve linking issues: this is used in xbt_log_file_appender to detect whether SMPI is used (and thus whether we should unbench the writing to disk) */
 
-namespace simgrid {
-namespace xbt {
+namespace simgrid::xbt {
 std::string binary_name;          /* Name of the system process containing us (mandatory to retrieve neat backtraces) */
 std::vector<std::string> cmdline; /* all we got in argv */
-} // namespace xbt
-} // namespace simgrid
+} // namespace simgrid::xbt
 
 int xbt_initialized = 0;
 simgrid::config::Flag<bool> cfg_dbg_clean_atexit{
index 4c10514..d135bb5 100644 (file)
@@ -11,8 +11,7 @@
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(replay,xbt,"Replay trace reader");
 
-namespace simgrid {
-namespace xbt {
+namespace simgrid::xbt {
 
 static std::ifstream action_fs;
 
@@ -140,8 +139,7 @@ int replay_runner(const char* actor_name, const char* trace_filename)
   }
   return 0;
 }
-}
-}
+} // namespace simgrid::xbt
 
 /**
  * @ingroup XBT_replay