GGEMS  1.1
GPU GEant4-based Monte Carlo Simulations
GGEMSProfiler.hh
Go to the documentation of this file.
1 #ifndef GUARD_GGEMS_TOOLS_GGEMSPROFILER_HH
2 #define GUARD_GGEMS_TOOLS_GGEMSPROFILER_HH
3 
4 // ************************************************************************
5 // * This file is part of GGEMS. *
6 // * *
7 // * GGEMS is free software: you can redistribute it and/or modify *
8 // * it under the terms of the GNU General Public License as published by *
9 // * the Free Software Foundation, either version 3 of the License, or *
10 // * (at your option) any later version. *
11 // * *
12 // * GGEMS is distributed in the hope that it will be useful, *
13 // * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14 // * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15 // * GNU General Public License for more details. *
16 // * *
17 // * You should have received a copy of the GNU General Public License *
18 // * along with GGEMS. If not, see <https://www.gnu.org/licenses/>. *
19 // * *
20 // ************************************************************************
21 
35 
40 class GGEMS_EXPORT GGEMSProfiler
41 {
42  public:
46  GGEMSProfiler(void);
47 
51  ~GGEMSProfiler(void);
52 
58  void HandleEvent(cl::Event event);
59 
65  inline DurationNano GetSummaryTime(void) const {return profiler_item_->GetElapsedTime();}
66 
67  private:
75  static void CallBackFunction(cl_event event, GGint event_command_exec_status, void* user_data);
76 
82  void AddProfilerItem(cl_event event);
83 
84  private:
86 };
87 
88 #endif // End of GUARD_GGEMS_TOOLS_GGEMSPROFILER_HH
GGEMSProfiler::profiler_item_
GGEMSProfilerItem * profiler_item_
Definition: GGEMSProfiler.hh:85
GGEMSProfiler
GGEMS class handling a specific profiler type.
Definition: GGEMSProfiler.hh:41
DurationNano
std::chrono::duration< int64_t, std::nano > DurationNano
Definition: GGEMSChrono.hh:40
GGint
#define GGint
Definition: GGEMSTypes.hh:224
GGEMSProfilerItem
GGEMS handling a specific item profiler_item.
Definition: GGEMSProfilerItem.hh:53
GGEMSProfilerItem.hh
GGEMS class handling a specific item profiler.
GGEMSProfiler::GetSummaryTime
DurationNano GetSummaryTime(void) const
get elapsed time in ns in OpenCL operation
Definition: GGEMSProfiler.hh:65