ExaFMM 1
Fast-multipole Method for exascale systems
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions
Evaluator< equation > Class Template Reference

Interface between tree and kernel. More...

#include <evaluator.h>

Inheritance diagram for Evaluator< equation >:
Inheritance graph
[legend]
Collaboration diagram for Evaluator< equation >:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Evaluator ()
 Constructor.
 ~Evaluator ()
 Destructor.
void random (Bodies &bodies, int seed=1, int numSplit=1)
 Random distribution in [-1,1]^3 cube.
void sphere (Bodies &bodies, int seed=1, int numSplit=1)
 Random distribution on r = 1 sphere.
void lattice (Bodies &bodies)
 Uniform distribution on [-1,1]^3 lattice (for debugging)
void addM2L (C_iter Cj)
 Add single list for kernel unit test.
void addM2P (C_iter Cj)
 Add single list for kernel unit test.
Bodies periodicBodies (Bodies &bodies)
 Create periodic images of bodies.
void interact (C_iter Ci, C_iter Cj, PairQueue &pairQueue)
 Use multipole acceptance criteria to determine whether to approximate, do P2P, or subdivide.
void traverse (Cells &cells, Cells &jcells)
 Dual tree traversal.
void neighbor (Cells &cells, Cells &jcells)
 Traverse neighbor cells only (for cutoff based methods)
void setSourceBody ()
 Set source buffer for bodies (for GPU)
void setSourceCell (bool isM)
 Set source buffer for cells (for GPU)
void setTargetBody (Lists lists, Maps flags)
 Set target buffer for bodies (for GPU)
void setTargetCell (Lists lists, Maps flags)
 Set target buffer for cells (for GPU)
void getTargetBody (Lists &lists)
 Get body values from target buffer (for GPU)
void getTargetCell (Lists &lists, bool isM)
 Get cell values from target buffer (for GPU)
void clearBuffers ()
 Clear GPU buffers.
void evalP2P (Bodies &ibodies, Bodies &jbodies, bool onCPU=false)
 Evaluate all P2P kernels (all pairs)
void evalP2M (Cells &cells)
 Evaluate all P2M kernels.
void evalM2M (Cells &cells, Cells &jcells)
 Evaluate all M2M kernels.
void evalM2L (C_iter Ci, C_iter Cj)
 Evaluate on CPU, queue on GPU.
void evalM2L (Cells &cells)
 Evaluate queued M2L kernels.
void evalM2P (C_iter Ci, C_iter Cj)
 Evaluate on CPU, queue on GPU.
void evalM2P (Cells &cells)
 Evaluate queued M2P kernels.
void evalP2P (C_iter Ci, C_iter Cj)
 Evaluate on CPU, queue on GPU.
void evalP2P (Cells &cells)
 Evaluate queued P2P kernels (near field)
void evalL2L (Cells &cells)
 Evaluate all L2L kernels.
void evalL2P (Cells &cells)
 Evaluate all L2P kernels.
void evalEwaldReal (C_iter Ci, C_iter Cj)
 Evaluate on CPU, queue on GPU.
void evalEwaldReal (Cells &cells)
 Evaluate queued Ewald real kernels.

Protected Member Functions

int getLevel (bigint index)
 Get level from cell index.
void timeKernels ()
 Time all kernels for auto-tuning.
void upwardPeriodic (Cells &jcells)
 Upward phase for periodic cells.
void traversePeriodic (Cells &cells, Cells &jcells)
 Traverse tree for periodic cells.

Protected Attributes

C_iter CiB
 icells begin per call
C_iter CiE
 icells end per call
C_iter CjB
 jcells begin per call
C_iter CjE
 jcells end per call
Lists listM2L
 M2L interaction list.
Lists listM2P
 M2P interaction list.
Lists listP2P
 P2P interaction list.
real timeM2L
 M2L execution time.
real timeM2P
 M2P execution time.
real timeP2P
 P2P execution time.
int Iperiodic
 Periodic image flag (using each bit for images)
const int Icenter
 Periodic image flag at center.
Maps flagM2L
 Existance of periodic image for M2L.
Maps flagM2P
 Existance of periodic image for M2P.
Maps flagP2P
 Existance of periodic image for P2P.

Private Member Functions

void approximate (C_iter Ci, C_iter Cj)
 < Initialize target values
void traverseStack (C_iter Ci, C_iter C)
 Traverse a single tree using a stack.
void traverseQueue (Pair pair)
 Traverse a pair of trees using a queue.
int getPeriodicRange ()
 Get range of periodic images.

Detailed Description

template<Equation equation>
class Evaluator< equation >

Interface between tree and kernel.

Definition at line 29 of file evaluator.h.


Constructor & Destructor Documentation

template<Equation equation>
Evaluator< equation >::Evaluator ( ) [inline]

Constructor.

Definition at line 256 of file evaluator.h.

template<Equation equation>
Evaluator< equation >::~Evaluator ( ) [inline]

Destructor.

Definition at line 258 of file evaluator.h.


Member Function Documentation

template<Equation equation>
void Evaluator< equation >::addM2L ( C_iter  Cj) [inline]

Add single list for kernel unit test.

Definition at line 318 of file evaluator.h.

Here is the caller graph for this function:

template<Equation equation>
void Evaluator< equation >::addM2P ( C_iter  Cj) [inline]

Add single list for kernel unit test.

Definition at line 326 of file evaluator.h.

Here is the caller graph for this function:

template<Equation equation>
void Evaluator< equation >::approximate ( C_iter  Ci,
C_iter  Cj 
) [inline, private]

< Initialize target values

Approximate interaction between two cells

Definition at line 84 of file evaluator.h.

Here is the call graph for this function:

Here is the caller graph for this function:

template<Equation equation>
void Evaluator< equation >::clearBuffers ( )

Clear GPU buffers.

template<Equation equation>
void Evaluator< equation >::evalEwaldReal ( C_iter  Ci,
C_iter  Cj 
)

Evaluate on CPU, queue on GPU.

Here is the caller graph for this function:

template<Equation equation>
void Evaluator< equation >::evalEwaldReal ( Cells cells)

Evaluate queued Ewald real kernels.

template<Equation equation>
void Evaluator< equation >::evalL2L ( Cells cells)

Evaluate all L2L kernels.

Here is the caller graph for this function:

template<Equation equation>
void Evaluator< equation >::evalL2P ( Cells cells)

Evaluate all L2P kernels.

Here is the caller graph for this function:

template<Equation equation>
void Evaluator< equation >::evalM2L ( C_iter  Ci,
C_iter  Cj 
)

Evaluate on CPU, queue on GPU.

Here is the caller graph for this function:

template<Equation equation>
void Evaluator< equation >::evalM2L ( Cells cells)

Evaluate queued M2L kernels.

template<Equation equation>
void Evaluator< equation >::evalM2M ( Cells cells,
Cells jcells 
)

Evaluate all M2M kernels.

Here is the caller graph for this function:

template<Equation equation>
void Evaluator< equation >::evalM2P ( Cells cells)

Evaluate queued M2P kernels.

template<Equation equation>
void Evaluator< equation >::evalM2P ( C_iter  Ci,
C_iter  Cj 
)

Evaluate on CPU, queue on GPU.

Here is the caller graph for this function:

template<Equation equation>
void Evaluator< equation >::evalP2M ( Cells cells)

Evaluate all P2M kernels.

Here is the caller graph for this function:

template<Equation equation>
void Evaluator< equation >::evalP2P ( C_iter  Ci,
C_iter  Cj 
)

Evaluate on CPU, queue on GPU.

template<Equation equation>
void Evaluator< equation >::evalP2P ( Cells cells)

Evaluate queued P2P kernels (near field)

template<Equation equation>
void Evaluator< equation >::evalP2P ( Bodies ibodies,
Bodies jbodies,
bool  onCPU = false 
)

Evaluate all P2P kernels (all pairs)

Here is the caller graph for this function:

template<Equation equation>
int Evaluator< equation >::getLevel ( bigint  index) [inline, protected]

Get level from cell index.

Definition at line 171 of file evaluator.h.

Here is the caller graph for this function:

template<Equation equation>
int Evaluator< equation >::getPeriodicRange ( ) [inline, private]

Get range of periodic images.

Definition at line 161 of file evaluator.h.

Here is the caller graph for this function:

template<Equation equation>
void Evaluator< equation >::getTargetBody ( Lists lists)

Get body values from target buffer (for GPU)

template<Equation equation>
void Evaluator< equation >::getTargetCell ( Lists lists,
bool  isM 
)

Get cell values from target buffer (for GPU)

template<Equation equation>
void Evaluator< equation >::interact ( C_iter  Ci,
C_iter  Cj,
PairQueue pairQueue 
) [inline]

Use multipole acceptance criteria to determine whether to approximate, do P2P, or subdivide.

Definition at line 354 of file evaluator.h.

Here is the call graph for this function:

Here is the caller graph for this function:

template<Equation equation>
void Evaluator< equation >::lattice ( Bodies bodies) [inline]

Uniform distribution on [-1,1]^3 lattice (for debugging)

Definition at line 297 of file evaluator.h.

Here is the call graph for this function:

template<Equation equation>
void Evaluator< equation >::neighbor ( Cells cells,
Cells jcells 
) [inline]

Traverse neighbor cells only (for cutoff based methods)

Definition at line 413 of file evaluator.h.

Here is the call graph for this function:

Here is the caller graph for this function:

template<Equation equation>
Bodies Evaluator< equation >::periodicBodies ( Bodies bodies) [inline]

Create periodic images of bodies.

Definition at line 334 of file evaluator.h.

Here is the call graph for this function:

Here is the caller graph for this function:

template<Equation equation>
void Evaluator< equation >::random ( Bodies bodies,
int  seed = 1,
int  numSplit = 1 
) [inline]

Random distribution in [-1,1]^3 cube.

Definition at line 261 of file evaluator.h.

Here is the call graph for this function:

Here is the caller graph for this function:

template<Equation equation>
void Evaluator< equation >::setSourceBody ( )

Set source buffer for bodies (for GPU)

template<Equation equation>
void Evaluator< equation >::setSourceCell ( bool  isM)

Set source buffer for cells (for GPU)

template<Equation equation>
void Evaluator< equation >::setTargetBody ( Lists  lists,
Maps  flags 
)

Set target buffer for bodies (for GPU)

template<Equation equation>
void Evaluator< equation >::setTargetCell ( Lists  lists,
Maps  flags 
)

Set target buffer for cells (for GPU)

template<Equation equation>
void Evaluator< equation >::sphere ( Bodies bodies,
int  seed = 1,
int  numSplit = 1 
) [inline]

Random distribution on r = 1 sphere.

Definition at line 277 of file evaluator.h.

Here is the call graph for this function:

Here is the caller graph for this function:

template<Equation equation>
void Evaluator< equation >::timeKernels ( ) [protected]

Time all kernels for auto-tuning.

Here is the caller graph for this function:

template<Equation equation>
void Evaluator< equation >::traverse ( Cells cells,
Cells jcells 
) [inline]

Dual tree traversal.

Definition at line 368 of file evaluator.h.

Here is the call graph for this function:

Here is the caller graph for this function:

template<Equation equation>
void Evaluator< equation >::traversePeriodic ( Cells cells,
Cells jcells 
) [inline, protected]

Traverse tree for periodic cells.

Definition at line 234 of file evaluator.h.

Here is the call graph for this function:

Here is the caller graph for this function:

template<Equation equation>
void Evaluator< equation >::traverseQueue ( Pair  pair) [inline, private]

Traverse a pair of trees using a queue.

Definition at line 124 of file evaluator.h.

Here is the call graph for this function:

Here is the caller graph for this function:

template<Equation equation>
void Evaluator< equation >::traverseStack ( C_iter  Ci,
C_iter  C 
) [inline, private]

Traverse a single tree using a stack.

Definition at line 105 of file evaluator.h.

Here is the call graph for this function:

Here is the caller graph for this function:

template<Equation equation>
void Evaluator< equation >::upwardPeriodic ( Cells jcells) [inline, protected]

Upward phase for periodic cells.

Definition at line 184 of file evaluator.h.

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

template<Equation equation>
C_iter Evaluator< equation >::CiB [protected]

icells begin per call

Definition at line 31 of file evaluator.h.

template<Equation equation>
C_iter Evaluator< equation >::CiE [protected]

icells end per call

Definition at line 32 of file evaluator.h.

template<Equation equation>
C_iter Evaluator< equation >::CjB [protected]

jcells begin per call

Definition at line 33 of file evaluator.h.

template<Equation equation>
C_iter Evaluator< equation >::CjE [protected]

jcells end per call

Definition at line 34 of file evaluator.h.

template<Equation equation>
Maps Evaluator< equation >::flagM2L [protected]

Existance of periodic image for M2L.

Definition at line 44 of file evaluator.h.

template<Equation equation>
Maps Evaluator< equation >::flagM2P [protected]

Existance of periodic image for M2P.

Definition at line 45 of file evaluator.h.

template<Equation equation>
Maps Evaluator< equation >::flagP2P [protected]

Existance of periodic image for P2P.

Definition at line 46 of file evaluator.h.

template<Equation equation>
const int Evaluator< equation >::Icenter [protected]

Periodic image flag at center.

Definition at line 43 of file evaluator.h.

template<Equation equation>
int Evaluator< equation >::Iperiodic [protected]

Periodic image flag (using each bit for images)

Definition at line 42 of file evaluator.h.

template<Equation equation>
Lists Evaluator< equation >::listM2L [protected]

M2L interaction list.

Definition at line 35 of file evaluator.h.

template<Equation equation>
Lists Evaluator< equation >::listM2P [protected]

M2P interaction list.

Definition at line 36 of file evaluator.h.

template<Equation equation>
Lists Evaluator< equation >::listP2P [protected]

P2P interaction list.

Definition at line 37 of file evaluator.h.

template<Equation equation>
real Evaluator< equation >::timeM2L [protected]

M2L execution time.

Definition at line 38 of file evaluator.h.

template<Equation equation>
real Evaluator< equation >::timeM2P [protected]

M2P execution time.

Definition at line 39 of file evaluator.h.

template<Equation equation>
real Evaluator< equation >::timeP2P [protected]

P2P execution time.

Definition at line 40 of file evaluator.h.


The documentation for this class was generated from the following file:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines