Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
kill dumb function
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Tue, 26 Jan 2016 23:27:05 +0000 (00:27 +0100)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Tue, 26 Jan 2016 23:27:05 +0000 (00:27 +0100)
examples/simdag/scheduling/minmin_test.c
examples/simdag/sd_test.c
include/simgrid/simdag.h
src/simdag/sd_workstation.cpp

index 330eeba..560f981 100644 (file)
@@ -140,14 +140,12 @@ static double finish_on_at(SD_task_t task, sg_host_t workstation)
 
     result = MAX(sg_host_get_available_at(workstation),
                last_data_available) +
-        sg_host_computation_time(workstation,
-                                            SD_task_get_amount(task));
+             SD_task_get_amount(task)/sg_host_speed(workstation);
   } else {
     xbt_dynar_free_container(&parents);
 
     result = sg_host_get_available_at(workstation) +
-        sg_host_computation_time(workstation,
-                                            SD_task_get_amount(task));
+              SD_task_get_amount(task)/sg_host_speed(workstation);
   }
   return result;
 }
index eac945e..d773d39 100644 (file)
@@ -60,11 +60,9 @@ int main(int argc, char **argv)
   communication_amount12 = 2000000;
   communication_amount21 = 3000000;
   XBT_INFO("Computation time for %f flops on %s: %f", computation_amount1,
-        name1, sg_host_computation_time(w1,
-                                                   computation_amount1));
+        name1, computation_amount1/sg_host_speed(w1));
   XBT_INFO("Computation time for %f flops on %s: %f", computation_amount2,
-        name2, sg_host_computation_time(w2,
-                                                   computation_amount2));
+        name2, computation_amount2/sg_host_speed(w2));
 
   XBT_INFO("Route between %s and %s:", name1, name2);
   route = SD_route_get_list(w1, w2);
index 8fd4c49..7d2ac9e 100644 (file)
@@ -89,9 +89,6 @@ typedef xbt_dictelm_t SD_storage_t;
  *  @see sg_host_t
  *  @{
  */
-XBT_PUBLIC(double) sg_host_computation_time(sg_host_t host,
-                                            double flops_amount);
-
 XBT_PUBLIC(const SD_link_t *) SD_route_get_list(sg_host_t src,
                                                 sg_host_t dst);
 XBT_PUBLIC(int) SD_route_get_size(sg_host_t src, sg_host_t dst);
index 1413ad3..05db7fd 100644 (file)
@@ -40,13 +40,6 @@ void __SD_storage_destroy(void *storage)
   xbt_free(s);
 }
 
-double sg_host_computation_time(sg_host_t host, double flops_amount)
-{
-  xbt_assert(flops_amount >= 0,
-              "flops_amount must be greater than or equal to zero");
-  return flops_amount / sg_host_speed(host);
-}
-
 /**
  * \brief Returns the route between two workstations
  *