Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
cosmetics in doxygen comments
authorMartin Quinson <martin.quinson@loria.fr>
Mon, 20 Jul 2015 09:53:13 +0000 (11:53 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Mon, 20 Jul 2015 10:03:47 +0000 (12:03 +0200)
And kill dead code and other useless cosmetics

src/surf/host_interface.hpp
src/surf/host_ptask_L07.cpp
src/surf/vm_interface.hpp

index 5752a64..b9958c4 100644 (file)
@@ -25,26 +25,22 @@ class HostAction;
  *************/
 
 /** @ingroup SURF_callbacks
- * @brief Callbacks handler which emit the callbacks after Host creation *
- * @details Callback functions have the following signature: `void(HostPtr)`
+ * @brief Callbacks fired after Host creation. Signature: `void(Host*)`
  */
 XBT_PUBLIC_DATA(surf_callback(void, Host*)) hostCreatedCallbacks;
 
 /** @ingroup SURF_callbacks
- * @brief Callbacks handler which emit the callbacks after Host destruction *
- * @details Callback functions have the following signature: `void(HostPtr)`
+ * @brief Callbacks fired Host destruction. Signature: `void(Host*)`
  */
 XBT_PUBLIC_DATA(surf_callback(void, Host*)) hostDestructedCallbacks;
 
 /** @ingroup SURF_callbacks
- * @brief Callbacks handler which emit the callbacks after Host State changed *
- * @details Callback functions have the following signature: `void(HostAction *action, e_surf_resource_state_t old, e_surf_resource_state_t current)`
+ * @brief Callbacks fired after Host State changed. Signature: `void(Host *, e_surf_resource_state_t old, e_surf_resource_state_t current)`
  */
 XBT_PUBLIC_DATA(surf_callback(void, Host*, e_surf_resource_state_t, e_surf_resource_state_t)) hostStateChangedCallbacks;
 
 /** @ingroup SURF_callbacks
- * @brief Callbacks handler which emit the callbacks after HostAction State changed *
- * @details Callback functions have the following signature: `void(HostAction *action, e_surf_resource_state_t old, e_surf_resource_state_t current)`
+ * @brief Callbacks fired HostAction State changed. Signature: `void(HostAction *, e_surf_action_state_t old, e_surf_action_state_t current)`
  */
 XBT_PUBLIC_DATA(surf_callback(void, HostAction*, e_surf_action_state_t, e_surf_action_state_t)) hostActionStateChangedCallbacks;
 
@@ -64,58 +60,28 @@ XBT_PUBLIC(void) host_add_traces();
  */
 class HostModel : public Model {
 public:
-    /**
-   * @brief HostModel constructor
-   *
-   * @param name the name of the model
-   */
+  /** @brief Constructor */
   HostModel(const char *name);
 
-  /** @brief HostModel constructor */
+  /** @brief Constructor */
   HostModel();
 
-  /** @brief HostModel destructor */
+  /** @brief Destructor */
   ~HostModel();
 
   virtual Host *createHost(const char *name)=0;
   void addTraces(){DIE_IMPOSSIBLE;}
 
-  /**
-   * @brief [brief description]
-   * @details [long description]
-   */
   virtual void adjustWeightOfDummyCpuActions();
-
-  /**
-   * @brief [brief description]
-   * @details [long description]
-   *
-   * @param host_nb [description]
-   * @param host_list [description]
-   * @param flops_amount [description]
-   * @param bytes_amount [description]
-   * @param rate [description]
-   * @return [description]
-   */
   virtual Action *executeParallelTask(int host_nb,
                                         void **host_list,
                                         double *flops_amount,
                                         double *bytes_amount,
                                         double rate)=0;
 
- /**
-  * @brief [brief description]
-  * @details [long description]
-  *
-  * @param src [description]
-  * @param dst [description]
-  * @param size [description]
-  * @param rate [description]
-  * @return [description]
-  */
- virtual Action *communicate(Host *src, Host *dst, double size, double rate)=0;
-
- CpuModel *p_cpuModel;
+  virtual Action *communicate(Host *src, Host *dst, double size, double rate)=0;
+
+  CpuModel *p_cpuModel;
 };
 
 /************
index ea1518c..634fd2a 100644 (file)
@@ -288,7 +288,7 @@ Host *HostL07Model::createHost(const char *name)
 
   xbt_lib_set(host_lib, name, SURF_HOST_LEVEL, wk);
 
-  return wk;//FIXME:xbt_lib_get_elm_or_null(host_lib, name);
+  return wk;
 }
 
 Action *HostL07Model::communicate(Host *src, Host *dst,
@@ -346,23 +346,19 @@ Link* NetworkL07Model::createLink(const char *name,
                                  tmgr_trace_t bw_trace,
                                  double lat_initial,
                                  tmgr_trace_t lat_trace,
-                                 e_surf_resource_state_t
-                                 state_initial,
+                                 e_surf_resource_state_t state_initial,
                                  tmgr_trace_t state_trace,
                                  e_surf_link_sharing_policy_t policy,
                                  xbt_dict_t properties)
 {
   xbt_assert(!Link::byName(name),
-                     "Link '%s' declared several times in the platform file.",
-                     name);
+                "Link '%s' declared several times in the platform file.", name);
 
-  LinkL07 *nw_link = new LinkL07(this, name, properties,
-                                      bw_initial, bw_trace,
-                                      lat_initial, lat_trace,
-                                      state_initial, state_trace,
-                                      policy);
-
-  return nw_link;
+  return new LinkL07(this, name, properties,
+                            bw_initial, bw_trace,
+                                        lat_initial, lat_trace,
+                                        state_initial, state_trace,
+                                        policy);
 }
 
 void HostL07Model::addTraces()
@@ -531,7 +527,7 @@ void CpuL07::updateState(tmgr_trace_event_t event_type, double value, double /*d
   return;
 }
 
-void LinkL07::updateState(tmgr_trace_event_t event_type, double value, double date){
+void LinkL07::updateState(tmgr_trace_event_t event_type, double value, double date) {
   XBT_DEBUG("Updating link %s (%p) with value=%f for date=%g", getName(), this, value, date);
   if (event_type == p_bwEvent) {
     updateBandwidth(value, date);
@@ -555,8 +551,7 @@ void LinkL07::updateState(tmgr_trace_event_t event_type, double value, double da
   return;
 }
 
-e_surf_resource_state_t HostL07::getState()
-{
+e_surf_resource_state_t HostL07::getState() {
   return p_cpu->getState();
 }
 
index 0dede2e..e221713 100644 (file)
@@ -24,20 +24,17 @@ class VM;
  *************/
 
 /** @ingroup SURF_callbacks
- * @brief Callbacks handler which emit the callbacks after VM creation *
- * @details Callback functions have the following signature: `void(VMPtr)`
+ * @brief Callbacks fired after VM creation. Signature: `void(VM*)`
  */
 extern surf_callback(void, VM*) VMCreatedCallbacks;
 
 /** @ingroup SURF_callbacks
- * @brief Callbacks handler which emit the callbacks after VM destruction *
- * @details Callback functions have the following signature: `void(VMPtr)`
+ * @brief Callbacks fired after VM destruction. Signature: `void(VM*)`
  */
 extern surf_callback(void, VM*) VMDestructedCallbacks;
 
 /** @ingroup SURF_callbacks
- * @brief Callbacks handler which emit the callbacks after VM State changed *
- * @details Callback functions have the following signature: `void(VMActionPtr)`
+ * @brief Callbacks after VM State changes. Signature: `void(VMAction*)`
  */
 extern surf_callback(void, VM*) VMStateChangedCallbacks;
 
@@ -65,9 +62,7 @@ public:
   virtual VM *createVM(const char *name, surf_resource_t host_PM)=0;
   void adjustWeightOfDummyCpuActions() {};
 
-  typedef boost::intrusive::list<VM,
-                                 boost::intrusive::constant_time_size<false> >
-          vm_list_t;
+  typedef boost::intrusive::list<VM, boost::intrusive::constant_time_size<false> > vm_list_t;
   static vm_list_t ws_vms;
 };
 
@@ -101,37 +96,25 @@ public:
 
   void setState(e_surf_resource_state_t state);
 
-  /**
-   * @brief Suspend the VM
-   */
+  /** @brief Suspend the VM */
   virtual void suspend()=0;
 
-  /**
-   * @brief Resume the VM
-   */
+  /** @brief Resume the VM */
   virtual void resume()=0;
 
-  /**
-   * @brief Save the VM (Not yet implemented)
-   */
+  /** @brief Save the VM (Not yet implemented) */
   virtual void save()=0;
 
-  /**
-   * @brief Restore the VM (Not yet implemented)
-   */
+  /** @brief Restore the VM (Not yet implemented) */
   virtual void restore()=0;
 
-  /**
-   * @brief Migrate the VM to the destination host
+  /** @brief Migrate the VM to the destination host
    *
    * @param ind_vm_ws_dest The destination host
    */
   virtual void migrate(surf_resource_t ind_vm_ws_dest)=0;
 
-  /**
-   * @brief Get the physical machine hosting the VM
-   * @return The physical machine hosting the VM
-   */
+  /** @brief Get the physical machine hosting the VM */
   virtual surf_resource_t getPm()=0;
 
   virtual void setBound(double bound)=0;