Cyclops Tensor Framework
parallel arithmetic on multidimensional arrays
Main Page
Modules
Namespaces
Data Structures
Files
File List
Globals
flop_counter.cxx
Go to the documentation of this file.
1
/*Copyright (c) 2011, Edgar Solomonik, all rights reserved.*/
2
3
#include "
timer.h
"
4
#include "
common.h
"
5
6
namespace
CTF
{
7
Flop_counter::Flop_counter
(){
8
start_count
=
CTF_int::get_flops
();
9
}
10
11
Flop_counter::~Flop_counter
(){
12
}
13
14
void
Flop_counter::zero
(){
15
start_count
=
CTF_int::get_flops
();
16
}
17
18
int64_t
Flop_counter::count
(MPI_Comm
comm
){
19
int64_t allf;
20
int64_t myf = (
CTF_int::get_flops
() -
start_count
);
21
MPI_Allreduce(&myf,&allf,1,MPI_INT64_T,MPI_SUM,comm);
22
return
allf;
23
}
24
}
CTF::comm
MPI_Comm comm
Definition:
int_timer.cxx:22
CTF::Flop_counter::zero
void zero()
restarts counter
Definition:
flop_counter.cxx:14
CTF_int::get_flops
int64_t get_flops()
Definition:
common.cxx:177
timer.h
CTF::Flop_counter::Flop_counter
Flop_counter()
constructor, starts counter
Definition:
flop_counter.cxx:7
CTF
Definition:
apsp.cxx:17
common.h
CTF::Flop_counter::~Flop_counter
~Flop_counter()
Definition:
flop_counter.cxx:11
CTF::Flop_counter::start_count
int64_t start_count
Definition:
timer.h:101
CTF::Flop_counter::count
int64_t count(MPI_Comm comm=MPI_COMM_SELF)
get total flop count over all counters in comm
Definition:
flop_counter.cxx:18
src
interface
flop_counter.cxx
Generated on Thu Feb 28 2019 19:22:24 for Cyclops Tensor Framework by
1.8.11