From 5e233ea32f35fa51ab4196ed85f3365ade9b4c45 Mon Sep 17 00:00:00 2001
From: Dominik Thoennes <dominik.thoennes@fau.de>
Date: Tue, 16 Mar 2021 11:20:51 +0100
Subject: [PATCH] remove nvtx wrapper

the wrapper did not compile but since this was not a problem in the last two years it can be removed
---
 CMakeLists.txt               |  6 +-----
 src/cuda/NVTX.h              | 24 +-----------------------
 src/waLBerlaDefinitions.in.h |  1 -
 3 files changed, 2 insertions(+), 29 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index e70d89fa2..d83acacb6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1043,12 +1043,8 @@ if ( WALBERLA_BUILD_WITH_CUDA )
       find_library(CUDART_LIBRARY cudart ${CMAKE_CUDA_IMPLICIT_LINK_DIRECTORIES})
       list ( APPEND SERVICE_LIBS ${CUDART_LIBRARY} )
 
-      #TODO: check if this is really needed? is it possible that nvtx is missing?
       find_library( NVTX_LIBRARY nvToolsExt ${CMAKE_CUDA_IMPLICIT_LINK_DIRECTORIES} )
-      if( NVTX_LIBRARY )
-          set( WALBERLA_CUDA_NVTX_AVAILABLE 1)
-          list ( APPEND SERVICE_LIBS ${NVTX_LIBRARY} )
-      endif()
+      list ( APPEND SERVICE_LIBS ${NVTX_LIBRARY} )
 
       #CUDA_FOUND is need for our cmake mechanism
       set ( CUDA_FOUND TRUE )
diff --git a/src/cuda/NVTX.h b/src/cuda/NVTX.h
index 3943581af..a8c1210b8 100644
--- a/src/cuda/NVTX.h
+++ b/src/cuda/NVTX.h
@@ -23,7 +23,6 @@
 
 #include <string>
 
-#ifdef WALBERLA_CUDA_NVTX_AVAILABLE
 #include <nvToolsExt.h>
 #include <nvToolsExtCuda.h>
 #include <nvToolsExtCudaRt.h>
@@ -73,25 +72,4 @@ private:
 
 
 } // namespace cuda
-} // namespace walberla
-
-
-
-
-#else
-namespace walberla{
-namespace cuda {
-
-inline void nameStream(const cudaStream_t & stream, const std::string & name) {}
-inline void nvtxMarker(const std::string& name, const uint32_t color=0xaaaaaa) {}
-class NvtxRange
-{
-public:
-    NvtxRange(const std::string & name, const uint32_t color=0xaaaaaa) {}}
-};
-
-} // namespace cuda
-} // namespace walberla
-
-
-#endif
\ No newline at end of file
+} // namespace walberla
\ No newline at end of file
diff --git a/src/waLBerlaDefinitions.in.h b/src/waLBerlaDefinitions.in.h
index c729cd2af..452d6d8ba 100644
--- a/src/waLBerlaDefinitions.in.h
+++ b/src/waLBerlaDefinitions.in.h
@@ -33,7 +33,6 @@
 #cmakedefine WALBERLA_MESAPD_CONVEX_POLYHEDRON_AVAILABLE
 
 #cmakedefine WALBERLA_BUILD_WITH_CUDA
-#cmakedefine WALBERLA_CUDA_NVTX_AVAILABLE
 
 #cmakedefine WALBERLA_BUILD_WITH_CODEGEN
 
-- 
GitLab