Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[mc] Remove mc_set.cpp
authorGabriel Corona <gabriel.corona@loria.fr>
Thu, 16 Apr 2015 13:02:35 +0000 (15:02 +0200)
committerGabriel Corona <gabriel.corona@loria.fr>
Thu, 16 Apr 2015 13:02:35 +0000 (15:02 +0200)
It was used on disabled mc_hash code and we can now use C++ STL directly.

buildtools/Cmake/DefinePackages.cmake
src/mc/mc_hash.cpp
src/mc/mc_private.h
src/mc/mc_set.cpp [deleted file]

index 5ab062a..112140d 100644 (file)
@@ -631,7 +631,6 @@ set(MC_SRC
   src/mc/mc_request.cpp
   src/mc/mc_safety.h
   src/mc/mc_safety.cpp
-  src/mc/mc_set.cpp
   src/mc/mc_state.h
   src/mc/mc_state.cpp
   src/mc/mc_visited.cpp
index 834308e..6e11940 100644 (file)
@@ -26,6 +26,7 @@ typedef uint64_t mc_hash_t;
 
 // ***** Hash state
 
+#if 0
 typedef struct s_mc_hashing_state {
   // Set of pointers/addresses already processed (avoid loops):
   mc_address_set_t handled_addresses;
@@ -70,7 +71,6 @@ static void mc_hash_binary(mc_hash_t * hash, const void *s, size_t len)
   }
 }
 
-#if 0
 /** \brief Compute a hash for a given value of a given type
  *
  *  We try to be very conservative (do not hash too ambiguous things).
@@ -324,17 +324,20 @@ uint64_t mc_hash_processes_state(int num_state, xbt_dynar_t stacks)
 {
   XBT_DEBUG("START hash %i", num_state);
 
+#if 0
   mc_hashing_state state;
   mc_hash_state_init(&state);
+#endif
 
   mc_hash_t hash = MC_HASH_INIT;
 
   MC_HASH(hash, xbt_swag_size(simix_global->process_list));     // process count
+#if 0
   // mc_hash_object_globals(&hash, &state, binary_info);
   // mc_hash_object_globals(&hash, &state, libsimgrid_info);
   // mc_hash_stacks(&hash, &state, stacks);
-
   mc_hash_state_destroy(&state);
+#endif
 
   XBT_DEBUG("END hash %i", num_state);
   return hash;
index c19aa1f..a83d803 100644 (file)
@@ -124,15 +124,6 @@ typedef struct s_local_variable{
   int region;
 }s_local_variable_t, *local_variable_t;
 
-/* *********** Sets *********** */
-
-typedef struct s_mc_address_set *mc_address_set_t;
-
-mc_address_set_t mc_address_set_new(void);
-void mc_address_set_free(mc_address_set_t* p);
-void mc_address_add(mc_address_set_t p, const void* value);
-bool mc_address_test(mc_address_set_t p, const void* value);
-
 /* *********** Hash *********** */
 
 /** \brief Hash the current state
diff --git a/src/mc/mc_set.cpp b/src/mc/mc_set.cpp
deleted file mode 100644 (file)
index 03613c4..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-/* Copyright (c) 2007-2014. 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 <stddef.h>
-#include <set>
-
-typedef std::set<const void*>*  mc_address_set_t;
-
-extern "C" {
-
-mc_address_set_t mc_address_set_new();
-void mc_address_set_free(mc_address_set_t* p);
-void mc_address_add(mc_address_set_t p, const void* value);
-bool mc_address_test(mc_address_set_t p, const void* value);
-
-mc_address_set_t mc_address_set_new() {
-  return new std::set<const void*>();
-}
-
-void mc_address_set_free(mc_address_set_t* p) {
-  delete *p;
-  *p = NULL;
-}
-
-void mc_address_add(mc_address_set_t p, const void* value) {
-  p->insert(value);
-}
-
-bool mc_address_test(mc_address_set_t p, const void* value) {
-  return p->find(value) != p->end();
-}
-
-};