From 9286635df68ffd6c2d5549867647eac7a3ceb81c Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Sat, 16 Jun 2018 22:03:22 +0200 Subject: [PATCH 1/1] useless cleanups to ease the tracking of stuff to snakecase --- include/simgrid/kernel/routing/ClusterZone.hpp | 2 +- include/simgrid/kernel/routing/DragonflyZone.hpp | 2 +- include/simgrid/kernel/routing/NetZoneImpl.hpp | 2 +- include/xbt/config.hpp | 6 +++--- src/surf/StorageImpl.hpp | 2 +- src/surf/cpu_cas01.hpp | 6 +++--- src/surf/cpu_interface.hpp | 4 ++-- src/surf/cpu_ti.hpp | 4 ++-- src/surf/ns3/ns3_simulator.hpp | 8 ++++---- src/surf/ptask_L07.hpp | 2 +- 10 files changed, 19 insertions(+), 19 deletions(-) diff --git a/include/simgrid/kernel/routing/ClusterZone.hpp b/include/simgrid/kernel/routing/ClusterZone.hpp index 44212a9f42..cb1d330b45 100644 --- a/include/simgrid/kernel/routing/ClusterZone.hpp +++ b/include/simgrid/kernel/routing/ClusterZone.hpp @@ -80,7 +80,7 @@ public: } /* We use a map instead of a std::vector here because that's a sparse vector. Some values may not exist */ - /* The pair is {linkUp, linkDown} */ + /* The pair is {link_up, link_down} */ std::unordered_map> private_links_; unsigned int node_pos(int id) { return id * num_links_per_node_; } diff --git a/include/simgrid/kernel/routing/DragonflyZone.hpp b/include/simgrid/kernel/routing/DragonflyZone.hpp index d1efcd1c99..b25af86f70 100644 --- a/include/simgrid/kernel/routing/DragonflyZone.hpp +++ b/include/simgrid/kernel/routing/DragonflyZone.hpp @@ -71,7 +71,7 @@ public: void generateLinks(); void createLink(const std::string& id, int numlinks, resource::LinkImpl** linkup, resource::LinkImpl** linkdown); - void rankId_to_coords(int rankId, unsigned int coords[4]); + void rankId_to_coords(int rank_id, unsigned int coords[4]); private: simgrid::s4u::Link::SharingPolicy sharing_policy_; diff --git a/include/simgrid/kernel/routing/NetZoneImpl.hpp b/include/simgrid/kernel/routing/NetZoneImpl.hpp index ba1d690726..fd6aff2596 100644 --- a/include/simgrid/kernel/routing/NetZoneImpl.hpp +++ b/include/simgrid/kernel/routing/NetZoneImpl.hpp @@ -55,7 +55,7 @@ protected: public: /** @brief Make an host within that NetZone */ - simgrid::s4u::Host* create_host(const char* name, std::vector* speedPerPstate, int coreAmount, + simgrid::s4u::Host* create_host(const char* name, std::vector* speed_per_pstate, int core_count, std::map* props); /** @brief Creates a new route in this NetZone */ void add_bypass_route(NetPoint* src, NetPoint* dst, NetPoint* gw_src, NetPoint* gw_dst, diff --git a/include/xbt/config.hpp b/include/xbt/config.hpp index 10cdc39aa4..c8888e639a 100644 --- a/include/xbt/config.hpp +++ b/include/xbt/config.hpp @@ -162,11 +162,11 @@ bind_flag(T& value, const char* name, const char* description, std::map *speedPerPstate, int core); + CpuCas01(CpuCas01Model* model, simgrid::s4u::Host* host, std::vector* speed_per_pstate, int core); ~CpuCas01() override; void apply_event(tmgr_trace_event_t event, double value) override; CpuAction* execution_start(double size) override; - CpuAction* execution_start(double size, int requestedCore) override; + CpuAction* execution_start(double size, int requested_cores) override; CpuAction* sleep(double duration) override; bool is_used() override; @@ -56,7 +56,7 @@ class CpuCas01Action: public CpuAction { friend CpuAction *CpuCas01::sleep(double duration); public: CpuCas01Action(kernel::resource::Model* model, double cost, bool failed, double speed, - kernel::lmm::Constraint* constraint, int coreAmount); + kernel::lmm::Constraint* constraint, int core_count); CpuCas01Action(kernel::resource::Model* model, double cost, bool failed, double speed, kernel::lmm::Constraint* constraint); ~CpuCas01Action() override; diff --git a/src/surf/cpu_interface.hpp b/src/surf/cpu_interface.hpp index 2d7fc3e64b..a1ce5a517b 100644 --- a/src/surf/cpu_interface.hpp +++ b/src/surf/cpu_interface.hpp @@ -36,7 +36,7 @@ public: * @param speedPerPstate Processor speed (in Flops) of each pstate. This ignores any potential external load coming from a trace. * @param core The number of core of this Cpu */ - virtual Cpu* create_cpu(simgrid::s4u::Host* host, std::vector* speedPerPstate, int core) = 0; + virtual Cpu* create_cpu(simgrid::s4u::Host* host, std::vector* speed_per_pstate, int core) = 0; void update_actions_state_lazy(double now, double delta) override; void update_actions_state_full(double now, double delta) override; @@ -92,7 +92,7 @@ public: * @param requestedCores The desired amount of cores. Must be >= 1 * @return The CpuAction corresponding to the processing */ - virtual simgrid::kernel::resource::Action* execution_start(double size, int requestedCores) = 0; + virtual simgrid::kernel::resource::Action* execution_start(double size, int requested_cores) = 0; /** * @brief Make a process sleep for duration (in seconds) diff --git a/src/surf/cpu_ti.hpp b/src/surf/cpu_ti.hpp index 57515468ab..519e744220 100644 --- a/src/surf/cpu_ti.hpp +++ b/src/surf/cpu_ti.hpp @@ -51,7 +51,7 @@ enum trace_type { class CpuTiTmgr { public: CpuTiTmgr(trace_type type, double value) : type_(type), value_(value){}; - CpuTiTmgr(tmgr_trace_t speedTrace, double value); + CpuTiTmgr(tmgr_trace_t speed_trace, double value); CpuTiTmgr(const CpuTiTmgr&) = delete; CpuTiTmgr& operator=(const CpuTiTmgr&) = delete; ~CpuTiTmgr(); @@ -113,7 +113,7 @@ public: bool is_used() override; CpuAction *execution_start(double size) override; - simgrid::kernel::resource::Action* execution_start(double size, int requestedCores) override + simgrid::kernel::resource::Action* execution_start(double size, int requested_cores) override { THROW_UNIMPLEMENTED; return nullptr; diff --git a/src/surf/ns3/ns3_simulator.hpp b/src/surf/ns3/ns3_simulator.hpp index 93ea87cff2..c7c496c364 100644 --- a/src/surf/ns3/ns3_simulator.hpp +++ b/src/surf/ns3/ns3_simulator.hpp @@ -24,13 +24,13 @@ public: }; XBT_PUBLIC void ns3_initialize(std::string TcpProtocol); -XBT_PUBLIC void ns3_simulator(double maxSeconds); +XBT_PUBLIC void ns3_simulator(double max_seconds); XBT_PUBLIC void ns3_add_link(NetPointNs3* src, NetPointNs3* dst, double bw, double lat); XBT_PUBLIC void ns3_add_cluster(const char* id, double bw, double lat); class XBT_PRIVATE SgFlow { public: - SgFlow(uint32_t totalBytes, simgrid::kernel::resource::NetworkNS3Action* action); + SgFlow(uint32_t total_bytes, simgrid::kernel::resource::NetworkNS3Action* action); // private: std::uint32_t bufferedBytes_ = 0; @@ -43,10 +43,10 @@ public: void StartFlow(ns3::Ptr sock, const char* to, uint16_t port_number); -static inline std::string transformSocketPtr(ns3::Ptr localSocket) +static inline std::string transformSocketPtr(ns3::Ptr local_socket) { std::stringstream sstream; - sstream << localSocket; + sstream << local_socket; return sstream.str(); } diff --git a/src/surf/ptask_L07.hpp b/src/surf/ptask_L07.hpp index 149b22e1a3..09e4043e01 100644 --- a/src/surf/ptask_L07.hpp +++ b/src/surf/ptask_L07.hpp @@ -76,7 +76,7 @@ public: bool is_used() override; void apply_event(tmgr_trace_event_t event, double value) override; kernel::resource::Action* execution_start(double size) override; - simgrid::kernel::resource::Action* execution_start(double size, int requestedCores) override + simgrid::kernel::resource::Action* execution_start(double size, int requested_cores) override { THROW_UNIMPLEMENTED; return nullptr; -- 2.20.1