-/* Copyright (c) 2016-2018. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2016-2019. 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. */
#include "simgrid/s4u.hpp"
#include <string>
#include <xbt/RngStream.h>
-#include <xbt/ex.hpp>
#include <xbt/str.h>
-#define MAX_SIMULATION_TIME 1000
-#define PERIODIC_STABILIZE_DELAY 20
-#define PERIODIC_FIX_FINGERS_DELAY 120
-#define PERIODIC_CHECK_PREDECESSOR_DELAY 120
-#define PERIODIC_LOOKUP_DELAY 10
-#define SLEEP_DELAY 4.9999
+constexpr double MAX_SIMULATION_TIME = 1000;
+constexpr double PERIODIC_STABILIZE_DELAY = 20;
+constexpr double PERIODIC_FIX_FINGERS_DELAY = 120;
+constexpr double PERIODIC_CHECK_PREDECESSOR_DELAY = 120;
+constexpr double PERIODIC_LOOKUP_DELAY = 10;
+constexpr double SLEEP_DELAY = 4.9999;
extern int nb_bits;
extern int nb_keys;
extern int timeout;
-extern int* powers2;
class HostChord {
RngStream stream_;
std::string descr = std::string("RngSream<") + host->get_cname() + ">";
stream_ = RngStream_CreateStream(descr.c_str());
}
+ HostChord(const HostChord&) = delete;
+ HostChord& operator=(const HostChord&) = delete;
~HostChord() { RngStream_DeleteStream(&stream_); };