Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Give a p_netcard to simgrid::Host instead of relying on extensions for that
[simgrid.git] / src / simgrid / host.cpp
index fdcc132..002e68c 100644 (file)
@@ -73,7 +73,7 @@ void sg_host_init()
   });
 
   ROUTING_HOST_LEVEL = simgrid::Host::extension_create([](void *p) {
-         delete static_cast<simgrid::surf::RoutingEdge*>(p);
+         delete static_cast<simgrid::surf::NetCard*>(p);
   });
 
   SD_HOST_LEVEL = simgrid::Host::extension_create(__SD_workstation_destroy);
@@ -124,27 +124,6 @@ void sg_host_simix_destroy(sg_host_t host) {
   host->extension_set(SIMIX_HOST_LEVEL, nullptr);
 }
 
-// ========== SURF CPU ============
-surf_cpu_t sg_host_surfcpu(sg_host_t host) {
-       return host->p_cpu;
-}
-void sg_host_surfcpu_set(sg_host_t host, surf_cpu_t cpu) {
-  host->p_cpu = cpu;
-}
-void sg_host_surfcpu_destroy(sg_host_t host) {
-  host->p_cpu = nullptr;
-}
-// ========== RoutingEdge ============
-surf_RoutingEdge *sg_host_edge(sg_host_t host) {
-       return (surf_RoutingEdge*) host->extension(ROUTING_HOST_LEVEL);
-}
-void sg_host_edge_set(sg_host_t host, surf_RoutingEdge *edge) {
-  host->extension_set(ROUTING_HOST_LEVEL, edge);
-}
-void sg_host_edge_destroy(sg_host_t host, int do_callback) {
-  host->extension_set(ROUTING_HOST_LEVEL, nullptr, do_callback);
-}
-
 // =========== user-level functions ===============
 // ================================================
 double sg_host_get_speed(sg_host_t host){