A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
simplify the prototype of CpuAction::onStateChange
[simgrid.git]
/
src
/
surf
/
cpu_interface.cpp
diff --git
a/src/surf/cpu_interface.cpp
b/src/surf/cpu_interface.cpp
index
ab78cd7
..
5b31783
100644
(file)
--- a/
src/surf/cpu_interface.cpp
+++ b/
src/surf/cpu_interface.cpp
@@
-31,11
+31,7
@@
Cpu *getActionCpu(CpuAction *action) {
action->getVariable(), 0)));
}
action->getVariable(), 0)));
}
-simgrid::surf::signal<void(CpuAction*, e_surf_action_state_t, e_surf_action_state_t)> cpuActionStateChangedCallbacks;
-
-void cpu_add_traces(){
- surf_cpu_model_pm->addTraces();
-}
+simgrid::xbt::signal<void(CpuAction*, e_surf_action_state_t, e_surf_action_state_t)> cpuActionStateChangedCallbacks;
/*********
* Model *
/*********
* Model *
@@
-131,7
+127,7
@@
void CpuModel::updateActionsStateFull(double now, double delta)
/************
* Resource *
************/
/************
* Resource *
************/
-Cpu::Cpu(Model *model, simgrid::Host *host,
+Cpu::Cpu(Model *model, simgrid::
s4u::
Host *host,
xbt_dynar_t speedPeakList, int pstate,
int core, double speedPeak, double speedScale,
int initiallyOn)
xbt_dynar_t speedPeakList, int pstate,
int core, double speedPeak, double speedScale,
int initiallyOn)
@@
-139,17
+135,17
@@
Cpu::Cpu(Model *model, simgrid::Host *host,
{
}
{
}
-Cpu::Cpu(Model *model, simgrid::Host *host, lmm_constraint_t constraint,
+Cpu::Cpu(Model *model, simgrid::
s4u::
Host *host, lmm_constraint_t constraint,
xbt_dynar_t speedPeakList, int pstate,
int core, double speedPeak,
double speedScale, int initiallyOn)
xbt_dynar_t speedPeakList, int pstate,
int core, double speedPeak,
double speedScale, int initiallyOn)
- : Resource(model, host->
getN
ame().c_str(), constraint, initiallyOn)
+ : Resource(model, host->
n
ame().c_str(), constraint, initiallyOn)
, m_core(core)
, m_speedPeak(speedPeak)
, m_speedScale(speedScale)
, m_host(host)
{
, m_core(core)
, m_speedPeak(speedPeak)
, m_speedScale(speedScale)
, m_host(host)
{
- host->p_cpu = this;
+ host->p
impl
_cpu = this;
xbt_assert(m_speedScale > 0, "Available speed has to be >0");
// Copy the power peak array:
xbt_assert(m_speedScale > 0, "Available speed has to be >0");
// Copy the power peak array:
@@
-173,7
+169,7
@@
Cpu::Cpu(Model *model, simgrid::Host *host, lmm_constraint_t constraint,
int i;
for (i = 0; i < core; i++) {
/* just for a unique id, never used as a string. */
int i;
for (i = 0; i < core; i++) {
/* just for a unique id, never used as a string. */
- p_constraintCoreId[i] = bprintf("%s:%i", host->
getN
ame().c_str(), i);
+ p_constraintCoreId[i] = bprintf("%s:%i", host->
n
ame().c_str(), i);
p_constraintCore[i] = lmm_constraint_new(model->getMaxminSystem(), p_constraintCoreId[i], m_speedScale * m_speedPeak);
}
}
p_constraintCore[i] = lmm_constraint_new(model->getMaxminSystem(), p_constraintCoreId[i], m_speedScale * m_speedPeak);
}
}
@@
-349,12
+345,12
@@
void CpuAction::setAffinity(Cpu *cpu, unsigned long mask)
XBT_OUT();
}
XBT_OUT();
}
-simgrid::
surf::signal<void(simgrid::surf::CpuAction*, e_surf_action_state_t
, e_surf_action_state_t)> CpuAction::onStateChange;
+simgrid::
xbt::signal<void(simgrid::surf::CpuAction*
, e_surf_action_state_t)> CpuAction::onStateChange;
void CpuAction::setState(e_surf_action_state_t state){
void CpuAction::setState(e_surf_action_state_t state){
- e_surf_action_state_t
old
= getState();
+ e_surf_action_state_t
previous
= getState();
Action::setState(state);
Action::setState(state);
- onStateChange(this,
old, state
);
+ onStateChange(this,
previous
);
}
}
}
}