BioDynaMo  v1.05.120-25dc9790
vtune_helper.h
Go to the documentation of this file.
1 // -----------------------------------------------------------------------------
2 //
3 // Copyright (C) 2021 CERN & University of Surrey for the benefit of the
4 // BioDynaMo collaboration. All Rights Reserved.
5 //
6 // Licensed under the Apache License, Version 2.0 (the "License");
7 // you may not use this file except in compliance with the License.
8 //
9 // See the LICENSE file distributed with this work for details.
10 // See the NOTICE file distributed with this work for additional information
11 // regarding copyright ownership.
12 //
13 // -----------------------------------------------------------------------------
14 
15 #ifndef CORE_OPERATION_VTUNE_HELPER_H_
16 #define CORE_OPERATION_VTUNE_HELPER_H_
17 
18 #include "core/util/vtune.h"
19 
20 namespace bdm {
21 
32 class VTuneTask {
33  public:
34  explicit VTuneTask(const std::string& task_name) {
35  domain_ = __itt_domain_create("BDMTraces.MyDomain");
36  task_ = __itt_string_handle_create(task_name.c_str());
37  }
38 
39  void Start() { __itt_task_begin(domain_, __itt_null, __itt_null, task_); }
40 
42 
43  private:
46 };
47 
48 } // namespace bdm
49 
50 #endif // CORE_OPERATION_VTUNE_HELPER_H_
bdm
Definition: agent.cc:39
bdm::VTuneTask::Stop
void Stop()
Definition: vtune_helper.h:41
__itt_domain_create
__itt_domain * __itt_domain_create(const char *)
Definition: vtune.h:46
__itt_task_begin
void __itt_task_begin(__itt_domain *, __itt_null_t, __itt_null_t, __itt_string_handle *)
Definition: vtune.h:56
__itt_string_handle_create
__itt_string_handle * __itt_string_handle_create(const char *)
Definition: vtune.h:51
bdm::VTuneTask::domain_
__itt_domain * domain_
Definition: vtune_helper.h:44
bdm::VTuneTask::Start
void Start()
Definition: vtune_helper.h:39
bdm::VTuneTask
Definition: vtune_helper.h:32
__itt_string_handle
Definition: vtune.h:41
vtune.h
__itt_task_end
void __itt_task_end(__itt_domain *)
Definition: vtune.h:61
__itt_domain
Definition: vtune.h:40
bdm::VTuneTask::task_
__itt_string_handle * task_
Definition: vtune_helper.h:45
bdm::VTuneTask::VTuneTask
VTuneTask(const std::string &task_name)
Definition: vtune_helper.h:34