geopm  3.1.1.dev296+g5916b956
GEOPM - Global Extensible Open Power Manager
ModelRegion.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015 - 2024 Intel Corporation
3  * SPDX-License-Identifier: BSD-3-Clause
4  */
5 
6 #ifndef MODELREGION_HPP_INCLUDE
7 #define MODELREGION_HPP_INCLUDE
8 
9 #include <cstdint>
10 #include <memory>
11 #include <string>
12 
13 #include "geopm_public.h"
14 
15 namespace geopm
16 {
17  class GEOPM_PUBLIC ModelRegion
18  {
19  public:
20  static std::unique_ptr<ModelRegion> model_region(const std::string &name,
21  double big_o,
22  int verbosity);
23  ModelRegion(int verbosity);
24  virtual ~ModelRegion();
25  std::string name(void);
26  double big_o(void);
27  virtual void region(void);
28  virtual void region(uint64_t hint);
29  virtual void region_enter(void);
30  virtual void region_exit(void);
31  virtual void loop_enter(uint64_t iteration);
32  virtual void loop_exit(void);
33  virtual void big_o(double big_o_in) = 0;
34  virtual void run(void) = 0;
35  protected:
36  virtual void num_progress_updates(double big_o_in);
37  static bool name_check(const std::string &name, const std::string &key);
38  std::string m_name;
39  double m_big_o;
41  uint64_t m_region_id;
46  double m_norm;
47  };
48 }
49 
50 #endif
Definition: ModelRegion.hpp:18
double m_big_o
Definition: ModelRegion.hpp:39
bool m_do_progress
Definition: ModelRegion.hpp:43
bool m_do_unmarked
Definition: ModelRegion.hpp:44
uint64_t m_num_progress_updates
Definition: ModelRegion.hpp:45
virtual void big_o(double big_o_in)=0
double m_norm
Definition: ModelRegion.hpp:46
std::string m_name
Definition: ModelRegion.hpp:38
bool m_do_imbalance
Definition: ModelRegion.hpp:42
int m_verbosity
Definition: ModelRegion.hpp:40
uint64_t m_region_id
Definition: ModelRegion.hpp:41
virtual void run(void)=0
Definition: Accumulator.cpp:12