Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Update python/clusters-multicpu to the new API.
[simgrid.git] / include / simgrid / kernel / ProfileBuilder.hpp
index 4643c5a67865578f907f3ca251b40a0148fedaa7..8ec4f7ca8ee6464aecb2e1be589ff9643b34d19f 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2004-2022. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2004-2023. The SimGrid Team. All rights reserved.          */
 
 /* 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. */
@@ -9,10 +9,7 @@
 #include <simgrid/forward.h>
 #include <functional>
 
-namespace simgrid {
-namespace kernel {
-namespace profile {
-
+namespace simgrid::kernel::profile {
 
 /** @brief Modeling of the availability profile (due to an external load) or the churn
  *
@@ -42,18 +39,17 @@ std::ostream& operator << (std::ostream& out, const DatedValue& dv);
  */
 class XBT_PUBLIC ProfileBuilder {
 public:
-  
   /** @brief A function called to populate the set of timed-values of a profile.
    *
-   * When the profile is repeating, the callback is called only once upon Profile construction. 
+   * When the profile is repeating, the callback is called only once upon Profile construction.
    * Then the timed values are repeated after a fixed repeat_delay.
    *
-   * When the profile is not repeating, the callback is called each time the profile data has been exhausted. 
-   * More precisely, each time an FutureEvtSet reached the end of the vector of timed values of the profile. 
+   * When the profile is not repeating, the callback is called each time the profile data has been exhausted.
+   * More precisely, each time an FutureEvtSet reached the end of the vector of timed values of the profile.
    *
-   * Note that the callback is only supposed to append values to the values vector, not modify or remove existing ones, 
+   * Note that the callback is only supposed to append values to the values vector, not modify or remove existing ones,
    * because other FutureEvtSet may still need previous values.
-   *   
+   *
    * @param values The vector of the profile values, where new data can be appended.
    *
    */
@@ -62,22 +58,20 @@ public:
   static Profile* from_file(const std::string& path);
   static Profile* from_string(const std::string& name, const std::string& input, double periodicity);
 
-  static Profile* from_void();  
+  static Profile* from_void();
 
   /** Create a profile from a callback
-  * 
-  * @param name: The *unique* name of the profile 
-  * @param cb: A callback object/function to populate the profile
-  * @param repeat_delay: Ignored if strictly negative. Otherwise, profile is repeating and repeat_delay is inserted between two iterations.
-  *
-  * @return the newly created profile
-  */
+   *
+   * @param name: The *unique* name of the profile
+   * @param cb: A callback object/function to populate the profile
+   * @param repeat_delay: Ignored if strictly negative. Otherwise, profile is repeating and repeat_delay is inserted
+   * between two iterations.
+   *
+   * @return the newly created profile
+   */
   static Profile* from_callback(const std::string& name, const std::function<UpdateCb>& cb, double repeat_delay);
-
 };
 
-} // namespace profile
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::profile
 
 #endif /* SIMGRID_KERNEL_PROFILEBUILDER_HPP */