lua_pushstring(L, "sharing_policy");
type = lua_gettable(L, -2);
const char* policy = lua_tostring(L, -1);
- if (policy && !strcmp(policy,"FULLDUPLEX")) {
+ if (policy && not strcmp(policy, "FULLDUPLEX")) {
link.policy = SURF_LINK_FULLDUPLEX;
- } else if (policy && !strcmp(policy,"FATPIPE")) {
+ } else if (policy && not strcmp(policy, "FATPIPE")) {
link.policy = SURF_LINK_FATPIPE;
} else {
link.policy = SURF_LINK_SHARED;
// get core
lua_pushstring(L, "core");
lua_gettable(L, -2);
- if(!lua_isnumber(L,-1))
- host.core_amount = 1;// Default value
+ if (not lua_isnumber(L, -1))
+ host.core_amount = 1; // Default value
else
host.core_amount = lua_tonumber(L, -1);
if (host.core_amount == 0)
lua_gettable(L, -2);
policy = lua_tostring(L, -1);
lua_pop(L, 1);
- if (policy && !strcmp(policy,"FULLDUPLEX")) {
+ if (policy && not strcmp(policy, "FULLDUPLEX")) {
link.policy = SURF_LINK_FULLDUPLEX;
- } else if (policy && !strcmp(policy,"FATPIPE")) {
+ } else if (policy && not strcmp(policy, "FATPIPE")) {
link.policy = SURF_LINK_FATPIPE;
} else {
link.policy = SURF_LINK_SHARED;
lua_pop(L, 1);
int mode_int = A_surfxml_AS_routing_None;
- if(!strcmp(mode,"Full")) mode_int = A_surfxml_AS_routing_Full;
- else if(!strcmp(mode,"Floyd")) mode_int = A_surfxml_AS_routing_Floyd;
- else if(!strcmp(mode,"Dijkstra")) mode_int = A_surfxml_AS_routing_Dijkstra;
- else if(!strcmp(mode,"DijkstraCache")) mode_int = A_surfxml_AS_routing_DijkstraCache;
- else if(!strcmp(mode,"Vivaldi")) mode_int = A_surfxml_AS_routing_Vivaldi;
- else if(!strcmp(mode,"Cluster")) mode_int = A_surfxml_AS_routing_Cluster;
- else if(!strcmp(mode,"none")) mode_int = A_surfxml_AS_routing_None;
+ if (not strcmp(mode, "Full"))
+ mode_int = A_surfxml_AS_routing_Full;
+ else if (not strcmp(mode, "Floyd"))
+ mode_int = A_surfxml_AS_routing_Floyd;
+ else if (not strcmp(mode, "Dijkstra"))
+ mode_int = A_surfxml_AS_routing_Dijkstra;
+ else if (not strcmp(mode, "DijkstraCache"))
+ mode_int = A_surfxml_AS_routing_DijkstraCache;
+ else if (not strcmp(mode, "Vivaldi"))
+ mode_int = A_surfxml_AS_routing_Vivaldi;
+ else if (not strcmp(mode, "Cluster"))
+ mode_int = A_surfxml_AS_routing_Cluster;
+ else if (not strcmp(mode, "none"))
+ mode_int = A_surfxml_AS_routing_None;
else xbt_die("Don't have the model name '%s'",mode);
s_sg_platf_AS_cbarg_t AS;