From f986372d0ffe869b6586e4ea62ab6bf4beb9b9fd Mon Sep 17 00:00:00 2001 From: Frederic Suter Date: Wed, 27 Jan 2016 00:27:05 +0100 Subject: [PATCH 1/1] kill dumb function --- examples/simdag/scheduling/minmin_test.c | 6 ++---- examples/simdag/sd_test.c | 6 ++---- include/simgrid/simdag.h | 3 --- src/simdag/sd_workstation.cpp | 7 ------- 4 files changed, 4 insertions(+), 18 deletions(-) diff --git a/examples/simdag/scheduling/minmin_test.c b/examples/simdag/scheduling/minmin_test.c index 330eeba0c3..560f981fcf 100644 --- a/examples/simdag/scheduling/minmin_test.c +++ b/examples/simdag/scheduling/minmin_test.c @@ -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; } diff --git a/examples/simdag/sd_test.c b/examples/simdag/sd_test.c index eac945ea58..d773d39368 100644 --- a/examples/simdag/sd_test.c +++ b/examples/simdag/sd_test.c @@ -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); diff --git a/include/simgrid/simdag.h b/include/simgrid/simdag.h index 8fd4c49e54..7d2ac9ec2a 100644 --- a/include/simgrid/simdag.h +++ b/include/simgrid/simdag.h @@ -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); diff --git a/src/simdag/sd_workstation.cpp b/src/simdag/sd_workstation.cpp index 1413ad352e..05db7fd581 100644 --- a/src/simdag/sd_workstation.cpp +++ b/src/simdag/sd_workstation.cpp @@ -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 * -- 2.20.1