Bridge++
Version 1.4.4
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
counter.cpp
Go to the documentation of this file.
1
14
#include "
counter.h
"
15
16
#include "libkek.h"
17
18
#include "
Parameters/commonParameters.h
"
19
#include "
IO/bridgeIO.h
"
20
using
Bridge::vout
;
21
22
int
Counter::cid_static
= 10;
23
//====================================================================
24
Counter::Counter
()
25
{
26
m_id
=
cid_static
;
27
++
cid_static
;
28
29
Bridge::VerboseLevel
vl
=
CommonParameters::Vlevel
();
30
vout
.
general
(vl,
"Counter_BGNET constructed with id = %d\n"
,
m_id
);
31
}
32
33
34
//====================================================================
35
void
Counter::start
()
36
{
37
KEK_FopCountStart(
m_id
);
38
}
39
40
41
//====================================================================
42
void
Counter::finish
()
43
{
44
double
time, gflops;
45
46
finish
(time, gflops);
47
48
Bridge::VerboseLevel
vl
=
CommonParameters::Vlevel
();
49
vout
.
general
(vl,
" time = %f GFlops = %f\n"
, time, gflops);
50
}
51
52
53
//====================================================================
54
void
Counter::finish
(
double
& time,
double
& gflops)
55
{
56
unsigned
long
count_op;
57
double
time_op;
58
59
KEK_FopCountFinish(
m_id
, &count_op, &time_op);
60
61
time = time_op;
62
gflops = 1.e-9 * double(count_op) / time_op;
63
}
64
65
66
//====================================================================
67
//============================================================END=====
Bridge::vout
BridgeIO vout
Definition:
bridgeIO.cpp:495
Counter::Counter
Counter()
Definition:
counter.cpp:24
Bridge::BridgeIO::general
void general(const char *format,...)
Definition:
bridgeIO.cpp:195
CommonParameters::Vlevel
static Bridge::VerboseLevel Vlevel()
Definition:
commonParameters.h:120
Counter::finish
void finish()
Definition:
counter.cpp:42
Counter::cid_static
static int cid_static
static id to asign unique id to the instance.
Definition:
counter.h:27
commonParameters.h
Counter::m_id
int m_id
counter id.
Definition:
counter.h:26
counter.h
Counter::start
void start()
Definition:
counter.cpp:35
ParameterCheck::vl
Bridge::VerboseLevel vl
Definition:
checker.cpp:18
Bridge::VerboseLevel
VerboseLevel
Definition:
bridgeIO.h:42
bridgeIO.h
src
lib
Communicator
BGNET
counter.cpp
Generated on Thu Nov 30 2017 20:51:15 for Bridge++ by
1.8.6