From 9a9e09d8f6b5a23e66caac732942a097ebfa712b Mon Sep 17 00:00:00 2001 From: JOAN VINYALS YLLA CATALA Date: Mon, 5 Aug 2024 12:45:19 +0200 Subject: [PATCH 1/2] Create new hierarchy structure --- .../{extrae => extrae_partial_tracer}/extrae_partial_tracer.cpp | 0 .../{extrae => extrae_partial_tracer}/extrae_partial_tracer.hpp | 0 src/backends/{extrae => extrae_type_stack}/extrae_type_stack.cpp | 0 src/backends/{extrae => extrae_type_stack}/extrae_type_stack.hpp | 0 src/backends/{dlb/dlb => talp}/CMakeLists.txt | 0 src/backends/{dlb/dlb => talp}/dlb.cpp | 0 src/backends/{dlb/dlb => talp}/dlb.hpp | 0 src/backends/{dlb/dlb_talp_tree => talp_tree}/CMakeLists.txt | 0 src/backends/{dlb/dlb_talp_tree => talp_tree}/dlb_talp_tree.cpp | 0 src/backends/{dlb/dlb_talp_tree => talp_tree}/dlb_talp_tree.hpp | 0 .../dlb_talp_tree_ascii_serializer.cpp | 0 .../dlb_talp_tree_ascii_serializer.hpp | 0 .../dlb_talp_tree => talp_tree}/dlb_talp_tree_json_serializer.cpp | 0 .../dlb_talp_tree => talp_tree}/dlb_talp_tree_json_serializer.hpp | 0 src/backends/{ => wrappers}/dlb/CMakeLists.txt | 0 src/backends/{ => wrappers}/extrae/CMakeLists.txt | 0 src/backends/{ => wrappers}/extrae/extrae_types.hpp | 0 src/backends/{ => wrappers}/extrae/extrae_wrapper.cpp | 0 src/backends/{ => wrappers}/extrae/extrae_wrapper.hpp | 0 src/backends/{ => wrappers}/extrae/paraver_config.cpp | 0 src/backends/{ => wrappers}/extrae/paraver_config.hpp | 0 21 files changed, 0 insertions(+), 0 deletions(-) rename src/backends/{extrae => extrae_partial_tracer}/extrae_partial_tracer.cpp (100%) rename src/backends/{extrae => extrae_partial_tracer}/extrae_partial_tracer.hpp (100%) rename src/backends/{extrae => extrae_type_stack}/extrae_type_stack.cpp (100%) rename src/backends/{extrae => extrae_type_stack}/extrae_type_stack.hpp (100%) rename src/backends/{dlb/dlb => talp}/CMakeLists.txt (100%) rename src/backends/{dlb/dlb => talp}/dlb.cpp (100%) rename src/backends/{dlb/dlb => talp}/dlb.hpp (100%) rename src/backends/{dlb/dlb_talp_tree => talp_tree}/CMakeLists.txt (100%) rename src/backends/{dlb/dlb_talp_tree => talp_tree}/dlb_talp_tree.cpp (100%) rename src/backends/{dlb/dlb_talp_tree => talp_tree}/dlb_talp_tree.hpp (100%) rename src/backends/{dlb/dlb_talp_tree => talp_tree}/dlb_talp_tree_ascii_serializer.cpp (100%) rename src/backends/{dlb/dlb_talp_tree => talp_tree}/dlb_talp_tree_ascii_serializer.hpp (100%) rename src/backends/{dlb/dlb_talp_tree => talp_tree}/dlb_talp_tree_json_serializer.cpp (100%) rename src/backends/{dlb/dlb_talp_tree => talp_tree}/dlb_talp_tree_json_serializer.hpp (100%) rename src/backends/{ => wrappers}/dlb/CMakeLists.txt (100%) rename src/backends/{ => wrappers}/extrae/CMakeLists.txt (100%) rename src/backends/{ => wrappers}/extrae/extrae_types.hpp (100%) rename src/backends/{ => wrappers}/extrae/extrae_wrapper.cpp (100%) rename src/backends/{ => wrappers}/extrae/extrae_wrapper.hpp (100%) rename src/backends/{ => wrappers}/extrae/paraver_config.cpp (100%) rename src/backends/{ => wrappers}/extrae/paraver_config.hpp (100%) diff --git a/src/backends/extrae/extrae_partial_tracer.cpp b/src/backends/extrae_partial_tracer/extrae_partial_tracer.cpp similarity index 100% rename from src/backends/extrae/extrae_partial_tracer.cpp rename to src/backends/extrae_partial_tracer/extrae_partial_tracer.cpp diff --git a/src/backends/extrae/extrae_partial_tracer.hpp b/src/backends/extrae_partial_tracer/extrae_partial_tracer.hpp similarity index 100% rename from src/backends/extrae/extrae_partial_tracer.hpp rename to src/backends/extrae_partial_tracer/extrae_partial_tracer.hpp diff --git a/src/backends/extrae/extrae_type_stack.cpp b/src/backends/extrae_type_stack/extrae_type_stack.cpp similarity index 100% rename from src/backends/extrae/extrae_type_stack.cpp rename to src/backends/extrae_type_stack/extrae_type_stack.cpp diff --git a/src/backends/extrae/extrae_type_stack.hpp b/src/backends/extrae_type_stack/extrae_type_stack.hpp similarity index 100% rename from src/backends/extrae/extrae_type_stack.hpp rename to src/backends/extrae_type_stack/extrae_type_stack.hpp diff --git a/src/backends/dlb/dlb/CMakeLists.txt b/src/backends/talp/CMakeLists.txt similarity index 100% rename from src/backends/dlb/dlb/CMakeLists.txt rename to src/backends/talp/CMakeLists.txt diff --git a/src/backends/dlb/dlb/dlb.cpp b/src/backends/talp/dlb.cpp similarity index 100% rename from src/backends/dlb/dlb/dlb.cpp rename to src/backends/talp/dlb.cpp diff --git a/src/backends/dlb/dlb/dlb.hpp b/src/backends/talp/dlb.hpp similarity index 100% rename from src/backends/dlb/dlb/dlb.hpp rename to src/backends/talp/dlb.hpp diff --git a/src/backends/dlb/dlb_talp_tree/CMakeLists.txt b/src/backends/talp_tree/CMakeLists.txt similarity index 100% rename from src/backends/dlb/dlb_talp_tree/CMakeLists.txt rename to src/backends/talp_tree/CMakeLists.txt diff --git a/src/backends/dlb/dlb_talp_tree/dlb_talp_tree.cpp b/src/backends/talp_tree/dlb_talp_tree.cpp similarity index 100% rename from src/backends/dlb/dlb_talp_tree/dlb_talp_tree.cpp rename to src/backends/talp_tree/dlb_talp_tree.cpp diff --git a/src/backends/dlb/dlb_talp_tree/dlb_talp_tree.hpp b/src/backends/talp_tree/dlb_talp_tree.hpp similarity index 100% rename from src/backends/dlb/dlb_talp_tree/dlb_talp_tree.hpp rename to src/backends/talp_tree/dlb_talp_tree.hpp diff --git a/src/backends/dlb/dlb_talp_tree/dlb_talp_tree_ascii_serializer.cpp b/src/backends/talp_tree/dlb_talp_tree_ascii_serializer.cpp similarity index 100% rename from src/backends/dlb/dlb_talp_tree/dlb_talp_tree_ascii_serializer.cpp rename to src/backends/talp_tree/dlb_talp_tree_ascii_serializer.cpp diff --git a/src/backends/dlb/dlb_talp_tree/dlb_talp_tree_ascii_serializer.hpp b/src/backends/talp_tree/dlb_talp_tree_ascii_serializer.hpp similarity index 100% rename from src/backends/dlb/dlb_talp_tree/dlb_talp_tree_ascii_serializer.hpp rename to src/backends/talp_tree/dlb_talp_tree_ascii_serializer.hpp diff --git a/src/backends/dlb/dlb_talp_tree/dlb_talp_tree_json_serializer.cpp b/src/backends/talp_tree/dlb_talp_tree_json_serializer.cpp similarity index 100% rename from src/backends/dlb/dlb_talp_tree/dlb_talp_tree_json_serializer.cpp rename to src/backends/talp_tree/dlb_talp_tree_json_serializer.cpp diff --git a/src/backends/dlb/dlb_talp_tree/dlb_talp_tree_json_serializer.hpp b/src/backends/talp_tree/dlb_talp_tree_json_serializer.hpp similarity index 100% rename from src/backends/dlb/dlb_talp_tree/dlb_talp_tree_json_serializer.hpp rename to src/backends/talp_tree/dlb_talp_tree_json_serializer.hpp diff --git a/src/backends/dlb/CMakeLists.txt b/src/backends/wrappers/dlb/CMakeLists.txt similarity index 100% rename from src/backends/dlb/CMakeLists.txt rename to src/backends/wrappers/dlb/CMakeLists.txt diff --git a/src/backends/extrae/CMakeLists.txt b/src/backends/wrappers/extrae/CMakeLists.txt similarity index 100% rename from src/backends/extrae/CMakeLists.txt rename to src/backends/wrappers/extrae/CMakeLists.txt diff --git a/src/backends/extrae/extrae_types.hpp b/src/backends/wrappers/extrae/extrae_types.hpp similarity index 100% rename from src/backends/extrae/extrae_types.hpp rename to src/backends/wrappers/extrae/extrae_types.hpp diff --git a/src/backends/extrae/extrae_wrapper.cpp b/src/backends/wrappers/extrae/extrae_wrapper.cpp similarity index 100% rename from src/backends/extrae/extrae_wrapper.cpp rename to src/backends/wrappers/extrae/extrae_wrapper.cpp diff --git a/src/backends/extrae/extrae_wrapper.hpp b/src/backends/wrappers/extrae/extrae_wrapper.hpp similarity index 100% rename from src/backends/extrae/extrae_wrapper.hpp rename to src/backends/wrappers/extrae/extrae_wrapper.hpp diff --git a/src/backends/extrae/paraver_config.cpp b/src/backends/wrappers/extrae/paraver_config.cpp similarity index 100% rename from src/backends/extrae/paraver_config.cpp rename to src/backends/wrappers/extrae/paraver_config.cpp diff --git a/src/backends/extrae/paraver_config.hpp b/src/backends/wrappers/extrae/paraver_config.hpp similarity index 100% rename from src/backends/extrae/paraver_config.hpp rename to src/backends/wrappers/extrae/paraver_config.hpp -- GitLab From ad5249047ab77cf8cbcb91596159c44db490cde8 Mon Sep 17 00:00:00 2001 From: Valentin Seitz Date: Mon, 5 Aug 2024 13:01:07 +0200 Subject: [PATCH 2/2] make it compile :) --- src/backends/CMakeLists.txt | 7 +++++-- src/backends/dlb_talp/CMakeLists.txt | 1 + .../{talp/dlb.cpp => dlb_talp/dlb_talp.cpp} | 3 ++- .../{talp/dlb.hpp => dlb_talp/dlb_talp.hpp} | 0 .../{talp_tree => dlb_talp_tree}/CMakeLists.txt | 0 .../{talp_tree => dlb_talp_tree}/dlb_talp_tree.cpp | 0 .../{talp_tree => dlb_talp_tree}/dlb_talp_tree.hpp | 2 +- .../dlb_talp_tree_ascii_serializer.cpp | 0 .../dlb_talp_tree_ascii_serializer.hpp | 0 .../dlb_talp_tree_json_serializer.cpp | 0 .../dlb_talp_tree_json_serializer.hpp | 0 src/backends/extrae_partial_tracer/CMakeLists.txt | 1 + .../extrae_partial_tracer/extrae_partial_tracer.hpp | 5 +++-- src/backends/extrae_type_stack/CMakeLists.txt | 1 + .../extrae_type_stack/extrae_type_stack.hpp | 4 ++-- src/backends/talp/CMakeLists.txt | 1 - src/backends/wrappers/CMakeLists.txt | 7 +++++++ src/backends/wrappers/dlb/CMakeLists.txt | 3 +-- src/backends/wrappers/dlb/dlb_wrapper.cpp | 0 src/backends/wrappers/dlb/dlb_wrapper.hpp | 0 src/backends/wrappers/extrae/CMakeLists.txt | 2 +- src/backends/wrappers/extrae/extrae_wrapper.hpp | 4 ++++ src/delegator.cpp | 13 ++++++------- 23 files changed, 35 insertions(+), 19 deletions(-) create mode 100644 src/backends/dlb_talp/CMakeLists.txt rename src/backends/{talp/dlb.cpp => dlb_talp/dlb_talp.cpp} (93%) rename src/backends/{talp/dlb.hpp => dlb_talp/dlb_talp.hpp} (100%) rename src/backends/{talp_tree => dlb_talp_tree}/CMakeLists.txt (100%) rename src/backends/{talp_tree => dlb_talp_tree}/dlb_talp_tree.cpp (100%) rename src/backends/{talp_tree => dlb_talp_tree}/dlb_talp_tree.hpp (98%) rename src/backends/{talp_tree => dlb_talp_tree}/dlb_talp_tree_ascii_serializer.cpp (100%) rename src/backends/{talp_tree => dlb_talp_tree}/dlb_talp_tree_ascii_serializer.hpp (100%) rename src/backends/{talp_tree => dlb_talp_tree}/dlb_talp_tree_json_serializer.cpp (100%) rename src/backends/{talp_tree => dlb_talp_tree}/dlb_talp_tree_json_serializer.hpp (100%) create mode 100644 src/backends/extrae_partial_tracer/CMakeLists.txt create mode 100644 src/backends/extrae_type_stack/CMakeLists.txt delete mode 100644 src/backends/talp/CMakeLists.txt create mode 100644 src/backends/wrappers/CMakeLists.txt create mode 100644 src/backends/wrappers/dlb/dlb_wrapper.cpp create mode 100644 src/backends/wrappers/dlb/dlb_wrapper.hpp diff --git a/src/backends/CMakeLists.txt b/src/backends/CMakeLists.txt index ccb0564..270833a 100644 --- a/src/backends/CMakeLists.txt +++ b/src/backends/CMakeLists.txt @@ -1,9 +1,12 @@ add_subdirectory(default) add_subdirectory(detection) +add_subdirectory(wrappers) if(ENABLE_DLB) - add_subdirectory(dlb) + add_subdirectory(dlb_talp) + add_subdirectory(dlb_talp_tree) endif() if(ENABLE_EXTRAE) - add_subdirectory(extrae) + add_subdirectory(extrae_partial_tracer) + add_subdirectory(extrae_type_stack) endif() diff --git a/src/backends/dlb_talp/CMakeLists.txt b/src/backends/dlb_talp/CMakeLists.txt new file mode 100644 index 0000000..56f83f6 --- /dev/null +++ b/src/backends/dlb_talp/CMakeLists.txt @@ -0,0 +1 @@ +target_sources(nesmik PRIVATE dlb_talp.cpp) diff --git a/src/backends/talp/dlb.cpp b/src/backends/dlb_talp/dlb_talp.cpp similarity index 93% rename from src/backends/talp/dlb.cpp rename to src/backends/dlb_talp/dlb_talp.cpp index a120bf5..3af603b 100644 --- a/src/backends/talp/dlb.cpp +++ b/src/backends/dlb_talp/dlb_talp.cpp @@ -1,5 +1,6 @@ -#include "dlb.hpp" +#include "dlb_talp.hpp" +#include #include #include "dlb.h" diff --git a/src/backends/talp/dlb.hpp b/src/backends/dlb_talp/dlb_talp.hpp similarity index 100% rename from src/backends/talp/dlb.hpp rename to src/backends/dlb_talp/dlb_talp.hpp diff --git a/src/backends/talp_tree/CMakeLists.txt b/src/backends/dlb_talp_tree/CMakeLists.txt similarity index 100% rename from src/backends/talp_tree/CMakeLists.txt rename to src/backends/dlb_talp_tree/CMakeLists.txt diff --git a/src/backends/talp_tree/dlb_talp_tree.cpp b/src/backends/dlb_talp_tree/dlb_talp_tree.cpp similarity index 100% rename from src/backends/talp_tree/dlb_talp_tree.cpp rename to src/backends/dlb_talp_tree/dlb_talp_tree.cpp diff --git a/src/backends/talp_tree/dlb_talp_tree.hpp b/src/backends/dlb_talp_tree/dlb_talp_tree.hpp similarity index 98% rename from src/backends/talp_tree/dlb_talp_tree.hpp rename to src/backends/dlb_talp_tree/dlb_talp_tree.hpp index a5073a1..8cc923d 100644 --- a/src/backends/talp_tree/dlb_talp_tree.hpp +++ b/src/backends/dlb_talp_tree/dlb_talp_tree.hpp @@ -8,7 +8,7 @@ #include #include -#include "../dlb/dlb.hpp" +#include "../dlb_talp/dlb_talp.hpp" #include "dlb.h" #include "dlb_talp.h" #include "strategies.hpp" diff --git a/src/backends/talp_tree/dlb_talp_tree_ascii_serializer.cpp b/src/backends/dlb_talp_tree/dlb_talp_tree_ascii_serializer.cpp similarity index 100% rename from src/backends/talp_tree/dlb_talp_tree_ascii_serializer.cpp rename to src/backends/dlb_talp_tree/dlb_talp_tree_ascii_serializer.cpp diff --git a/src/backends/talp_tree/dlb_talp_tree_ascii_serializer.hpp b/src/backends/dlb_talp_tree/dlb_talp_tree_ascii_serializer.hpp similarity index 100% rename from src/backends/talp_tree/dlb_talp_tree_ascii_serializer.hpp rename to src/backends/dlb_talp_tree/dlb_talp_tree_ascii_serializer.hpp diff --git a/src/backends/talp_tree/dlb_talp_tree_json_serializer.cpp b/src/backends/dlb_talp_tree/dlb_talp_tree_json_serializer.cpp similarity index 100% rename from src/backends/talp_tree/dlb_talp_tree_json_serializer.cpp rename to src/backends/dlb_talp_tree/dlb_talp_tree_json_serializer.cpp diff --git a/src/backends/talp_tree/dlb_talp_tree_json_serializer.hpp b/src/backends/dlb_talp_tree/dlb_talp_tree_json_serializer.hpp similarity index 100% rename from src/backends/talp_tree/dlb_talp_tree_json_serializer.hpp rename to src/backends/dlb_talp_tree/dlb_talp_tree_json_serializer.hpp diff --git a/src/backends/extrae_partial_tracer/CMakeLists.txt b/src/backends/extrae_partial_tracer/CMakeLists.txt new file mode 100644 index 0000000..dff45e3 --- /dev/null +++ b/src/backends/extrae_partial_tracer/CMakeLists.txt @@ -0,0 +1 @@ +target_sources(nesmik PRIVATE extrae_partial_tracer.cpp) diff --git a/src/backends/extrae_partial_tracer/extrae_partial_tracer.hpp b/src/backends/extrae_partial_tracer/extrae_partial_tracer.hpp index b4b0a3a..f704595 100644 --- a/src/backends/extrae_partial_tracer/extrae_partial_tracer.hpp +++ b/src/backends/extrae_partial_tracer/extrae_partial_tracer.hpp @@ -1,11 +1,12 @@ +#include +#include #include #include +#include #include #include #include -#include "extrae_type_stack.hpp" - struct StartStopJob { std::string region_name; unsigned int start_at; diff --git a/src/backends/extrae_type_stack/CMakeLists.txt b/src/backends/extrae_type_stack/CMakeLists.txt new file mode 100644 index 0000000..319ef9c --- /dev/null +++ b/src/backends/extrae_type_stack/CMakeLists.txt @@ -0,0 +1 @@ +target_sources(nesmik PRIVATE extrae_type_stack.cpp) diff --git a/src/backends/extrae_type_stack/extrae_type_stack.hpp b/src/backends/extrae_type_stack/extrae_type_stack.hpp index 3cd2ee8..2275991 100644 --- a/src/backends/extrae_type_stack/extrae_type_stack.hpp +++ b/src/backends/extrae_type_stack/extrae_type_stack.hpp @@ -1,13 +1,13 @@ #ifndef NESMIK_EXTRAE_TYPE_STACK_HPP #define NESMIK_EXTRAE_TYPE_STACK_HPP +#include +#include #include #include #include #include #include -#include "extrae_types.hpp" -#include "extrae_wrapper.hpp" #include "strategies.hpp" class ExtraeTypeStackStrategy : public ProperlyNestedAnnotationStrategy { diff --git a/src/backends/talp/CMakeLists.txt b/src/backends/talp/CMakeLists.txt deleted file mode 100644 index 9bb7520..0000000 --- a/src/backends/talp/CMakeLists.txt +++ /dev/null @@ -1 +0,0 @@ -target_sources(nesmik PRIVATE dlb.cpp) diff --git a/src/backends/wrappers/CMakeLists.txt b/src/backends/wrappers/CMakeLists.txt new file mode 100644 index 0000000..9f5951d --- /dev/null +++ b/src/backends/wrappers/CMakeLists.txt @@ -0,0 +1,7 @@ +if(ENABLE_DLB) + add_subdirectory(dlb) +endif() + +if(ENABLE_EXTRAE) + add_subdirectory(extrae) +endif() diff --git a/src/backends/wrappers/dlb/CMakeLists.txt b/src/backends/wrappers/dlb/CMakeLists.txt index dad14ce..3bb5847 100644 --- a/src/backends/wrappers/dlb/CMakeLists.txt +++ b/src/backends/wrappers/dlb/CMakeLists.txt @@ -1,2 +1 @@ -add_subdirectory(dlb) -add_subdirectory(dlb_talp_tree) +target_sources(nesmik PRIVATE dlb_wrapper.cpp) diff --git a/src/backends/wrappers/dlb/dlb_wrapper.cpp b/src/backends/wrappers/dlb/dlb_wrapper.cpp new file mode 100644 index 0000000..e69de29 diff --git a/src/backends/wrappers/dlb/dlb_wrapper.hpp b/src/backends/wrappers/dlb/dlb_wrapper.hpp new file mode 100644 index 0000000..e69de29 diff --git a/src/backends/wrappers/extrae/CMakeLists.txt b/src/backends/wrappers/extrae/CMakeLists.txt index e8ec467..ba3bc11 100644 --- a/src/backends/wrappers/extrae/CMakeLists.txt +++ b/src/backends/wrappers/extrae/CMakeLists.txt @@ -1 +1 @@ -target_sources(nesmik PRIVATE extrae_partial_tracer.cpp extrae_type_stack.cpp extrae_wrapper.cpp paraver_config.cpp) +target_sources(nesmik PRIVATE extrae_wrapper.cpp paraver_config.cpp) diff --git a/src/backends/wrappers/extrae/extrae_wrapper.hpp b/src/backends/wrappers/extrae/extrae_wrapper.hpp index 125668f..1849c1d 100644 --- a/src/backends/wrappers/extrae/extrae_wrapper.hpp +++ b/src/backends/wrappers/extrae/extrae_wrapper.hpp @@ -1,3 +1,5 @@ +#ifndef NESMIK_EXTRAE_WRAPPER_HPP +#define NESMIK_EXTRAE_WRAPPER_HPP #include #include #include @@ -37,3 +39,5 @@ class ExtraeWrapper { std::string getParaverConfig(ExtraeParaverConfig config); void Finalize(); }; + +#endif // NESMIK_EXTRAE_WRAPPER_HPP diff --git a/src/delegator.cpp b/src/delegator.cpp index bb7a54f..9317f5d 100644 --- a/src/delegator.cpp +++ b/src/delegator.cpp @@ -1,3 +1,5 @@ +#include +#include #include #include #include @@ -9,17 +11,14 @@ #include #include #include - -#include "backends/default/default.hpp" -#include "backends/detection/detection.hpp" #ifdef ENABLE_DLB -#include "backends/dlb/dlb/dlb.hpp" -#include "backends/dlb/dlb_talp_tree/dlb_talp_tree.hpp" +#include +#include #endif #ifdef ENABLE_EXTRAE -#include "backends/extrae/extrae_partial_tracer.hpp" -#include "backends/extrae/extrae_type_stack.hpp" +#include +#include #endif void Delegator::InitNonProperlyNestedBackends(const std::string &backend) { -- GitLab