X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/43f7ca1cac5ab1858e318fdd6239d0a0c3b3d893..eb4459dd21b398be96f0e1eab67d1e49b9b6124a:/src/smpi/internals/smpi_dvfs.cpp diff --git a/src/smpi/internals/smpi_dvfs.cpp b/src/smpi/internals/smpi_dvfs.cpp index f83165f541..9d2c98d076 100644 --- a/src/smpi/internals/smpi_dvfs.cpp +++ b/src/smpi/internals/smpi_dvfs.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2013-2017. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2013-2018. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -24,7 +24,7 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_dvfs, smpi, "Logging specific to SMPI (expe */ double smpi_get_host_power_peak_at(int pstate_index) { - return sg_host_self()->getPstateSpeed(pstate_index); + return sg_host_self()->get_pstate_speed(pstate_index); } /** @@ -34,7 +34,7 @@ double smpi_get_host_power_peak_at(int pstate_index) */ double smpi_get_host_current_power_peak() { - return sg_host_self()->getSpeed(); + return sg_host_self()->get_speed(); } /** @@ -76,46 +76,45 @@ typedef int integer; typedef long int integer; #endif typedef char *address; -typedef short int shortint; typedef float real; typedef double doublereal; -typedef struct { +struct complex { real r; real i; -} complex; -typedef struct { +}; +struct doublecomplex { doublereal r; doublereal i; -} doublecomplex; +}; -extern "C" XBT_PUBLIC(doublereal) smpi_get_host_power_peak_at_(integer *pstate_index); +extern "C" XBT_PUBLIC doublereal smpi_get_host_power_peak_at_(integer* pstate_index); doublereal smpi_get_host_power_peak_at_(integer *pstate_index) { - return static_cast(smpi_get_host_power_peak_at((int)*pstate_index)); + return static_cast(sg_host_self()->get_pstate_speed((int)*pstate_index)); } -extern "C" XBT_PUBLIC(doublereal) smpi_get_host_current_power_peak_(); +extern "C" XBT_PUBLIC doublereal smpi_get_host_current_power_peak_(); doublereal smpi_get_host_current_power_peak_() { - return smpi_get_host_current_power_peak(); + return sg_host_self()->get_speed(); } -extern "C" XBT_PUBLIC(integer) smpi_get_host_nb_pstates_(); +extern "C" XBT_PUBLIC integer smpi_get_host_nb_pstates_(); integer smpi_get_host_nb_pstates_() { - return static_cast(smpi_get_host_nb_pstates()); + return static_cast(sg_host_self()->get_pstate_count()); } -extern "C" XBT_PUBLIC(void) smpi_set_host_pstate_(integer *pstate_index); +extern "C" XBT_PUBLIC void smpi_set_host_pstate_(integer* pstate_index); void smpi_set_host_pstate_(integer *pstate_index) { - smpi_set_host_pstate(static_cast(*pstate_index)); + sg_host_set_pstate(sg_host_self(), (static_cast(*pstate_index))); } -extern "C" XBT_PUBLIC(doublereal) smpi_get_host_consumed_energy_(); +extern "C" XBT_PUBLIC doublereal smpi_get_host_consumed_energy_(); doublereal smpi_get_host_consumed_energy_() { - return static_cast(smpi_get_host_consumed_energy()); + return static_cast(sg_host_get_consumed_energy(sg_host_self())); } #endif