*********/
/* Helper function for executeParallelTask */
-static inline double has_cost(double* array, int pos)
+static inline double has_cost(double* array, size_t pos)
{
if (array)
return array[pos];
return -1.0;
}
-kernel::resource::Action* HostModel::execute_parallel(int host_nb, s4u::Host** host_list, double* flops_amount,
+kernel::resource::Action* HostModel::execute_parallel(size_t host_nb, s4u::Host** host_list, double* flops_amount,
double* bytes_amount, double rate)
{
kernel::resource::Action* action = nullptr;
int nb = 0;
double value = 0.0;
- for (int i = 0; i < host_nb * host_nb; i++) {
+ for (size_t i = 0; i < host_nb * host_nb; i++) {
if (has_cost(bytes_amount, i) > 0.0) {
nb++;
value = has_cost(bytes_amount, i);
{
for (auto const& arg : actors_at_boot_) {
XBT_DEBUG("Booting Actor %s(%s) right now", arg->name.c_str(), arg->host->get_cname());
- smx_actor_t actor =
- SIMIX_process_create(arg->name.c_str(), arg->code, nullptr, arg->host, arg->properties.get(), nullptr);
+ simgrid::kernel::actor::ActorImplPtr actor = simgrid::kernel::actor::ActorImpl::create(
+ arg->name.c_str(), arg->code, nullptr, arg->host, arg->properties.get(), nullptr);
if (arg->kill_time >= 0)
- simcall_process_set_kill_time(actor, arg->kill_time);
+ actor->set_kill_time(arg->kill_time);
if (arg->auto_restart)
actor->auto_restart_ = arg->auto_restart;
if (arg->daemon_)
res.push_back(actor.ciface());
return res;
}
-int HostImpl::get_actor_count()
+size_t HostImpl::get_actor_count()
{
return process_list_.size();
}