diff --git a/src/mpi/examples/fat-tree-hybrid.cc b/src/mpi/examples/fat-tree-hybrid.cc index 0c7ef1b7c..9ee650267 100644 --- a/src/mpi/examples/fat-tree-hybrid.cc +++ b/src/mpi/examples/fat-tree-hybrid.cc @@ -1,3 +1,22 @@ +/* + * Copyright (c) 2023 State Key Laboratory for Novel Software Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation; + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Author: Songyuan Bai + */ + #include "ns3/applications-module.h" #include "ns3/core-module.h" #include "ns3/flow-monitor-module.h" diff --git a/src/mpi/examples/fat-tree-mpi.cc b/src/mpi/examples/fat-tree-mpi.cc index 7703c67ca..ebbb29b57 100644 --- a/src/mpi/examples/fat-tree-mpi.cc +++ b/src/mpi/examples/fat-tree-mpi.cc @@ -1,3 +1,22 @@ +/* + * Copyright (c) 2023 State Key Laboratory for Novel Software Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation; + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Author: Songyuan Bai + */ + #include "ns3/applications-module.h" #include "ns3/core-module.h" #include "ns3/flow-monitor-module.h" diff --git a/src/mpi/model/hybrid-simulator-impl.cc b/src/mpi/model/hybrid-simulator-impl.cc index adc1a9725..39719a198 100644 --- a/src/mpi/model/hybrid-simulator-impl.cc +++ b/src/mpi/model/hybrid-simulator-impl.cc @@ -1,4 +1,21 @@ -/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2023 State Key Laboratory for Novel Software Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation; + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Author: Songyuan Bai + */ #include "hybrid-simulator-impl.h" @@ -45,7 +62,7 @@ HybridSimulatorImpl::~HybridSimulatorImpl() } TypeId -HybridSimulatorImpl::GetTypeId(void) +HybridSimulatorImpl::GetTypeId() { static TypeId tid = TypeId("ns3::HybridSimulatorImpl") .SetParent() @@ -83,19 +100,19 @@ HybridSimulatorImpl::Destroy() } bool -HybridSimulatorImpl::IsFinished(void) const +HybridSimulatorImpl::IsFinished() const { return m_globalFinished; } bool -HybridSimulatorImpl::IsLocalFinished(void) const +HybridSimulatorImpl::IsLocalFinished() const { return MtpInterface::isFinished(); } void -HybridSimulatorImpl::Stop(void) +HybridSimulatorImpl::Stop() { NS_LOG_FUNCTION(this); for (uint32_t i = 0; i < MtpInterface::GetSize(); i++) @@ -214,7 +231,7 @@ HybridSimulatorImpl::IsExpired(const EventId& id) const } void -HybridSimulatorImpl::Run(void) +HybridSimulatorImpl::Run() { NS_LOG_FUNCTION(this); @@ -278,7 +295,7 @@ HybridSimulatorImpl::Run(void) } Time -HybridSimulatorImpl::Now(void) const +HybridSimulatorImpl::Now() const { // Do not add function logging here, to avoid stack overflow return MtpInterface::GetSystem()->Now(); @@ -298,7 +315,7 @@ HybridSimulatorImpl::GetDelayLeft(const EventId& id) const } Time -HybridSimulatorImpl::GetMaximumSimulationTime(void) const +HybridSimulatorImpl::GetMaximumSimulationTime() const { return Time::Max() / 2; } @@ -321,13 +338,13 @@ HybridSimulatorImpl::GetSystemId() const } uint32_t -HybridSimulatorImpl::GetContext(void) const +HybridSimulatorImpl::GetContext() const { return MtpInterface::GetSystem()->GetContext(); } uint64_t -HybridSimulatorImpl::GetEventCount(void) const +HybridSimulatorImpl::GetEventCount() const { uint64_t eventCount = 0; for (uint32_t i = 0; i < MtpInterface::GetSize(); i++) @@ -338,7 +355,7 @@ HybridSimulatorImpl::GetEventCount(void) const } void -HybridSimulatorImpl::DoDispose(void) +HybridSimulatorImpl::DoDispose() { delete[] m_pLBTS; SimulatorImpl::DoDispose(); diff --git a/src/mpi/model/hybrid-simulator-impl.h b/src/mpi/model/hybrid-simulator-impl.h index 66e1dd12c..fb596c5e2 100644 --- a/src/mpi/model/hybrid-simulator-impl.h +++ b/src/mpi/model/hybrid-simulator-impl.h @@ -1,4 +1,22 @@ -/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2023 State Key Laboratory for Novel Software Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation; + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Author: Songyuan Bai + */ + #ifndef NS3_HYBRID_SIMULATOR_IMPL_H #define NS3_HYBRID_SIMULATOR_IMPL_H @@ -18,7 +36,7 @@ namespace ns3 class HybridSimulatorImpl : public SimulatorImpl { public: - static TypeId GetTypeId(void); + static TypeId GetTypeId(); /** Default constructor. */ HybridSimulatorImpl(); @@ -27,8 +45,8 @@ class HybridSimulatorImpl : public SimulatorImpl // virtual from SimulatorImpl virtual void Destroy(); - virtual bool IsFinished(void) const; - virtual void Stop(void); + virtual bool IsFinished() const; + virtual void Stop(); virtual void Stop(const Time& delay); virtual EventId Schedule(const Time& delay, EventImpl* event); virtual void ScheduleWithContext(uint32_t context, const Time& delay, EventImpl* event); @@ -37,20 +55,20 @@ class HybridSimulatorImpl : public SimulatorImpl virtual void Remove(const EventId& id); virtual void Cancel(const EventId& id); virtual bool IsExpired(const EventId& id) const; - virtual void Run(void); - virtual Time Now(void) const; + virtual void Run(); + virtual Time Now() const; virtual Time GetDelayLeft(const EventId& id) const; - virtual Time GetMaximumSimulationTime(void) const; + virtual Time GetMaximumSimulationTime() const; virtual void SetScheduler(ObjectFactory schedulerFactory); - virtual uint32_t GetSystemId(void) const; - virtual uint32_t GetContext(void) const; - virtual uint64_t GetEventCount(void) const; + virtual uint32_t GetSystemId() const; + virtual uint32_t GetContext() const; + virtual uint64_t GetEventCount() const; private: // Inherited from Object - virtual void DoDispose(void); + virtual void DoDispose(); - bool IsLocalFinished(void) const; + bool IsLocalFinished() const; /** Are all parallel instances completed. */ bool m_globalFinished; diff --git a/src/mtp/examples/fat-tree-mtp.cc b/src/mtp/examples/fat-tree-mtp.cc index 074d03140..35c09032e 100644 --- a/src/mtp/examples/fat-tree-mtp.cc +++ b/src/mtp/examples/fat-tree-mtp.cc @@ -1,3 +1,22 @@ +/* + * Copyright (c) 2023 State Key Laboratory for Novel Software Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation; + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Author: Songyuan Bai + */ + #include "ns3/applications-module.h" #include "ns3/core-module.h" #include "ns3/flow-monitor-module.h" diff --git a/src/mtp/model/logical-process.cc b/src/mtp/model/logical-process.cc index e767f9214..8f597929f 100644 --- a/src/mtp/model/logical-process.cc +++ b/src/mtp/model/logical-process.cc @@ -1,3 +1,22 @@ +/* + * Copyright (c) 2023 State Key Laboratory for Novel Software Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation; + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Author: Songyuan Bai + */ + #include "logical-process.h" #include "mtp-interface.h" diff --git a/src/mtp/model/logical-process.h b/src/mtp/model/logical-process.h index a769544e8..3bb4248a3 100644 --- a/src/mtp/model/logical-process.h +++ b/src/mtp/model/logical-process.h @@ -1,3 +1,22 @@ +/* + * Copyright (c) 2023 State Key Laboratory for Novel Software Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation; + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Author: Songyuan Bai + */ + #ifndef LOGICAL_PROCESS_H #define LOGICAL_PROCESS_H diff --git a/src/mtp/model/mtp-interface.cc b/src/mtp/model/mtp-interface.cc index 7a94b10ed..a1a3e892d 100644 --- a/src/mtp/model/mtp-interface.cc +++ b/src/mtp/model/mtp-interface.cc @@ -1,3 +1,22 @@ +/* + * Copyright (c) 2023 State Key Laboratory for Novel Software Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation; + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Author: Songyuan Bai + */ + #include "mtp-interface.h" #include "ns3/assert.h" diff --git a/src/mtp/model/mtp-interface.h b/src/mtp/model/mtp-interface.h index cf3fd41fe..b16dab427 100644 --- a/src/mtp/model/mtp-interface.h +++ b/src/mtp/model/mtp-interface.h @@ -1,3 +1,22 @@ +/* + * Copyright (c) 2023 State Key Laboratory for Novel Software Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation; + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Author: Songyuan Bai + */ + #ifndef MTP_INTERFACE_H #define MTP_INTERFACE_H diff --git a/src/mtp/model/multithreaded-simulator-impl.cc b/src/mtp/model/multithreaded-simulator-impl.cc index 7adb9f10e..b91cc1ff5 100644 --- a/src/mtp/model/multithreaded-simulator-impl.cc +++ b/src/mtp/model/multithreaded-simulator-impl.cc @@ -1,3 +1,22 @@ +/* + * Copyright (c) 2023 State Key Laboratory for Novel Software Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation; + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Author: Songyuan Bai + */ + #include "multithreaded-simulator-impl.h" #include "mtp-interface.h" diff --git a/src/mtp/model/multithreaded-simulator-impl.h b/src/mtp/model/multithreaded-simulator-impl.h index e9cd38b8c..7949fe2f0 100644 --- a/src/mtp/model/multithreaded-simulator-impl.h +++ b/src/mtp/model/multithreaded-simulator-impl.h @@ -1,3 +1,22 @@ +/* + * Copyright (c) 2023 State Key Laboratory for Novel Software Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation; + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Author: Songyuan Bai + */ + #ifndef MULTITHREADED_SIMULATOR_IMPL_H #define MULTITHREADED_SIMULATOR_IMPL_H diff --git a/src/mtp/test/mtp-test-suite.cc b/src/mtp/test/mtp-test-suite.cc index dcf9ca2dd..3724c1022 100644 --- a/src/mtp/test/mtp-test-suite.cc +++ b/src/mtp/test/mtp-test-suite.cc @@ -1,3 +1,22 @@ +/* + * Copyright (c) 2023 State Key Laboratory for Novel Software Technology + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation; + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Author: Songyuan Bai + */ + #include "ns3/example-as-test.h" #include "ns3/mtp-module.h" #include "ns3/test.h"