static double sg_host_get_available_at(sg_host_t host)
{
- HostAttribute attr = (HostAttribute)sg_host_get_data(host);
+ HostAttribute attr = (HostAttribute)sg_host_data(host);
return attr->available_at;
}
static void sg_host_set_available_at(sg_host_t host, double time)
{
- HostAttribute attr = (HostAttribute)sg_host_get_data(host);
+ HostAttribute attr = (HostAttribute)sg_host_data(host);
attr->available_at = time;
- sg_host_set_data(host, attr);
+ sg_host_data_set(host, attr);
}
static SD_task_t sg_host_get_last_scheduled_task( sg_host_t host){
- HostAttribute attr = (HostAttribute)sg_host_get_data(host);
+ HostAttribute attr = (HostAttribute)sg_host_data(host);
return attr->last_scheduled_task;
}
static void sg_host_set_last_scheduled_task(sg_host_t host, SD_task_t task){
- HostAttribute attr = (HostAttribute)sg_host_get_data(host);
+ HostAttribute attr = (HostAttribute)sg_host_data(host);
attr->last_scheduled_task=task;
- sg_host_set_data(host, attr);
+ sg_host_data_set(host, attr);
}
static xbt_dynar_t get_ready_tasks(xbt_dynar_t dax)
if (!xbt_dynar_is_empty(parents)) {
unsigned int i;
double data_available = 0.;
- double redist_time = 0;
double last_data_available;
/* compute last_data_available */
SD_task_t parent;
if (SD_task_get_kind(parent) == SD_TASK_COMM_E2E) {
sg_host_t * parent_host= SD_task_get_workstation_list(parent);
/* Estimate the redistribution time from this parent */
+ double redist_time;
if (SD_task_get_amount(parent) <= 1e-6){
redist_time= 0;
} else {
sg_host_t *hosts = sg_host_list();
for (cursor = 0; cursor < total_nhosts; cursor++)
- sg_host_set_data(hosts[cursor], xbt_new0(struct _HostAttribute, 1));
+ sg_host_data_set(hosts[cursor], xbt_new0(struct _HostAttribute, 1));
/* load the DAX file */
xbt_dynar_t dax = SD_daxload(argv[2]);
xbt_dynar_free_container(&dax);
for (cursor = 0; cursor < total_nhosts; cursor++) {
- free(sg_host_get_data(hosts[cursor]));
- sg_host_set_data(hosts[cursor], NULL);
+ free(sg_host_data(hosts[cursor]));
+ sg_host_data_set(hosts[cursor], NULL);
}
xbt_free(hosts);