ls1-MarDyn
ls1-MarDyn molecular dynamics code
Classes | Public Member Functions | List of all members
FlopCounter Class Reference

#include <FlopCounter.h>

Inheritance diagram for FlopCounter:
CellProcessor

Public Member Functions

 FlopCounter (double cutoffRadius, double LJcutoffRadius)
 Set up the counter. More...
 
 ~FlopCounter ()
 
void initTraversal ()
 Initializes the internal counters. More...
 
void preprocessCell (ParticleCell &cell)
 Only pass through to child. More...
 
double processSingleMolecule (Molecule *, ParticleCell &)
 
void processCell (ParticleCell &cell)
 Count flops for this cell. More...
 
void processCellPair (ParticleCell &c1, ParticleCell &c2, bool sumAll=false)
 
void postprocessCell (ParticleCell &cell)
 Only pass through to child. More...
 
void endTraversal ()
 Print results. More...
 
double getTotalFlopCount () const
 
double getTotalMoleculeDistanceFlopCount () const
 
void resetCounters ()
 
double getMyFlopCount () const
 
void printStats () const
 
- Public Member Functions inherited from CellProcessor
 CellProcessor (const double cutoffRadius, const double LJCutoffRadius)
 
virtual ~CellProcessor ()
 
double getCutoffRadius () const
 
double getLJCutoffRadius () const
 
void setCutoffRadius (const double c)
 
void setLJCutoffRadius (const double ljc)
 
double getCutoffRadiusSquare () const
 
double getLJCutoffRadiusSquare () const
 
void setCutoffRadiusSquare (const double c)
 
void setLJCutoffRadiusSquare (const double ljc)
 

Additional Inherited Members

- Protected Attributes inherited from CellProcessor
double _cutoffRadiusSquare
 
double _LJCutoffRadiusSquare
 

Detailed Description

Author
Johannes Heckl
Nikola Tchipev

Constructor & Destructor Documentation

◆ FlopCounter()

FlopCounter::FlopCounter ( double  cutoffRadius,
double  LJcutoffRadius 
)

Set up the counter.

The CellProcessor is called after counting has been finished and
the runtime of the CellProcessor is measured. The CellProcessor is deleted
when LJFlopCounter is destructed.

Parameters
cutoffRadiusMust be the same as the cutoff radius for the CellProcessor.
LJcutoffRadiusMust be the same as the LJ cutoff radius for the CellProcessor.

◆ ~FlopCounter()

FlopCounter::~FlopCounter ( )

free threadData

Member Function Documentation

◆ endTraversal()

void FlopCounter::endTraversal ( )
virtual

Print results.

Implements CellProcessor.

◆ initTraversal()

void FlopCounter::initTraversal ( )
virtual

Initializes the internal counters.

Implements CellProcessor.

◆ postprocessCell()

void FlopCounter::postprocessCell ( ParticleCell cell)
inlinevirtual

Only pass through to child.

Implements CellProcessor.

◆ preprocessCell()

void FlopCounter::preprocessCell ( ParticleCell cell)
inlinevirtual

Only pass through to child.

Implements CellProcessor.

◆ processCell()

void FlopCounter::processCell ( ParticleCell cell)
virtual

Count flops for this cell.

Implements CellProcessor.

◆ processCellPair()

void FlopCounter::processCellPair ( ParticleCell cell1,
ParticleCell cell2,
bool  sumAll = false 
)
virtual

Called for each cell pair within the cutoff radius. Called exactly once per pair (i.e. pairs are not ordered).

Note
will not be called for empty cells. Sum up all macroscopic values (e.g. for hs) or only half of them (e.g. for fs)

Implements CellProcessor.

◆ processSingleMolecule()

double FlopCounter::processSingleMolecule ( Molecule ,
ParticleCell  
)
inlinevirtual

Implements CellProcessor.


The documentation for this class was generated from the following files: