diff --git a/cpp/include/raft/core/detail/nvtx.hpp b/cpp/include/raft/core/detail/nvtx.hpp index ca4c5e4a08..e734c99029 100644 --- a/cpp/include/raft/core/detail/nvtx.hpp +++ b/cpp/include/raft/core/detail/nvtx.hpp @@ -18,8 +18,6 @@ #include -namespace raft::common::nvtx::detail { - #ifdef NVTX_ENABLED #include @@ -30,6 +28,8 @@ namespace raft::common::nvtx::detail { #include #include +namespace raft::common::nvtx::detail { + /** * @brief An internal struct to store associated state with the color * generator @@ -191,8 +191,12 @@ inline void pop_range() nvtxDomainRangePop(domain_store::value()); } +} // namespace raft::common::nvtx::detail + #else // NVTX_ENABLED +namespace raft::common::nvtx::detail { + template inline void push_range(const char* format, Args... args) { @@ -203,6 +207,6 @@ inline void pop_range() { } -#endif // NVTX_ENABLED - } // namespace raft::common::nvtx::detail + +#endif // NVTX_ENABLED