Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of git+ssh://scm.gforge.inria.fr//gitroot/simgrid/simgrid
[simgrid.git] / src / instr / instr_smpi.h
index a4596f9..e0040f7 100644 (file)
@@ -1,6 +1,12 @@
+/* Copyright (c) 2010-2017. 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. */
+
 #ifndef INSTR_SMPI_H_
 #define INSTR_SMPI_H_ 
 #ifdef __cplusplus
+#include <string>
 extern "C" {
 #endif
 
@@ -10,9 +16,14 @@ typedef struct smpi_trace_call_location {
 
   const char* previous_filename;
   int previous_linenumber;
-} smpi_trace_call_location_t;
 
-smpi_trace_call_location_t* smpi_trace_get_call_location();
+#ifdef __cplusplus
+  std::string get_composed_key() {
+    return std::string(previous_filename) + ':' + std::to_string(previous_linenumber) + ':' + filename + ':' + std::to_string(linenumber);
+  }
+#endif
+
+} smpi_trace_call_location_t;
 
 #ifdef __cplusplus
 }