44 #ifndef KOKKOSP_PROFILE_SECTION_HPP 45 #define KOKKOSP_PROFILE_SECTION_HPP 47 #include <Kokkos_Macros.hpp> 48 #include <impl/Kokkos_Profiling_Interface.hpp> 55 class ProfilingSection {
58 ProfilingSection(
const std::string& sectionName) :
59 secName(sectionName) {
61 #if defined( KOKKOS_ENABLE_PROFILING ) 62 if(Kokkos::Profiling::profileLibraryLoaded()) {
63 Kokkos::Profiling::createProfileSection(secName, &secID);
71 #if defined( KOKKOS_ENABLE_PROFILING ) 72 if(Kokkos::Profiling::profileLibraryLoaded()) {
73 Kokkos::Profiling::startSection(secID);
79 #if defined( KOKKOS_ENABLE_PROFILING ) 80 if(Kokkos::Profiling::profileLibraryLoaded()) {
81 Kokkos::Profiling::stopSection(secID);
87 #if defined( KOKKOS_ENABLE_PROFILING ) 88 if(Kokkos::Profiling::profileLibraryLoaded()) {
89 Kokkos::Profiling::destroyProfileSection(secID);
94 std::string getName() {
98 uint32_t getSectionID() {
103 const std::string secName;