changa 3.5
Loading...
Searching...
No Matches
Compute Class Referenceabstract

Base clase for all tree based computations. More...

#include <Compute.h>

Inheritance diagram for Compute:
GravityCompute ListCompute PrefetchCompute SmoothCompute DummyPrefetchCompute KNearestSmoothCompute MarkSmoothCompute ReSmoothCompute

Public Member Functions

void setOpt (Opt *opt)
 
virtual int doWork (GenericTreeNode *, TreeWalk *tw, State *state, int chunk, int reqID, bool isRoot, bool &didcomp, int awi)=0
 Work to be done at each node.
 
virtual int openCriterion (TreePiece *ownerTP, GenericTreeNode *node, int reqID, State *state)=0
 
virtual void stateReady (State *state, TreePiece *owner, int chunk, int start, int end)
 
virtual void stateReadyPar (TreePiece *tp, int start, int end, CkVec< OffsetNode > &clist, CkVec< RemotePartInfo > &rpilist, CkVec< LocalPartInfo > &lpilist)
 
virtual void fillLists (State *state_, TreePiece *tp, int chunk, int start, int end, CkVec< OffsetNode > &clistforb, CkVec< RemotePartInfo > &rplistforb, CkVec< LocalPartInfo > &lplistforb)
 
virtual void init (void *cE, int activeRung, Opt *opt)
 Associate computeEntity (target bucket or node), activeRung and Optimization with this Compute object.
 
virtual void reassoc (void *cE, int aR, Opt *opt)
 
ComputeType getSelfType ()
 
OptType getOptType ()
 
int getActiveRung ()
 
virtual void initState (State *state)
 
virtual void startNodeProcessEvent (State *state)
 
virtual void finishNodeProcessEvent (TreePiece *owner, State *state)
 Allow book-keeping when finished with a node.
 
virtual void nodeMissedEvent (int reqID, int chunk, State *state, TreePiece *tp)
 Allow book-keeping of a cache miss.
 
virtual void nodeRecvdEvent (TreePiece *owner, int chunk, State *state, int bucket)
 Allow book-keeping of a cache receive event.
 
virtual void recvdParticles (ExternalGravityParticle *egp, int num, int chunk, int reqID, State *state, TreePiece *tp, Tree::NodeKey &remoteBucket)
 Allow book-keeping of a cache receive event.
 
virtual void recvdParticlesFull (GravityParticle *egp, int num, int chunk, int reqID, State *state, TreePiece *tp, Tree::NodeKey &remoteBucket)
 Allow book-keeping of a cache receive event.
 
virtual void walkDone (State *state)
 
virtual void setComputeEntity (void *ce)
 
virtual void * getComputeEntity ()
 
virtual StategetNewState (int d1, int d2)
 
virtual StategetNewState (int d1)
 
virtual StategetNewState ()
 
virtual void freeState (State *state)
 

Public Attributes

int nActive
 

Protected Member Functions

 Compute (ComputeType t)
 

Protected Attributes

Optopt
 
void * computeEntity
 
int activeRung
 
ComputeType type
 

Detailed Description

Base clase for all tree based computations.

The Compute object determines what work is to be done at each treenode, as well as what gets done at the beginning and the end of a walk. The key method is doWork().

Member Function Documentation

◆ doWork()

virtual int Compute::doWork ( GenericTreeNode * ,
TreeWalk * tw,
State * state,
int chunk,
int reqID,
bool isRoot,
bool & didcomp,
int awi )
pure virtual

Work to be done at each node.

Implemented in DummyPrefetchCompute, GravityCompute, ListCompute, PrefetchCompute, and SmoothCompute.

◆ fillLists()

virtual void Compute::fillLists ( State * state_,
TreePiece * tp,
int chunk,
int start,
int end,
CkVec< OffsetNode > & clistforb,
CkVec< RemotePartInfo > & rplistforb,
CkVec< LocalPartInfo > & lplistforb )
inlinevirtual

Reimplemented in ListCompute.

◆ finishNodeProcessEvent()

virtual void Compute::finishNodeProcessEvent ( TreePiece * owner,
State * state )
inlinevirtual

Allow book-keeping when finished with a node.

Reimplemented in KNearestSmoothCompute, MarkSmoothCompute, PrefetchCompute, and ReSmoothCompute.

◆ freeState()

void Compute::freeState ( State * state)
virtual

Reimplemented in ListCompute.

◆ getNewState() [1/3]

State * Compute::getNewState ( )
virtual

Reimplemented in ListCompute, and ReSmoothCompute.

◆ getNewState() [2/3]

State * Compute::getNewState ( int d1)
virtual

Reimplemented in ListCompute, and ReSmoothCompute.

◆ getNewState() [3/3]

State * Compute::getNewState ( int d1,
int d2 )
virtual

Reimplemented in ListCompute, and ReSmoothCompute.

◆ initState()

virtual void Compute::initState ( State * state)
inlinevirtual

Reimplemented in ListCompute.

◆ nodeMissedEvent()

virtual void Compute::nodeMissedEvent ( int reqID,
int chunk,
State * state,
TreePiece * tp )
inlinevirtual

Allow book-keeping of a cache miss.

Reimplemented in GravityCompute, ListCompute, and SmoothCompute.

◆ nodeRecvdEvent()

virtual void Compute::nodeRecvdEvent ( TreePiece * owner,
int chunk,
State * state,
int bucket )
inlinevirtual

Allow book-keeping of a cache receive event.

Reimplemented in GravityCompute, KNearestSmoothCompute, ListCompute, MarkSmoothCompute, and ReSmoothCompute.

◆ openCriterion()

virtual int Compute::openCriterion ( TreePiece * ownerTP,
GenericTreeNode * node,
int reqID,
State * state )
pure virtual

◆ reassoc()

virtual void Compute::reassoc ( void * cE,
int aR,
Opt * opt )
inlinevirtual

Reimplemented in ListCompute.

◆ recvdParticles()

virtual void Compute::recvdParticles ( ExternalGravityParticle * egp,
int num,
int chunk,
int reqID,
State * state,
TreePiece * tp,
Tree::NodeKey & remoteBucket )
inlinevirtual

Allow book-keeping of a cache receive event.

Reimplemented in GravityCompute, ListCompute, and PrefetchCompute.

◆ recvdParticlesFull()

virtual void Compute::recvdParticlesFull ( GravityParticle * egp,
int num,
int chunk,
int reqID,
State * state,
TreePiece * tp,
Tree::NodeKey & remoteBucket )
inlinevirtual

Allow book-keeping of a cache receive event.

Reimplemented in KNearestSmoothCompute, MarkSmoothCompute, and ReSmoothCompute.

◆ startNodeProcessEvent()

virtual void Compute::startNodeProcessEvent ( State * state)
inlinevirtual

virtual functions to allow for book-keeping these are essentially notifications to the Compute object from the TreeWalk that certain events have taken place - the Compute reacts accordingly.

Reimplemented in KNearestSmoothCompute, MarkSmoothCompute, PrefetchCompute, and ReSmoothCompute.

◆ stateReady()

virtual void Compute::stateReady ( State * state,
TreePiece * owner,
int chunk,
int start,
int end )
inlinevirtual

Reimplemented in ListCompute.

◆ stateReadyPar()

virtual void Compute::stateReadyPar ( TreePiece * tp,
int start,
int end,
CkVec< OffsetNode > & clist,
CkVec< RemotePartInfo > & rpilist,
CkVec< LocalPartInfo > & lpilist )
inlinevirtual

Reimplemented in ListCompute.

◆ walkDone()

virtual void Compute::walkDone ( State * state)
inlinevirtual

Reimplemented in ReSmoothCompute.


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