class XBT_PUBLIC Exec : public Activity_T<Exec> {
friend kernel::activity::ExecImpl;
bool parallel_ = false;
- double start_time_ = -1.0;
- double finish_time_ = -1.0;
protected:
explicit Exec(kernel::activity::ExecImplPtr pimpl);
Host* get_host() const;
unsigned int get_host_number() const;
- double get_start_time() const { return start_time_; }
- double get_finish_time() const { return finish_time_; }
- void set_finish_time(double finish_time) { finish_time_ = finish_time; }
+ double get_start_time() const;
+ double get_finish_time() const;
double get_cost() const;
bool is_parallel() const { return parallel_; }
bool is_assigned() const override;
surf_action_ = host_model->execute_parallel(hosts_, flops_amounts_.data(), bytes_amounts_.data(), -1);
}
surf_action_->set_activity(this);
+ start_time_ = surf_action_->get_start_time();
}
XBT_DEBUG("Create execute synchro %p: %s", this, get_cname());
state_ = State::DONE;
}
- get_iface()->set_finish_time(surf_action_->get_finish_time());
+ finish_time_ = surf_action_->get_finish_time();
clean_action();
timeout_detector_.reset();
actor::ActorImpl* actor_ = nullptr;
double sharing_penalty_ = 1.0;
double bound_ = 0.0;
+ double start_time_ = -1.0;
+ double finish_time_ = -1.0;
std::vector<s4u::Host*> hosts_;
std::vector<double> flops_amounts_;
std::vector<double> bytes_amounts_;
ExecImpl& set_bound(double bound);
ExecImpl& set_sharing_penalty(double sharing_penalty);
+ double get_start_time() const { return start_time_; }
+ double get_finish_time() const { return finish_time_; }
+
ExecImpl& set_flops_amount(double flop_amount);
ExecImpl& set_host(s4u::Host* host);
s4u::Host* get_host() const { return hosts_.front(); }
pimpl_->suspend();
state_ = State::STARTED;
- start_time_ = pimpl_->surf_action_->get_start_time();
on_start(*this);
return this;
}
return static_cast<kernel::activity::ExecImpl*>(pimpl_.get())->get_host_number();
}
+double Exec::get_start_time() const
+{
+ return static_cast<kernel::activity::ExecImpl*>(pimpl_.get())->get_start_time();
+}
+
+double Exec::get_finish_time() const
+{
+ return static_cast<kernel::activity::ExecImpl*>(pimpl_.get())->get_finish_time();
+}
+
/** @brief Change the host on which this activity takes place.
*
* The activity cannot be terminated already (but it may be started). */