Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Platform generation : add promotion functions
[simgrid.git] / src / surf / platf_generator.c
index 9d89091..6288b5b 100644 (file)
@@ -221,6 +221,19 @@ void platf_graph_interconnect_exponential(double alpha) {
   }
 }
 
+void platf_graph_promote_to_host(xbt_node_t node, sg_platf_host_cbarg_t parameters) {
+  context_node_t node_data = (context_node_t) xbt_graph_node_get_data(node);
+  node_data->kind = HOST;
+  memcpy(&(node_data->host_parameters), parameters, sizeof(s_sg_platf_host_cbarg_t));
+}
+
+void platf_graph_promote_to_cluster(xbt_node_t node, sg_platf_cluster_cbarg_t parameters) {
+  context_node_t node_data = (context_node_t) xbt_graph_node_get_data(node);
+  node_data->kind = CLUSTER;
+  memcpy(&(node_data->cluster_parameters), parameters, sizeof(s_sg_platf_cluster_cbarg_t));
+}
+
+
 /* Functions used to generate interesting random values */
 
 double random_pareto(double min, double max, double K, double P, double ALPHA) {