Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[no-ci] indicate which methods and signals are static in the doc
authorFred Suter <suterf@ornl.gov>
Sun, 4 Jun 2023 16:22:46 +0000 (12:22 -0400)
committerFred Suter <suterf@ornl.gov>
Sun, 4 Jun 2023 16:22:46 +0000 (12:22 -0400)
14 files changed:
include/simgrid/s4u/Activity.hpp
include/simgrid/s4u/Barrier.hpp
include/simgrid/s4u/Comm.hpp
include/simgrid/s4u/ConditionVariable.hpp
include/simgrid/s4u/Disk.hpp
include/simgrid/s4u/Exec.hpp
include/simgrid/s4u/Host.hpp
include/simgrid/s4u/Io.hpp
include/simgrid/s4u/Link.hpp
include/simgrid/s4u/Mailbox.hpp
include/simgrid/s4u/Mutex.hpp
include/simgrid/s4u/NetZone.hpp
include/simgrid/s4u/Semaphore.hpp
include/simgrid/s4u/VirtualMachine.hpp

index 8204458..2b8175c 100644 (file)
@@ -248,18 +248,23 @@ protected:
   xbt::signal<void(AnyActivity&)> on_this_veto;
 
 public:
-  /*! Add a callback fired when the activity completes (either normally, cancelled or failed) */
+  /*! \static Add a callback fired when any activity completes (either normally, cancelled or failed) */
   static void on_completion_cb(const std::function<void(AnyActivity const&)>& cb) { on_completion.connect(cb); }
+  /*! Add a callback fired when this specific activity completes (either normally, cancelled or failed) */
   void on_this_completion_cb(const std::function<void(AnyActivity const&)>& cb) { on_this_completion.connect(cb); }
-  /*! Add a callback fired when the activity is suspended */
+  /*! \static Add a callback fired when any activity is suspended */
   static void on_suspend_cb(const std::function<void(AnyActivity const&)>& cb) { on_suspend.connect(cb); }
+  /*! Add a callback fired when this specific activity is suspended */
   void on_this_suspend_cb(const std::function<void(AnyActivity const&)>& cb) { on_this_suspend.connect(cb); }
-  /*! Add a callback fired when the activity is resumed after being suspended */
+  /*! \static Add a callback fired when any activity is resumed after being suspended */
   static void on_resume_cb(const std::function<void(AnyActivity const&)>& cb) { on_resume.connect(cb); }
+  /*! Add a callback fired when this specific activity is resumed after being suspended */
   void on_this_resume_cb(const std::function<void(AnyActivity const&)>& cb) { on_this_resume.connect(cb); }
-  /*! Add a callback fired each time that the activity fails to start because of a veto (e.g., unsolved dependency or no
-   * resource assigned) */
+  /*! \static Add a callback fired each time that any activity fails to start because of a veto (e.g., unsolved
+   *  dependency or no resource assigned) */
   static void on_veto_cb(const std::function<void(AnyActivity&)>& cb) { on_veto.connect(cb); }
+  /*! Add a callback fired each time that this specific activity fails to start because of a veto (e.g., unsolved
+   *  dependency or no resource assigned) */
   void on_this_veto_cb(const std::function<void(AnyActivity&)>& cb) { on_this_veto.connect(cb); }
 
   XBT_ATTRIB_DEPRECATED_v337("Please use on_suspend_cb() instead") static void on_suspended_cb(
index 5419c53..2d6db86 100644 (file)
@@ -29,7 +29,7 @@ public:
   Barrier& operator=(Barrier const&) = delete;
 #endif
 
-  /** Creates a barrier for the given amount of actors */
+  /** \static Creates a barrier for the given amount of actors */
   static BarrierPtr create(unsigned int expected_actors);
   /** Blocks into the barrier. Every waiting actors will be unlocked once the expected amount of actors reaches the barrier */
   int wait();
index 393b48a..167f70c 100644 (file)
@@ -63,9 +63,13 @@ protected:
   void fire_on_this_veto() const override { on_this_veto(const_cast<Comm&>(*this)); }
 
 public:
+  /*! \static Add a callback fired when the send of any Comm is posted  */
   static void on_send_cb(const std::function<void(Comm const&)>& cb) { on_send.connect(cb); }
+  /*! \static Add a callback fired when the recv of any Comm is posted  */
   static void on_recv_cb(const std::function<void(Comm const&)>& cb) { on_recv.connect(cb); }
+  /*! \static Add a callback fired when any Comm starts  */
   static void on_start_cb(const std::function<void(Comm const&)>& cb) { on_start.connect(cb); }
+  /*!  Add a callback fired when this specific Comm starts  */
   void on_this_start_cb(const std::function<void(Comm const&)>& cb) { on_this_start.connect(cb); }
 
   CommPtr set_copy_data_callback(const std::function<void(kernel::activity::CommImpl*, void*, size_t)>& callback);
@@ -86,7 +90,8 @@ public:
                    const std::function<void(simgrid::kernel::activity::CommImpl*, void*, size_t)>& copy_data_fun,
                    void* data, double timeout, double rate);
 
-  /* "One-sided" communications. This way of communicating bypasses the mailbox and actors mechanism. It creates a
+  /* \static
+   * "One-sided" communications. This way of communicating bypasses the mailbox and actors mechanism. It creates a
    * communication (vetoabled, asynchronous, or synchronous) directly between two hosts. There is really no limit on
    * the hosts involved. In particular, the actor creating such a communication does not have to be on one of the
    * involved hosts! Enjoy the comfort of the simulator :)
@@ -179,19 +184,19 @@ public:
 
   Comm* wait_for(double timeout) override;
 
-  /*! take a vector s4u::CommPtr and return the rank of the first finished one (or -1 if none is done). */
+  /*! \static take a vector s4u::CommPtr and return the rank of the first finished one (or -1 if none is done). */
   static ssize_t test_any(const std::vector<CommPtr>& comms);
 
-  /*! take a vector s4u::CommPtr and return when one of them is finished.
+  /*! \static take a vector s4u::CommPtr and return when one of them is finished.
    * The return value is the rank of the first finished CommPtr. */
   static ssize_t wait_any(const std::vector<CommPtr>& comms) { return wait_any_for(comms, -1); }
-  /*! Same as wait_any, but with a timeout. Return -1 if the timeout occurs.*/
+  /*! \static Same as wait_any, but with a timeout. Return -1 if the timeout occurs.*/
   static ssize_t wait_any_for(const std::vector<CommPtr>& comms, double timeout);
 
-  /*! take a vector s4u::CommPtr and return when all of them is finished. */
+  /*! \static take a vector s4u::CommPtr and return when all of them is finished. */
   static void wait_all(const std::vector<CommPtr>& comms);
-  /*! Same as wait_all, but with a timeout. Return the number of terminated comm (less than comms.size() if the timeout
-   * occurs). */
+  /*! \static Same as wait_all, but with a timeout. Return the number of terminated comm (less than comms.size() if
+   *  the timeout occurs). */
   static size_t wait_all_for(const std::vector<CommPtr>& comms, double timeout);
 };
 } // namespace simgrid::s4u
index 0e0e672..f2f0744 100644 (file)
@@ -43,7 +43,7 @@ private:
 #endif
 
 public:
-  /** Create a new condition variable and return a smart pointer
+  /** \static Create a new condition variable and return a smart pointer
    *
    * @beginrst
    * You should only manipulate :cpp:type:`simgrid::s4u::ConditionVariablePtr`, as created by this function (see also :ref:`s4u_raii`).
index 4e6dc99..8a09719 100644 (file)
@@ -133,13 +133,13 @@ public:
   Disk* seal();
 
   /* The signals */
-  /** @brief Add a callback fired when a new Disk is created */
+  /** @brief \static Add a callback fired when a new Disk is created */
   static void on_creation_cb(const std::function<void(Disk&)>& cb) { on_creation.connect(cb); }
-  /** @brief Add a callback fired when any Disk is destroyed */
+  /** @brief \static Add a callback fired when any Disk is destroyed */
   static void on_destruction_cb(const std::function<void(Disk const&)>& cb) { on_destruction.connect(cb); }
   /** @brief Add a callback fired when this specific Disk is destroyed */
   void on_this_destruction_cb(const std::function<void(Disk const&)>& cb) { on_this_destruction.connect(cb); }
-  /** @brief Add a callback fired when any Disk is turned on or off */
+  /** @brief \static Add a callback fired when any Disk is turned on or off */
   static void on_onoff_cb(const std::function<void(Disk const&)>& cb)
   {
     on_onoff.connect(cb);
index 720731b..5cd7857 100644 (file)
@@ -58,16 +58,18 @@ public:
   Exec(Exec const&) = delete;
   Exec& operator=(Exec const&) = delete;
 #endif
-  /*! Signal fired each time that an execution actually starts (no veto) */
+  /*! \static Signal fired each time that any execution actually starts (no veto) */
   static void on_start_cb(const std::function<void(Exec const&)>& cb) { on_start.connect(cb); }
+  /*! Signal fired each time that this specific execution actually starts (no veto) */
   void on_this_start_cb(const std::function<void(Exec const&)>& cb) { on_this_start.connect(cb); }
 
+  /*! \static Initiate the creation of an Exec. Setters have to be called afterwards */
   static ExecPtr init();
 
-  /*! take a vector of s4u::ExecPtr and return when one of them is finished.
+  /*! \static take a vector of s4u::ExecPtr and return when one of them is finished.
    * The return value is the rank of the first finished ExecPtr. */
   static ssize_t wait_any(const std::vector<ExecPtr>& execs) { return wait_any_for(execs, -1); }
-  /*! Same as wait_any, but with a timeout. If the timeout occurs, parameter last is returned.*/
+  /*! \static Same as wait_any, but with a timeout. If the timeout occurs, parameter last is returned.*/
   static ssize_t wait_any_for(const std::vector<ExecPtr>& execs, double timeout);
 
   /** @brief On sequential executions, returns the amount of flops that remain to be done; This cannot be used on
index bd8e8e5..d29468e 100644 (file)
@@ -70,9 +70,9 @@ public:
   xbt::signal<void(Host const&)> on_this_onoff;
 
 #endif
-  /** Add a callback fired on each newly created host */
+  /** \static Add a callback fired on each newly created host */
   static void on_creation_cb(const std::function<void(Host&)>& cb) { on_creation.connect(cb); }
-  /** Add a callback fired when any machine is turned on or off (called AFTER the change) */
+  /** \static Add a callback fired when any machine is turned on or off (called AFTER the change) */
   static void on_onoff_cb(const std::function<void(Host const&)>& cb)
   {
     on_onoff.connect(cb);
@@ -87,7 +87,7 @@ public:
   {
     on_this_onoff.connect(cb);
   }
-  /** Add a callback fired when the speed of any machine is changed (called AFTER the change)
+  /** \static Add a callback fired when the speed of any machine is changed (called AFTER the change)
    * (either because of a pstate switch or because of an external load event coming from the profile) */
   static void on_speed_change_cb(const std::function<void(Host const&)>& cb) { on_speed_change.connect(cb); }
   /** Add a callback fired when the speed of this specific machine is changed (called AFTER the change)
@@ -96,14 +96,14 @@ public:
   {
     on_this_speed_change.connect(cb);
   }
-  /** Add a callback fired just before destructing any host */
+  /** \static Add a callback fired just before destructing any host */
   static void on_destruction_cb(const std::function<void(Host const&)>& cb) { on_destruction.connect(cb); }
   /** Add a callback fired just before destructing this specific host */
   void on_this_destruction_cb(const std::function<void(Host const&)>& cb)
   {
     on_this_destruction.connect(cb);
   }
-  /** Add a callback fired when the state of any exec activity changes */
+  /** \static Add a callback fired when the state of any exec activity changes */
   static void on_exec_state_change_cb(
       const std::function<void(kernel::resource::CpuAction&, kernel::resource::Action::State previous)>& cb)
   {
@@ -117,11 +117,11 @@ public:
   Host& operator=(Host const&) = delete;
 #endif
 
-  /** Retrieve a host from its name, or return nullptr */
+  /** \static Retrieve a host from its name, or return nullptr */
   static Host* by_name_or_null(const std::string& name);
-  /** Retrieve a host from its name, or die */
+  /** \static Retrieve a host from its name, or die */
   static Host* by_name(const std::string& name);
-  /** Retrieves the host on which the running actor is located */
+  /** \static Retrieves the host on which the running actor is located */
   static Host* current();
 
   /** Retrieves the name of that host as a C++ string */
@@ -180,7 +180,7 @@ public:
   Host* set_concurrency_limit(int limit);
   int get_concurrency_limit() const;
 
-  /** @brief Convert the CPU's speed from string to double */
+  /** \static @brief Convert the CPU's speed from string to double */
   static std::vector<double> convert_pstate_speed_vector(const std::vector<std::string>& speed_per_state);
   /**
    * @brief Set the CPU's speed
index cb75b50..3cc28a0 100644 (file)
@@ -42,14 +42,17 @@ protected:
 public:
   enum class OpType { READ, WRITE };
 
+   /*! \static Signal fired each time that any I/O actually starts (no veto) */
   static void on_start_cb(const std::function<void(Io const&)>& cb) { on_start.connect(cb); }
+   /*! Signal fired each time this specific I/O actually starts (no veto) */
   void on_this_start_cb(const std::function<void(Io const&)>& cb) { on_this_start.connect(cb); }
 
+   /*! \static Initiate the creation of an I/O. Setters have to be called afterwards */
   static IoPtr init();
-  /*! take a vector of s4u::IoPtr and return when one of them is finished.
+  /*! \static take a vector of s4u::IoPtr and return when one of them is finished.
    * The return value is the rank of the first finished IoPtr. */
   static ssize_t wait_any(const std::vector<IoPtr>& ios) { return wait_any_for(ios, -1); }
-  /*! Same as wait_any, but with a timeout. If the timeout occurs, parameter last is returned.*/
+  /*! \static Same as wait_any, but with a timeout. If the timeout occurs, parameter last is returned.*/
   static ssize_t wait_any_for(const std::vector<IoPtr>& ios, double timeout);
 
   double get_remaining() const override;
index 816e62a..3e0832b 100644 (file)
@@ -49,7 +49,7 @@ public:
 
   kernel::resource::StandardLinkImpl* get_impl() const;
 
-  /** @brief Retrieve a link from its name */
+  /** \static @brief Retrieve a link from its name */
   static Link* by_name(const std::string& name);
   static Link* by_name_or_null(const std::string& name);
 
@@ -169,9 +169,9 @@ private:
 
 public:
   /* The signals */
-  /** @brief Add a callback fired when a new Link is created */
+  /** \static @brief Add a callback fired when a new Link is created */
   static void on_creation_cb(const std::function<void(Link&)>& cb) { on_creation.connect(cb); }
-  /** @brief Add a callback fired when any Link is turned on or off */
+  /** \static @brief Add a callback fired when any Link is turned on or off */
   static void on_onoff_cb(const std::function<void(Link const&)>& cb)
   {
     on_onoff.connect(cb);
@@ -181,20 +181,20 @@ public:
   {
     on_this_onoff.connect(cb);
   }
-  /** @brief Add a callback fired when the bandwidth of any Link changes */
+  /** \static @brief Add a callback fired when the bandwidth of any Link changes */
   static void on_bandwidth_change_cb(const std::function<void(Link const&)>& cb) { on_bandwidth_change.connect(cb); }
   /** @brief Add a callback fired when the bandwidth of this specific Link changes */
   void on_this_bandwidth_change_cb(const std::function<void(Link const&)>& cb)
   {
     on_this_bandwidth_change.connect(cb);
   }
-  /** @brief Add a callback fired when a communication changes it state (ready/done/cancel) */
+  /** \static @brief Add a callback fired when a communication changes it state (ready/done/cancel) */
   static void on_communication_state_change_cb(
       const std::function<void(kernel::resource::NetworkAction&, kernel::resource::Action::State)>& cb)
   {
     on_communication_state_change.connect(cb);
   }
-  /** @brief Add a callback fired when any Link is destroyed */
+  /** \static @brief Add a callback fired when any Link is destroyed */
   static void on_destruction_cb(const std::function<void(Link const&)>& cb) { on_destruction.connect(cb); }
   /** @brief Add a callback fired when this specific Link is destroyed */
   void on_this_destruction_cb(const std::function<void(Link const&)>& cb)
@@ -224,7 +224,7 @@ public:
   /** @brief Get the link direction down */
   Link* get_link_down() const;
 
-  /** @brief Retrieve a link from its name */
+  /** \static @brief Retrieve a link from its name */
   static SplitDuplexLink* by_name(const std::string& name);
 };
 
index d3bec35..b5723df 100644 (file)
@@ -38,7 +38,7 @@ public:
   /** @brief Retrieves the name of that mailbox as a C string */
   const char* get_cname() const;
 
-  /** Retrieve the mailbox associated to the given name. Mailboxes are created on demand. */
+  /** \static Retrieve the mailbox associated to the given name. Mailboxes are created on demand. */
   static Mailbox* by_name(const std::string& name);
 
   /** Returns whether the mailbox contains queued communications */
index b653f1b..7791cd7 100644 (file)
@@ -47,7 +47,7 @@ class XBT_PUBLIC Mutex {
 #endif
 
 public:
-  /** Constructs a new mutex */
+  /** \static Constructs a new mutex */
   static MutexPtr create();
   void lock();
   void unlock();
index a4979d4..97ecfbb 100644 (file)
@@ -93,7 +93,9 @@ private:
 #endif
 
 public:
+  /** \static Add a callback fired on each newly created NetZone */
   static void on_creation_cb(const std::function<void(NetZone const&)>& cb) { on_creation.connect(cb); }
+  /** \static Add a callback fired on each newly sealed NetZone */
   static void on_seal_cb(const std::function<void(NetZone const&)>& cb) { on_seal.connect(cb); }
 
   /**
index 99089a7..4c16f7a 100644 (file)
@@ -45,7 +45,7 @@ class XBT_PUBLIC Semaphore {
 #endif
 
 public:
-  /** Constructs a new semaphore */
+  /** \static Constructs a new semaphore */
   static SemaphorePtr create(unsigned int initial_capacity);
 
   void acquire();
index 680bbf5..6733ba3 100644 (file)
@@ -96,49 +96,66 @@ public:
   State get_state() const;
 
   /* Callbacks on signals */
+  /*! \static Add a callback fired when any VM is created */
   static void on_creation_cb(const std::function<void(VirtualMachine&)>& cb) { on_vm_creation.connect(cb); }
+  /*! \static Add a callback fired when any VM starts */
   static void on_start_cb(const std::function<void(VirtualMachine const&)>& cb) { on_start.connect(cb); }
+  /*! Add a callback fired when this specific VM starts */
   void on_this_start_cb(const std::function<void(VirtualMachine const&)>& cb)
   {
     on_this_start.connect(cb);
   }
+  /*! \static Add a callback fired when any VM is actually started */
   static void on_started_cb(const std::function<void(VirtualMachine const&)>& cb) { on_started.connect(cb); }
+  /*! Add a callback fired when this specific VM is actually started */
   void on_this_started_cb(const std::function<void(VirtualMachine const&)>& cb)
   {
     on_this_started.connect(cb);
   }
+  /*! \static Add a callback fired when any VM is shut down */
   static void on_shutdown_cb(const std::function<void(VirtualMachine const&)>& cb) { on_shutdown.connect(cb); }
+  /*! Add a callback fired when this specific VM is shut down */
   void on_this_shutdown_cb(const std::function<void(VirtualMachine const&)>& cb)
   {
     on_this_shutdown.connect(cb);
   }
+  /*! \static Add a callback fired when any VM is suspended*/
   static void on_suspend_cb(const std::function<void(VirtualMachine const&)>& cb) { on_suspend.connect(cb); }
+  /*! Add a callback fired when this specific VM is suspended*/
   void on_this_suspend_cb(const std::function<void(VirtualMachine const&)>& cb)
   {
     on_this_suspend.connect(cb);
   }
+  /*! \static Add a callback fired when any VM is resumed*/
   static void on_resume_cb(const std::function<void(VirtualMachine const&)>& cb) { on_resume.connect(cb); }
+  /*! Add a callback fired when this specific VM is resumed*/
   void on_this_resume_cb(const std::function<void(VirtualMachine const&)>& cb)
   {
     on_this_resume.connect(cb);
   }
+  /*! \static Add a callback fired when any VM is destroyed*/
   static void on_destruction_cb(const std::function<void(VirtualMachine const&)>& cb) { on_vm_destruction.connect(cb); }
+  /*! Add a callback fired when this specific VM is destroyed*/
   void on_this_destruction_cb(const std::function<void(VirtualMachine const&)>& cb)
   {
     on_this_vm_destruction.connect(cb);
   }
+  /*! \static Add a callback fired when any VM starts a migration*/
   static void on_migration_start_cb(const std::function<void(VirtualMachine const&)>& cb)
   {
     on_migration_start.connect(cb);
   }
+  /*! Add a callback fired when this specific VM starts a migration*/
   void on_this_migration_start_cb(const std::function<void(VirtualMachine const&)>& cb)
   {
     on_this_migration_start.connect(cb);
   }
+  /*! \static Add a callback fired when any VM ends a migration*/
   static void on_migration_end_cb(const std::function<void(VirtualMachine const&)>& cb)
   {
     on_migration_end.connect(cb);
   }
+  /*! Add a callback fired when this specific VM ends a migration*/
   void on_this_migration_end_cb(const std::function<void(VirtualMachine const&)>& cb)
   {
     on_this_migration_end.connect(cb);