Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Comply with clang-format rules
authorYann Duplouy <yann.duplouy@inria.fr>
Fri, 12 Apr 2019 15:20:23 +0000 (17:20 +0200)
committerYann Duplouy <yann.duplouy@inria.fr>
Fri, 12 Apr 2019 15:21:41 +0000 (17:21 +0200)
src/kernel/resource/profile/FutureEvtSet.cpp
src/kernel/resource/profile/Profile.cpp
src/kernel/resource/profile/Profile.hpp
src/kernel/resource/profile/trace_mgr.hpp

index 59b0bdc..3579fe8 100644 (file)
@@ -8,7 +8,7 @@
 namespace simgrid {
 namespace kernel {
 namespace profile {
 namespace simgrid {
 namespace kernel {
 namespace profile {
-       
+
 FutureEvtSet::FutureEvtSet() = default;
 FutureEvtSet::~FutureEvtSet()
 {
 FutureEvtSet::FutureEvtSet() = default;
 FutureEvtSet::~FutureEvtSet()
 {
@@ -37,12 +37,12 @@ Event* FutureEvtSet::pop_leq(double date, double* value, resource::Resource** re
   if (event_date > date || heap_.empty())
     return nullptr;
 
   if (event_date > date || heap_.empty())
     return nullptr;
 
-  Event* event = heap_.top().second;
-  Profile* profile = event->profile;
+  Event* event       = heap_.top().second;
+  Profile* profile   = event->profile;
   DatedValue dateVal = profile->next(event);
 
   *resource = event->resource;
   DatedValue dateVal = profile->next(event);
 
   *resource = event->resource;
-  *value = dateVal.value_;
+  *value    = dateVal.value_;
 
   heap_.pop();
 
 
   heap_.pop();
 
index 73f2962..a73c4c0 100644 (file)
@@ -3,14 +3,14 @@
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
+#include "src/kernel/resource/profile/Profile.hpp"
+#include "simgrid/forward.h"
+#include "src/kernel/resource/profile/DatedValue.cpp"
+#include "src/kernel/resource/profile/FutureEvtSet.cpp"
 #include "xbt/log.h"
 #include "xbt/sysdep.h"
 #include "xbt/log.h"
 #include "xbt/sysdep.h"
-#include <ostream>
-#include "src/kernel/resource/profile/Profile.hpp"
 #include <boost/algorithm/string.hpp>
 #include <boost/algorithm/string.hpp>
-#include "src/kernel/resource/profile/FutureEvtSet.cpp"
-#include "src/kernel/resource/profile/DatedValue.cpp"
-#include "simgrid/forward.h"
+#include <ostream>
 #include <vector>
 
 static std::unordered_map<std::string, simgrid::kernel::profile::Profile*> trace_list;
 #include <vector>
 
 static std::unordered_map<std::string, simgrid::kernel::profile::Profile*> trace_list;
@@ -25,7 +25,7 @@ Profile::Profile()
   DatedValue val(0, -1);
   event_list.push_back(val);
 }
   DatedValue val(0, -1);
   event_list.push_back(val);
 }
-Profile::~Profile()          = default;
+Profile::~Profile() = default;
 
 /** @brief Register this profile for that resource onto that FES,
  * and get an iterator over the integrated trace  */
 
 /** @brief Register this profile for that resource onto that FES,
  * and get an iterator over the integrated trace  */
@@ -122,7 +122,7 @@ Profile* Profile::from_file(const std::string& path)
 
   return Profile::from_string(path, buffer.str(), -1);
 }
 
   return Profile::from_string(path, buffer.str(), -1);
 }
-       
+
 } // namespace profile
 } // namespace kernel
 } // namespace simgrid
 } // namespace profile
 } // namespace kernel
 } // namespace simgrid
index 305808a..fdae8c5 100644 (file)
@@ -8,13 +8,13 @@
 
 #include "src/kernel/resource/profile/DatedValue.hpp"
 #include "src/kernel/resource/profile/FutureEvtSet.hpp"
 
 #include "src/kernel/resource/profile/DatedValue.hpp"
 #include "src/kernel/resource/profile/FutureEvtSet.hpp"
-#include <vector>
 #include <queue>
 #include <queue>
+#include <vector>
 
 namespace simgrid {
 namespace kernel {
 namespace profile {
 
 namespace simgrid {
 namespace kernel {
 namespace profile {
-       
+
 class Event {
 public:
   Profile* profile;
 class Event {
 public:
   Profile* profile;
@@ -22,7 +22,7 @@ public:
   resource::Resource* resource;
   bool free_me;
 };
   resource::Resource* resource;
   bool free_me;
 };
-       
+
 /** @brief A profile is a set of timed values, encoding the value that a variable takes at what time
  *
  * It is useful to model dynamic platforms, where an external load that makes the resource availability change over
 /** @brief A profile is a set of timed values, encoding the value that a variable takes at what time
  *
  * It is useful to model dynamic platforms, where an external load that makes the resource availability change over
index 9930b14..5ed634a 100644 (file)
@@ -25,6 +25,4 @@ extern XBT_PRIVATE simgrid::kernel::profile::FutureEvtSet future_evt_set;
 XBT_PUBLIC void tmgr_trace_event_unref(simgrid::kernel::profile::Event** trace_event);
 XBT_PUBLIC void tmgr_finalize();
 
 XBT_PUBLIC void tmgr_trace_event_unref(simgrid::kernel::profile::Event** trace_event);
 XBT_PUBLIC void tmgr_finalize();
 
-
-
 #endif /* SURF_PMGR_H */
 #endif /* SURF_PMGR_H */