OPAL (Object Oriented Parallel Accelerator Library)
2.2.0
OPAL
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
ippl
src
Utility
IplCounter.h
Go to the documentation of this file.
1
// -*- C++ -*-
2
/***************************************************************************
3
*
4
* The IPL Framework
5
*
6
*
7
* Visit http://people.web.psi.ch/adelmann/ for more details
8
*
9
***************************************************************************/
10
11
#ifndef IPL_COUNTER_H
12
#define IPL_COUNTER_H
13
14
/***************************************************************************
15
* IplCounter - a simple megaflops counter that accesses hardware counters
16
* for measureing megaflop performance.
17
*
18
* To use these counters:
19
* 1. Create a counter.
20
* example: Counter FFTcounter("FFT");
21
*
22
* 2. Locate the function which you would like to measure and start the
23
* counter by placing the startCounter() method before it. Then, stop
24
* the counter after it by using the stopCounter() method.
25
* example: FFTcounter.startCounter();
26
* fft->transform(....);
27
* FFTcounter.stopCounter();
28
*
29
* 3. Use the printIt() method to print to the screen.
30
* example: FFTcounter.printIt();
31
*
32
***************************************************************************/
33
34
// include files
35
#include "
Utility/Inform.h
"
36
#include
37
38
39
class
IplCounter
40
{
41
public
:
42
// constructor
43
IplCounter
(
const
char
*category);
44
45
// destructor
46
~IplCounter
();
47
48
// counter operations
49
void
startCounter
();
50
void
stopCounter
();
51
void
printIt
();
52
53
private
:
54
typedef
long
long
CounterLong
;
55
56
CounterLong
totalcyc_m
;
57
CounterLong
totalinst_m
;
58
CounterLong
c0_m
;
59
CounterLong
c21_m
;
60
61
int
e0_m
;
62
int
e1_m
;
63
int
gen_start_m
;
64
int
gen_read_m
;
65
66
std::string
category_m
;
67
Inform
msg_m
;
68
};
69
70
#endif
71
72
/***************************************************************************
73
* $RCSfile: IplCounter.h,v $ $Author: adelmann $
74
* $Revision: 1.1.1.1 $ $Date: 2003/01/23 07:40:33 $
75
***************************************************************************/
76
77
/***************************************************************************
78
* $RCSfile: addheaderfooter,v $ $Author: adelmann $
79
* $Revision: 1.1.1.1 $ $Date: 2003/01/23 07:40:17 $
80
* IPL_VERSION_ID: $Id: addheaderfooter,v 1.1.1.1 2003/01/23 07:40:17 adelmann Exp $
81
***************************************************************************/
82
IplCounter::printIt
void printIt()
IplCounter::IplCounter
IplCounter(const char *category)
IplCounter::c21_m
CounterLong c21_m
Definition:
IplCounter.h:59
IplCounter::gen_read_m
int gen_read_m
Definition:
IplCounter.h:64
IplCounter::~IplCounter
~IplCounter()
IplCounter::msg_m
Inform msg_m
Definition:
IplCounter.h:67
IplCounter::stopCounter
void stopCounter()
IplCounter::totalinst_m
CounterLong totalinst_m
Definition:
IplCounter.h:57
IplCounter::category_m
std::string category_m
Definition:
IplCounter.h:66
IplCounter::CounterLong
long long CounterLong
Definition:
IplCounter.h:54
IplCounter::startCounter
void startCounter()
Inform.h
IplCounter::gen_start_m
int gen_start_m
Definition:
IplCounter.h:63
IplCounter::e1_m
int e1_m
Definition:
IplCounter.h:62
IplCounter::totalcyc_m
CounterLong totalcyc_m
Definition:
IplCounter.h:56
Inform
Definition:
Inform.h:41
IplCounter::e0_m
int e0_m
Definition:
IplCounter.h:61
IplCounter::c0_m
CounterLong c0_m
Definition:
IplCounter.h:58
IplCounter
Definition:
IplCounter.h:39
Generated on Sat Jan 4 2020 14:47:39 for OPAL (Object Oriented Parallel Accelerator Library) by
1.8.5