Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
cosmetics
[simgrid.git] / src / surf / cpu_cas01.cpp
index 25635b0..6d8ca3c 100644 (file)
@@ -53,7 +53,7 @@ CpuCas01Model::CpuCas01Model() : simgrid::surf::CpuModel()
     xbt_die("Unsupported optimization (%s) for this model", optim.c_str());
   }
 
-  maxminSystem_ = new simgrid::kernel::lmm::s_lmm_system_t(selectiveUpdate_);
+  maxminSystem_ = new simgrid::kernel::lmm::System(selectiveUpdate_);
 
   if (getUpdateMechanism() == UM_LAZY) {
     modifiedSet_ = new ActionLmmList();
@@ -63,10 +63,6 @@ CpuCas01Model::CpuCas01Model() : simgrid::surf::CpuModel()
 
 CpuCas01Model::~CpuCas01Model()
 {
-  delete maxminSystem_;
-  maxminSystem_ = nullptr;
-  delete modifiedSet_;
-
   surf_cpu_model_pm = nullptr;
 }
 
@@ -160,10 +156,11 @@ void CpuCas01::apply_event(tmgr_trace_event_t event, double value)
 }
 
 /** @brief Start a new execution on this CPU lasting @param size flops and using one core */
-CpuAction *CpuCas01::execution_start(double size)
+CpuActionCpuCas01::execution_start(double size)
 {
   return new CpuCas01Action(model(), size, isOff(), speed_.scale * speed_.peak, constraint());
 }
+
 CpuAction* CpuCas01::execution_start(double size, int requestedCores)
 {
   return new CpuCas01Action(model(), size, isOff(), speed_.scale * speed_.peak, constraint(), requestedCores);
@@ -177,9 +174,9 @@ CpuAction *CpuCas01::sleep(double duration)
   XBT_IN("(%s,%g)", getCname(), duration);
   CpuCas01Action* action = new CpuCas01Action(model(), 1.0, isOff(), speed_.scale * speed_.peak, constraint());
 
-  // FIXME: sleep variables should not consume 1.0 in lmm_expand
+  // FIXME: sleep variables should not consume 1.0 in System::expand()
   action->setMaxDuration(duration);
-  action->suspended_ = 2;
+  action->suspended_ = Action::SuspendStates::sleeping;
   if (duration < 0) { // NO_MAX_DURATION
     /* Move to the *end* of the corresponding action set. This convention is used to speed up update_resource_state */
     simgrid::xbt::intrusive_erase(*action->getStateSet(), *action);