A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
WIP stop using const char* in C++ layers
[simgrid.git]
/
src
/
instr
/
instr_smpi.h
diff --git
a/src/instr/instr_smpi.h
b/src/instr/instr_smpi.h
index
a4596f9
..
e371fd6
100644
(file)
--- a/
src/instr/instr_smpi.h
+++ b/
src/instr/instr_smpi.h
@@
-1,6
+1,7
@@
#ifndef INSTR_SMPI_H_
#define INSTR_SMPI_H_
#ifdef __cplusplus
#ifndef INSTR_SMPI_H_
#define INSTR_SMPI_H_
#ifdef __cplusplus
+#include <string>
extern "C" {
#endif
extern "C" {
#endif
@@
-10,9
+11,14
@@
typedef struct smpi_trace_call_location {
const char* previous_filename;
int previous_linenumber;
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
}
#ifdef __cplusplus
}