MsmGridCutoff Class Reference

Inheritance diagram for MsmGridCutoff:

MsmGridCutoffKernel< Vtype, Mtype > List of all members.

Public Member Functions

 MsmGridCutoff ()
 MsmGridCutoff (CkMigrateMessage *m)
void init ()
void setup (MsmGridCutoffInitMsg *bmsg)
void setupSections (MsmGridCutoffSetupMsg *msg)
void compute (GridMsg *gmsg)

Public Attributes

CProxyElement_MsmBlock msmBlockElementProxy
CkSectionInfo cookie
msm::Grid< Floatehfull

Detailed Description

Definition at line 2193 of file ComputeMsm.C.


Constructor & Destructor Documentation

MsmGridCutoff::MsmGridCutoff (  )  [inline]

Definition at line 2204 of file ComputeMsm.C.

02204 { }

MsmGridCutoff::MsmGridCutoff ( CkMigrateMessage *  m  )  [inline]

Definition at line 2206 of file ComputeMsm.C.

02208     { }


Member Function Documentation

void MsmGridCutoff::compute ( GridMsg gmsg  )  [inline]

Reimplemented from MsmGridCutoffKernel< Vtype, Mtype >.

Definition at line 2273 of file ComputeMsm.C.

References ComputeMsmMgr::addPotential(), MsmTimer::COMM, MsmGridCutoffKernel< Vtype, Mtype >::compute(), msm::BlockIndex::level, msm::BlockIndex::n, GridMsg::put(), and SET_PRIORITY.

02273                                 {
02274 #ifdef DEBUG_MSM_GRID
02275       printf("MsmGridCutoff %d:  compute()\n", thisIndex);
02276 #endif
02277       // base class consumes this grid message
02278       MsmGridCutoffKernel<Float,Float>::compute(gmsg);
02279 
02280 #ifdef MSM_TIMING
02281       double startTime, stopTime;
02282       startTime = CkWallTimer();
02283 #endif
02284 #ifdef MSM_REDUCE_GRID
02285 
02286       // perform section reduction over potential grids
02287       CProxy_CkMulticastMgr mcastProxy =
02288         CkpvAccess(BOCclass_group).multicastMgr;
02289       CkMulticastMgr *mcastPtr =
02290         CProxy_CkMulticastMgr(mcastProxy).ckLocalBranch();
02291       CkCallback cb(CkIndex_MsmBlock::sumReducedPotential(NULL),
02292           msmBlockElementProxy);
02293       // sum into "full" sized buffer needed for contribute
02294       ehfull.reset(0);
02295       ehfull += eh;
02296       mcastPtr->contribute(
02297           ehfull.nn() * sizeof(Float), ehfull.data().buffer(), 
02298           CkReduction::sum_float, cookie, cb);
02299 
02300 #else
02301       // place eh into message
02302       const msm::BlockIndex& bindex = ehblockSend.nblock_wrap;
02303       int msgsz = eh.data().len() * sizeof(Float);
02304       GridMsg *gm = new(msgsz, sizeof(int)) GridMsg;
02305       SET_PRIORITY(gm, sequence, priority);
02306       gm->put(eh, bindex.level, sequence);
02307       // lookup in ComputeMsmMgr proxy array by level
02308       mgrLocal->msmBlock[bindex.level](
02309           bindex.n.i, bindex.n.j, bindex.n.k).addPotential(gm);
02310 
02311 #endif // MSM_REDUCE_GRID
02312 
02313 #ifdef MSM_TIMING
02314       stopTime = CkWallTimer();
02315       mgrLocal->msmTiming[MsmTimer::COMM] += stopTime - startTime;
02316       mgrLocal->doneTiming();
02317 #endif
02318     } // compute()

void MsmGridCutoff::init (  )  [inline]

Reimplemented from MsmGridCutoffKernel< Vtype, Mtype >.

Definition at line 2233 of file ComputeMsm.C.

References MsmGridCutoffKernel< Vtype, Mtype >::init().

02233                 {
02234       MsmGridCutoffKernel<Float,Float>::init();
02235     }

void MsmGridCutoff::setup ( MsmGridCutoffInitMsg bmsg  )  [inline]

Reimplemented from MsmGridCutoffKernel< Vtype, Mtype >.

Definition at line 2237 of file ComputeMsm.C.

References msm::Map::blockLevel, msm::Map::gc, msm::Map::gvc, j, ComputeMsmMgr::map, MsmGridCutoffKernel< Vtype, Mtype >::setup(), and MsmGridCutoffKernel< Vtype, Mtype >::setupWeights().

02237                                            {
02238       // base class consumes this init proxy  message
02239       MsmGridCutoffKernel<Float,Float>::setup(bmsg);
02240       // access type dependent constants from map
02241       MsmGridCutoffKernel<Float,Float>::setupWeights(
02242           &(map->gc[ehblockSend.nblock_wrap.level]),
02243           &(map->gvc[ehblockSend.nblock_wrap.level])
02244           );
02245 #ifdef MSM_REDUCE_GRID
02246       // allocate full buffer space needed for section reduction
02247       int level = ehblockSend.nblock_wrap.level;
02248       int i = ehblockSend.nblock_wrap.n.i;
02249       int j = ehblockSend.nblock_wrap.n.j;
02250       int k = ehblockSend.nblock_wrap.n.k;
02251       ehfull.init( map->blockLevel[level](i,j,k).nrange );
02252 #endif // MSM_REDUCE_GRID
02253 #ifdef DEBUG_MSM_GRID
02254       printf("MsmGridCutoff[%d]:  setup()"
02255           " send to level=%d block=(%d,%d,%d)\n",
02256           thisIndex, ehblockSend.nblock_wrap.level,
02257           ehblockSend.nblock_wrap.n.i,
02258           ehblockSend.nblock_wrap.n.j,
02259           ehblockSend.nblock_wrap.n.k);
02260 #endif
02261     }

void MsmGridCutoff::setupSections ( MsmGridCutoffSetupMsg msg  )  [inline]

Definition at line 2263 of file ComputeMsm.C.

References MsmGridCutoffSetupMsg::get().

02263                                                    {
02264 #ifdef DEBUG_MSM_GRID
02265       CkPrintf("MSM GRID CUTOFF %d setup section on PE %d\n",
02266           thisIndex, CkMyPe());
02267 #endif
02268       CkGetSectionInfo(cookie, msg);  // init the cookie
02269       msg->get(&msmBlockElementProxy);  // get proxy to MsmBlock
02270       delete msg;
02271     }


Member Data Documentation

CkSectionInfo MsmGridCutoff::cookie

Definition at line 2199 of file ComputeMsm.C.

msm::Grid<Float> MsmGridCutoff::ehfull

Definition at line 2201 of file ComputeMsm.C.

CProxyElement_MsmBlock MsmGridCutoff::msmBlockElementProxy

Definition at line 2198 of file ComputeMsm.C.


The documentation for this class was generated from the following file:
Generated on Wed Nov 22 01:17:21 2017 for NAMD by  doxygen 1.4.7