Cyclops Tensor Framework
parallel arithmetic on multidimensional arrays
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 {
9  }
10 
12  }
13 
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 }
MPI_Comm comm
Definition: int_timer.cxx:22
void zero()
restarts counter
int64_t get_flops()
Definition: common.cxx:177
Flop_counter()
constructor, starts counter
Definition: flop_counter.cxx:7
Definition: apsp.cxx:17
int64_t start_count
Definition: timer.h:101
int64_t count(MPI_Comm comm=MPI_COMM_SELF)
get total flop count over all counters in comm