Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Liveness: rename graph_state -> app_state and automaton_state -> prop_state
[simgrid.git] / src / mc / mc_hash.hpp
index 5362e180a3da761cb63be01a7ad9e221d31a493d..03110a7654c7631ce46425bcbc087cc904dfef94 100644 (file)
@@ -1,34 +1,20 @@
-/* Copyright (c) 2007-2015. The SimGrid Team.
- * All rights reserved.                                                     */
+/* Copyright (c) 2007-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. */
 
-#include <stdio.h>
-#include <stdint.h>
+#ifndef SIMGRID_MC_HASH_HPP
+#define SIMGRID_MC_HASH_HPP
 
-#include <vector>
+#include "xbt/base.h"
+#include "src/mc/mc_forward.hpp"
 
-#include "xbt/misc.h"
-#include "mc_snapshot.h"
+namespace simgrid::mc {
 
-#ifndef SIMGRID_MC_HASH_HPP
-#define SIMGRID_MC_HASH_HPP
+using hash_type = std::uint64_t;
+
+XBT_PRIVATE hash_type hash(simgrid::mc::Snapshot const& snapshot);
 
-/** \brief Hash the current state
- *  \param num_state number of states
- *  \param stacks stacks (mc_snapshot_stak_t) used fot the stack unwinding informations
- *  \result resulting hash
- * */
-XBT_INTERNAL uint64_t mc_hash_processes_state(
-  int num_state, std::vector<s_mc_snapshot_stack_t> const& stacks);
-
-/** @brief Dump the stacks of the application processes
- *
- *   This functions is currently not used but it is quite convenient
- *   to call from the debugger.
- *
- *   Does not work when an application thread is running.
- */
+} // namespace simgrid::mc
 
 #endif