Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Update copyright lines for 2022.
[simgrid.git] / examples / cpp / engine-filtering / s4u-engine-filtering.cpp
index ac510a6..294b7ab 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2017-2021. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2017-2022. 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. */
@@ -49,7 +49,7 @@ public:
 
   bool operator()(simgrid::s4u::Host* host) { return host->get_pstate() != host_list.at(host); }
 
-  double get_old_speed(simgrid::s4u::Host* host) { return host_list.at(host); }
+  unsigned long get_old_speed_state(simgrid::s4u::Host* host) { return host_list.at(host); }
 };
 }
 int main(int argc, char* argv[])
@@ -81,7 +81,7 @@ int main(int argc, char* argv[])
 
   for (auto& host : list)
     XBT_INFO("The following hosts changed their frequency: %s (from %.1ff to %.1ff)", host->get_cname(),
-             host->get_pstate_speed(filter.get_old_speed(host)), host->get_speed());
+             host->get_pstate_speed(filter.get_old_speed_state(host)), host->get_speed());
 
   /* You can also just use any regular function (namespaced on need) to filter  */
   list = e.get_filtered_hosts(filter::filter_speed_more_than_50Mf);