Panzer Version of the Day
Loading...
Searching...
No Matches
Panzer_PAPI_Counter2.hpp
Go to the documentation of this file.
1// @HEADER
2// *****************************************************************************
3// Panzer: A partial differential equation assembly
4// engine for strongly coupled complex multiphysics systems
5//
6// Copyright 2011 NTESS and the Panzer contributors.
7// SPDX-License-Identifier: BSD-3-Clause
8// *****************************************************************************
9// @HEADER
10
11#ifndef PANZER_PAPI_COUNTER_2_HPP
12#define PANZER_PAPI_COUNTER_2_HPP
13
14#include <string>
15#include <map>
16#include <vector>
17#include "papi.h"
18#include "Teuchos_Comm.hpp"
19#include "Teuchos_SerializationTraits.hpp"
20
21
22// namespace Teuchos {
23// template<typename Ordinal>
24// class SerializationTraits<Ordinal,long_long>
25// : public DirectSerializationTraits<Ordinal,long_long>
26// {};
27// }
28
29namespace panzer {
30
31
37
38 public:
39
41 PAPICounter2(const std::string);
42
45
47 static void addEventCounter(const int event);
48
49 static void report(std::ostream& os, const Teuchos::Comm<int>& comm);
50
51 static void startCounters();
52
53 static void stopCounters();
54
55 private:
56
58 long_long start_time;
60
61 std::vector<long_long> start_counters;
62 std::vector<long_long> stop_counters;
63 std::vector<long_long> accumulated_counters;
64
65 long_long num_calls;
66 };
67
69 static int m_event_set;
71 static std::vector<int> m_events;
73 static bool m_is_initialized;
75 static std::map<std::string,InternalCounter2> m_counters;
77 std::string m_name;
78
79 };
80
81}
82
83#endif
Interface to papi counters.
static void addEventCounter(const int event)
static bool m_is_initialized
true if the static members have been intitialized
static int m_event_set
PAPI event set.
static std::map< std::string, InternalCounter2 > m_counters
maps the counter name to the data object
std::string m_name
name of this counter
static void report(std::ostream &os, const Teuchos::Comm< int > &comm)
static std::vector< int > m_events
papi event index