Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix initialization order.
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Wed, 20 Nov 2013 22:31:33 +0000 (23:31 +0100)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Wed, 20 Nov 2013 22:44:49 +0000 (23:44 +0100)
src/surf/cpu_cas01.cpp
src/surf/storage.hpp
src/surf/surf.cpp
src/surf/surf_routing.hpp
src/surf/vm_workstation.cpp
src/surf/workstation_ptask_L07.cpp

index dfbfd3e..89bd2ee 100644 (file)
@@ -200,10 +200,10 @@ void CpuCas01Model::addTraces()
  * Resource *
  ************/
 CpuCas01Lmm::CpuCas01Lmm(CpuCas01ModelPtr model, const char *name, xbt_dynar_t powerPeak,
-               int pstate, double powerScale, tmgr_trace_t powerTrace, int core,
-        e_surf_resource_state_t stateInitial, tmgr_trace_t stateTrace,
-       xbt_dict_t properties) :
-       CpuLmm(model, name, properties), Resource(model, name, properties) {
+                         int pstate, double powerScale, tmgr_trace_t powerTrace, int core,
+                         e_surf_resource_state_t stateInitial, tmgr_trace_t stateTrace,
+                         xbt_dict_t properties) :
+       Resource(model, name, properties), CpuLmm(model, name, properties) {
   m_powerPeak = xbt_dynar_get_as(powerPeak, pstate, double);
   p_powerPeakList = powerPeak;
   m_pstate = pstate;
index 4692baf..91afd10 100644 (file)
@@ -103,7 +103,7 @@ class StorageAction : virtual public Action {
 public:
   StorageAction(){};
   StorageAction(ModelPtr /*model*/, double /*cost*/, bool /*failed*/, StoragePtr storage, e_surf_action_storage_type_t type)
-   : p_storage(storage), m_type(type) {};
+    : m_type(type), p_storage(storage) {};
 
 
 
index d7fec1b..2d96617 100644 (file)
@@ -419,9 +419,9 @@ void surf_exit(void)
  *********/
 
 Model::Model(string name)
: m_name(name), m_resOnCB(0), m_resOffCB(0),
-   m_actSuspendCB(0), m_actCancelCB(0), m_actResumeCB(0),
-   p_maxminSystem(0)
 : p_maxminSystem(0),  m_name(name),
+    m_resOnCB(0), m_resOffCB(0),
+    m_actCancelCB(0), m_actSuspendCB(0), m_actResumeCB(0)
 {
   ActionPtr action = NULL;
   p_readyActionSet = xbt_swag_new(xbt_swag_offset(*action, p_stateHookup));
@@ -664,7 +664,7 @@ void Model::notifyActionSuspend(ActionPtr a)
  ************/
 
 Resource::Resource(surf_model_t model, const char *name, xbt_dict_t props)
-  : m_name(xbt_strdup(name)), m_running(true), p_model(model), m_properties(props)
+  : m_name(xbt_strdup(name)), m_properties(props), p_model(model), m_running(true)
 {}
 
 Resource::Resource(){
@@ -749,9 +749,14 @@ const char *surf_action_state_names[6] = {
 Action::Action(){}
 
 Action::Action(ModelPtr model, double cost, bool failed):
-        m_cost(cost), p_model(model), m_failed(failed), m_remains(cost),
-        m_refcount(1), m_priority(1.0), m_maxDuration(NO_MAX_DURATION),
-        m_start(surf_get_clock()), m_finish(-1.0)
+         m_priority(1.0),
+         m_failed(failed),
+         m_start(surf_get_clock()), m_finish(-1.0),
+         m_remains(cost),
+         m_maxDuration(NO_MAX_DURATION),
+         m_cost(cost),
+         p_model(model),
+         m_refcount(1)
 {
   #ifdef HAVE_TRACING
     p_category = NULL;
index 8f32c8b..6f7a568 100644 (file)
@@ -82,7 +82,7 @@ public:
 class Onelink {
 public:
   Onelink(void *link, RoutingEdgePtr src, RoutingEdgePtr dst)
-   : p_link(link), p_src(src), p_dst(dst) {};
+    : p_src(src), p_dst(dst), p_link(link) {};
   RoutingEdgePtr p_src;
   RoutingEdgePtr p_dst;
   void *p_link;
index fe17e16..aa743cf 100644 (file)
@@ -181,10 +181,10 @@ double WorkstationVMModel::shareResources(double now)
 
 WorkstationVM2013Lmm::WorkstationVM2013Lmm(WorkstationVMModelPtr model, const char* name, xbt_dict_t props,
                                                   surf_resource_t ind_phys_workstation)
-  :  WorkstationVM2013(model, name, props, NULL, NULL),
-     WorkstationCLM03Lmm(model, name, props, NULL, NULL, NULL),
+  :  Resource(model, name, props),
      WorkstationCLM03(model, name, props, NULL, NULL, NULL),
-     Resource(model, name, props) {
+     WorkstationVM2013(model, name, props, NULL, NULL),
+     WorkstationCLM03Lmm(model, name, props, NULL, NULL, NULL) {
   WorkstationCLM03Ptr sub_ws = dynamic_cast<WorkstationCLM03Ptr>(
                                static_cast<ResourcePtr>(
                                  surf_workstation_resource_priv(ind_phys_workstation)));
index ce30298..2b7a591 100644 (file)
@@ -441,8 +441,8 @@ void WorkstationL07Model::addTraces()
 
 WorkstationL07::WorkstationL07(WorkstationModelPtr model, const char* name, xbt_dict_t props, RoutingEdgePtr netElm, CpuPtr cpu)
   : Resource(model, name, props),
-    WorkstationCLM03Lmm(model, name, props, NULL, netElm, cpu),
-    WorkstationCLM03(model, name, props, NULL, netElm, cpu)
+    WorkstationCLM03(model, name, props, NULL, netElm, cpu),
+    WorkstationCLM03Lmm(model, name, props, NULL, netElm, cpu)
 {
 }