Bridge++
Ver. 1.2.x
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
5
#include "
counter.h
"
6
7
#include "libkek.h"
8
9
#include "
commonParameters.h
"
10
#include "
bridgeIO.h
"
11
using
Bridge::vout
;
12
13
int
Counter::cid_static
= 10;
14
//====================================================================
15
Counter::Counter
()
16
{
17
m_id
=
cid_static
;
18
++
cid_static
;
19
20
Bridge::VerboseLevel
vl
=
CommonParameters::Vlevel
();
21
vout
.
general
(vl,
"Counter_BGNET constructed with id = %d\n"
,
m_id
);
22
}
23
24
25
//====================================================================
26
void
Counter::start
()
27
{
28
KEK_FopCountStart(
m_id
);
29
}
30
31
32
//====================================================================
33
void
Counter::finish
()
34
{
35
double
time, gflops;
36
37
finish
(time, gflops);
38
39
Bridge::VerboseLevel
vl
=
CommonParameters::Vlevel
();
40
vout
.
general
(vl,
" time = %f GFlops = %f\n"
, time, gflops);
41
}
42
43
44
//====================================================================
45
void
Counter::finish
(
double
& time,
double
& gflops)
46
{
47
unsigned
long
count_op;
48
double
time_op;
49
50
KEK_FopCountFinish(
m_id
, &count_op, &time_op);
51
52
time = time_op;
53
gflops = 1.e-9 * double(count_op) / time_op;
54
}
55
56
57
//====================================================================
58
//============================================================END=====
Bridge::vout
BridgeIO vout
Definition:
bridgeIO.cpp:207
Counter::Counter
Counter()
Definition:
counter.cpp:15
Bridge::BridgeIO::general
void general(const char *format,...)
Definition:
bridgeIO.cpp:38
CommonParameters::Vlevel
static Bridge::VerboseLevel Vlevel()
Definition:
commonParameters.h:109
Counter::finish
void finish()
Definition:
counter.cpp:33
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:26
ParameterCheck::vl
Bridge::VerboseLevel vl
Definition:
checker.cpp:18
Bridge::VerboseLevel
VerboseLevel
Definition:
bridgeIO.h:25
bridgeIO.h
work
sueda-2
code
bridge-code
bridge-1.2.2
src
Communicator
BGNET
counter.cpp
Generated on Fri Jan 30 2015 16:45:56 for Bridge++ by
1.8.5