XBT_ERROR("Attribute 'speed' must be specified for host and must either be a string (in the correct format; check documentation) or a number.");
}
host.speed_peak = xbt_dynar_new(sizeof(double), NULL);
- xbt_dynar_push_as(host.speed_peak, double, get_cpu_speed(lua_tostring(L, -1)));
+ xbt_dynar_push_as(host.speed_peak, double, parse_cpu_speed(lua_tostring(L, -1)));
lua_pop(L, 1);
// get core
XBT_PUBLIC_DATA(xbt_dict_t) trace_connect_list_link_bw;
XBT_PUBLIC_DATA(xbt_dict_t) trace_connect_list_link_lat;
-XBT_PUBLIC(double) get_cpu_speed(const char *power);
+XBT_PUBLIC(double) parse_cpu_speed(const char *str_speed);
XBT_PUBLIC(xbt_dict_t) get_as_router_properties(const char* name);
-int surf_get_nthreads(void);
-void surf_set_nthreads(int nthreads);
-
/*
* Returns the initial path. On Windows the initial path is
* the current directory for the current process in the other
XBT_DEBUG("Buffer: %s", buf);
host.speed_peak = xbt_dynar_new(sizeof(double), NULL);
if (strchr(buf, ',') == NULL){
- double speed = get_cpu_speed(A_surfxml_host_power);
+ double speed = parse_cpu_speed(A_surfxml_host_power);
xbt_dynar_push_as(host.speed_peak,double, speed);
}
else {
xbt_dynar_get_cpy(pstate_list, i, &speed_str);
xbt_str_trim(speed_str, NULL);
- speed = get_cpu_speed(speed_str);
+ speed = parse_cpu_speed(speed_str);
xbt_dynar_push_as(host.speed_peak, double, speed);
XBT_DEBUG("Speed value: %f", speed);
}
* With XML parser
*/
-double get_cpu_speed(const char *str_speed)
+double parse_cpu_speed(const char *str_speed)
{
double speed = 0.0;
const char *p, *q;