44 inline void addFlops(
unsigned long long flops) {
50 count += (flops * sitesOnNode);
55 count += (flops * (
unsigned long long)(s.
numSiteTable()));
59 inline unsigned long long getFlops(
void)
const {
64 inline void report(
const std::string& name,
65 const double& time_in_seconds) {
67 double mflops_per_cpu = (double)count/((
double)(1000*1000)*time_in_seconds);
68 double mflops_overall = mflops_per_cpu;
70 double gflops_overall = mflops_overall/(double)(1000);
71 double tflops_overall = gflops_overall/(double)(1000);
73 QDPIO::cout <<
"QDP:FlopCount:" << name <<
" Performance/CPU: t=" << time_in_seconds <<
"(s) Flops=" << (double)count <<
" => " << mflops_per_cpu <<
" Mflops/cpu." << std::endl;
74 QDPIO::cout <<
"QDP:FlopCount:" << name <<
" Total performance: " << mflops_overall <<
" Mflops = " << gflops_overall <<
" Gflops = " << tflops_overall <<
" Tflops" << std::endl;
78 unsigned long long count;
79 const unsigned long long sitesOnNode;
void reset(void)
Explicit zero method. Clears flopcounts.
void addSiteFlops(unsigned long flops, const Subset &s)
Method to add per site flop count for a subset of sites. Count is multiplied by the site table size o...
FlopCounter(void)
Constructor - zeroes flopcount.
FlopCounter(const FlopCounter &c)
Copy Constructor.
void addSiteFlops(unsigned long long flops)
Method to add per site flop count. Count is multiplied by sitesOnNode().
unsigned long long getFlops(void) const
Method to retrieve accumulated flopcount.
void report(const std::string &name, const double &time_in_seconds)
Report floppage.
~FlopCounter()
Destructor - kills object. No cleanup needed.
void addFlops(unsigned long long flops)
Method to add raw number of flops (eg from Level 3 operators).
Subsets - controls how lattices are looped.
Layout namespace holding info on problem size and machine info.
StandardOutputStream cout
void globalSum(T &dest)
Sum across all nodes.
Yet another random number generator.