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
IpplCounter.h
Go to the documentation of this file.
1
// -*- C++ -*-
2
/***************************************************************************
3
*
4
* The IPPL Framework
5
*
6
*
7
* Visit http://people.web.psi.ch/adelmann/ for more details
8
*
9
***************************************************************************/
10
11
#ifndef IPPL_COUNTER_H
12
#define IPPL_COUNTER_H
13
14
/***************************************************************************
15
* IpplCounter - 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
37
class
IpplCounter
38
{
39
public
:
40
// constructor
41
IpplCounter
(
const
char
*category);
42
43
// destructor
44
~IpplCounter
();
45
46
// counter operations
47
void
startCounter
();
48
void
stopCounter
();
49
void
printIt
();
50
51
private
:
52
typedef
long
long
CounterLong
;
53
54
CounterLong
totalcyc_m
;
55
CounterLong
totalinst_m
;
56
CounterLong
c0_m
;
57
CounterLong
c21_m
;
58
59
#ifdef SGI_HW_COUNTERS
60
int
e0_m;
61
int
e1_m;
62
#endif
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: IpplCounter.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
* IPPL_VERSION_ID: $Id: addheaderfooter,v 1.1.1.1 2003/01/23 07:40:17 adelmann Exp $
81
***************************************************************************/
IpplCounter::stopCounter
void stopCounter()
Definition:
IpplCounter.cpp:69
IpplCounter::gen_read_m
int gen_read_m
Definition:
IpplCounter.h:64
IpplCounter::CounterLong
long long CounterLong
Definition:
IpplCounter.h:52
IpplCounter::category_m
std::string category_m
Definition:
IpplCounter.h:66
IpplCounter::gen_start_m
int gen_start_m
Definition:
IpplCounter.h:63
IpplCounter::totalinst_m
CounterLong totalinst_m
Definition:
IpplCounter.h:55
Inform.h
IpplCounter::printIt
void printIt()
Definition:
IpplCounter.cpp:86
IpplCounter::startCounter
void startCounter()
Definition:
IpplCounter.cpp:59
IpplCounter::totalcyc_m
CounterLong totalcyc_m
Definition:
IpplCounter.h:54
IpplCounter
Definition:
IpplCounter.h:37
IpplCounter::c0_m
CounterLong c0_m
Definition:
IpplCounter.h:56
IpplCounter::msg_m
Inform msg_m
Definition:
IpplCounter.h:67
IpplCounter::c21_m
CounterLong c21_m
Definition:
IpplCounter.h:57
Inform
Definition:
Inform.h:41
IpplCounter::~IpplCounter
~IpplCounter()
Definition:
IpplCounter.cpp:53
IpplCounter::IpplCounter
IpplCounter(const char *category)
Definition:
IpplCounter.cpp:41
Generated on Sat Jan 4 2020 14:47:39 for OPAL (Object Oriented Parallel Accelerator Library) by
1.8.5