Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[SMPI/INSTR] Header cleanup.
authorChristian Heinrich <franz-christian.heinrich@inria.fr>
Thu, 26 May 2016 13:38:51 +0000 (15:38 +0200)
committerChristian Heinrich <franz-christian.heinrich@inria.fr>
Thu, 26 May 2016 13:56:28 +0000 (15:56 +0200)
This removes nasty includes such as src/instr/instr_smpi.h
and moves other includes to the right location as well.

include/smpi/mpi.h
src/instr/instr_smpi.h
src/instr/instr_trace.cpp
src/smpi/instr_smpi.cpp
src/smpi/private.hpp
src/smpi/smpi_bench.cpp

index a5474a6..665ac78 100644 (file)
@@ -26,8 +26,8 @@
 #endif
 
 #if TRACE_CALL_LOCATION
-#include "src/instr/instr_smpi.h"
-#include "smpi_extended_traces.h"
+//#include "src/instr/instr_smpi.h"
+#include <smpi/smpi_extended_traces.h>
 #endif
 
 #endif
index d80aed2..e371fd6 100644 (file)
@@ -20,8 +20,6 @@ typedef struct smpi_trace_call_location {
 
 } smpi_trace_call_location_t;
 
-smpi_trace_call_location_t* smpi_trace_get_call_location();
-
 #ifdef __cplusplus
 }
 #endif
index cfa70ee..850f75e 100644 (file)
@@ -6,6 +6,7 @@
 
 #include "src/instr/instr_private.h"
 #include "src/instr/instr_smpi.h"
+#include "src/smpi/private.hpp"
 #include "xbt/virtu.h" /* sg_cmdline */
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(instr_trace, instr, "tracing event system");
index 2618f2d..4f0ae28 100644 (file)
@@ -5,7 +5,6 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include "private.h"
-#include "private.hpp"
 #include <ctype.h>
 #include <wchar.h>
 #include <stdarg.h>
index b0433fc..cc87c97 100644 (file)
@@ -17,3 +17,4 @@ extern std::map<std::string, double> location2speedup;
  * \brief Returns the last call location (filename, linenumber). Process-specific.
  */
 XBT_PUBLIC(smpi_trace_call_location_t*) smpi_process_get_call_location(void);
+XBT_PUBLIC(smpi_trace_call_location_t*) smpi_trace_get_call_location();
index a997df0..891b663 100644 (file)
@@ -738,12 +738,11 @@ void smpi_destroy_global_memory_segments(){
 #endif
 }
 
-extern "C" {
-
-  smpi_trace_call_location_t* smpi_trace_get_call_location() {
-    return smpi_process_get_call_location();
-  }
+smpi_trace_call_location_t* smpi_trace_get_call_location() {
+  return smpi_process_get_call_location();
+}
 
+extern "C" { /** These functions will be called from the user code **/
   void smpi_trace_set_call_location(const char* file, const int line) {
     smpi_trace_call_location_t* loc = smpi_process_get_call_location();