surf_network_model = new NetworkCm02Model();
net_define_callbacks();
- ModelPtr model = static_cast<ModelPtr>(surf_network_model);
+ ModelPtr model = surf_network_model;
xbt_dynar_push(model_list, &model);
xbt_cfg_setdefault_double(_sg_cfg_set, "network/latency_factor",
surf_network_model = new NetworkCm02Model();
net_define_callbacks();
- ModelPtr model = static_cast<ModelPtr>(surf_network_model);
+ ModelPtr model = surf_network_model;
xbt_dynar_push(model_list, &model);
xbt_cfg_setdefault_double(_sg_cfg_set, "network/latency_factor", 1.0);
surf_network_model = new NetworkCm02Model();
net_define_callbacks();
- ModelPtr model = static_cast<ModelPtr>(surf_network_model);
+ ModelPtr model = surf_network_model;
xbt_dynar_push(model_list, &model);
lmm_set_default_protocol_function(func_reno_f, func_reno_fp,
func_reno_fpi);
surf_network_model = new NetworkCm02Model();
net_define_callbacks();
- ModelPtr model = static_cast<ModelPtr>(surf_network_model);
+ ModelPtr model = surf_network_model;
xbt_dynar_push(model_list, &model);
lmm_set_default_protocol_function(func_reno2_f, func_reno2_fp,
func_reno2_fpi);
surf_network_model = new NetworkCm02Model();
net_define_callbacks();
- ModelPtr model = static_cast<ModelPtr>(surf_network_model);
+ ModelPtr model = surf_network_model;
xbt_dynar_push(model_list, &model);
lmm_set_default_protocol_function(func_vegas_f, func_vegas_fp,
func_vegas_fpi);
p_maxminSystem = lmm_system_new(m_selectiveUpdate);
const char* lb_name = "__loopback__";
- routing_model_create(static_cast<ResourcePtr>(createNetworkLink(lb_name,
+ routing_model_create(createNetworkLink(lb_name,
498000000, NULL, 0.000015, NULL,
SURF_RESOURCE_ON, NULL,
- SURF_LINK_FATPIPE, NULL)));
+ SURF_LINK_FATPIPE, NULL));
if (p_updateMechanism == UM_LAZY) {
p_actionHeap = xbt_heap_new(8, NULL);
state_initial, state_trace, bw_initial, bw_trace, lat_initial, lat_trace, policy);
- xbt_lib_set(link_lib, name, SURF_LINK_LEVEL, static_cast<ResourcePtr>(nw_link));
+ xbt_lib_set(link_lib, name, SURF_LINK_LEVEL, nw_link);
XBT_DEBUG("Create link '%s'",name);
return nw_link;
constraints_per_variable += xbt_dynar_length(back_route);
if (action->m_latency > 0) {
- action->p_variable = lmm_variable_new(p_maxminSystem, static_cast<ActionPtr>(action), 0.0, -1.0,
+ action->p_variable = lmm_variable_new(p_maxminSystem, action, 0.0, -1.0,
constraints_per_variable);
if (p_updateMechanism == UM_LAZY) {
// add to the heap the event when the latency is payed
action->heapInsert(p_actionHeap, action->m_latency + action->m_lastUpdate, xbt_dynar_is_empty(route) ? NORMAL : LATENCY);
}
} else
- action->p_variable = lmm_variable_new(p_maxminSystem, static_cast<ActionPtr>(action), 1.0, -1.0, constraints_per_variable);
+ action->p_variable = lmm_variable_new(p_maxminSystem, action, 1.0, -1.0, constraints_per_variable);
if (action->m_rate < 0) {
lmm_update_variable_bound(p_maxminSystem, action->getVariable(), (action->m_latCurrent > 0) ? sg_tcp_gamma / (2.0 * action->m_latCurrent) : -1.0);
"Cannot connect trace %s to link %s: trace undefined",
trace_name, elm);
- link->p_stateEvent = tmgr_history_add_trace(history, trace, 0.0, 0, static_cast<ResourcePtr>(link));
+ link->p_stateEvent = tmgr_history_add_trace(history, trace, 0.0, 0, link);
}
xbt_dict_foreach(trace_connect_list_bandwidth, cursor, trace_name, elm) {
"Cannot connect trace %s to link %s: trace undefined",
trace_name, elm);
- link->p_power.event = tmgr_history_add_trace(history, trace, 0.0, 0, static_cast<ResourcePtr>(link));
+ link->p_power.event = tmgr_history_add_trace(history, trace, 0.0, 0, link);
}
xbt_dict_foreach(trace_connect_list_latency, cursor, trace_name, elm) {
"Cannot connect trace %s to link %s: trace undefined",
trace_name, elm);
- link->p_latEvent = tmgr_history_add_trace(history, trace, 0.0, 0, static_cast<ResourcePtr>(link));
+ link->p_latEvent = tmgr_history_add_trace(history, trace, 0.0, 0, link);
}
}
p_power.scale = 1.0;
p_power.peak = metric_peak;
if (metric_trace)
- p_power.event = tmgr_history_add_trace(history, metric_trace, 0.0, 0, static_cast<ResourcePtr>(this));
+ p_power.event = tmgr_history_add_trace(history, metric_trace, 0.0, 0, this);
else
p_power.event = NULL;
m_latCurrent = lat_initial;
if (lat_trace)
- p_latEvent = tmgr_history_add_trace(history, lat_trace, 0.0, 0, static_cast<ResourcePtr>(this));
+ p_latEvent = tmgr_history_add_trace(history, lat_trace, 0.0, 0, this);
if (policy == SURF_LINK_FATPIPE)
lmm_constraint_shared(getConstraint());