trace_ = 0;
/* no availability file, fixed trace */
- if (!speedTrace) {
+ if (not speedTrace) {
type_ = TRACE_FIXED;
value_ = value;
XBT_DEBUG("No availability trace. Constant value = %f", value);
{
xbt_assert(low < high, "Wrong parameters: low (%d) should be smaller than high (%d)", low, high);
- int mid;
do {
- mid = low + (high - low) / 2;
+ int mid = low + (high - low) / 2;
XBT_DEBUG("a %f low %d high %d mid %d value %f", a, low, high, mid, array[mid]);
if (array[mid] > a)
void surf_cpu_model_init_ti()
{
- xbt_assert(!surf_cpu_model_pm,"CPU model already initialized. This should not happen.");
- xbt_assert(!surf_cpu_model_vm,"CPU model already initialized. This should not happen.");
+ xbt_assert(not surf_cpu_model_pm, "CPU model already initialized. This should not happen.");
+ xbt_assert(not surf_cpu_model_vm, "CPU model already initialized. This should not happen.");
surf_cpu_model_pm = new simgrid::surf::CpuTiModel();
all_existing_models->push_back(surf_cpu_model_pm);
if (trace && trace->event_list.size() > 1) {
trace_mgr::DatedValue val = trace->event_list.back();
if (val.date_ < 1e-12)
- speed_.event = future_evt_set->add_trace(tmgr_empty_trace_new(), this);
+ speed_.event = future_evt_set->add_trace(new simgrid::trace_mgr::trace(), this);
}
}
CpuTiAction *action;
double sum_priority = 0.0;
double total_area;
- double min_finish = -1;
/* update remaining amount of actions */
updateRemainingAmount(now);
for(ActionTiList::iterator it(actionSet_->begin()), itend(actionSet_->end()) ; it != itend ; ++it) {
action = &*it;
- min_finish = -1;
+ double min_finish = -1;
/* action not running, skip it */
if (action->getStateSet() != surf_cpu_model_pm->getRunningActionSet())
continue;
bool CpuTi::isUsed()
{
- return !actionSet_->empty();
+ return not actionSet_->empty();
}
double CpuTi::getAvailableSpeed()
void CpuTi::modified(bool modified){
CpuTiList* modifiedCpu = static_cast<CpuTiModel*>(model())->modifiedCpu_;
if (modified) {
- if (!cpu_ti_hook.is_linked()) {
+ if (not cpu_ti_hook.is_linked()) {
modifiedCpu->push_back(*this);
}
} else {
int CpuTiAction::unref()
{
refcount_--;
- if (!refcount_) {
+ if (not refcount_) {
if (action_hook.is_linked())
getStateSet()->erase(getStateSet()->iterator_to(*this));
/* remove from action_set */