PmePencilMap Class Reference

List of all members.

Public Member Functions

 PmePencilMap (int i_a, int i_b, int n_b, int n, int *d)
virtual int registerArray (CkArrayIndexMax &, CkArrayID)
virtual int procNum (int, const CkArrayIndex &i)
virtual void populateInitial (int, CkArrayIndexMax &, void *msg, CkArrMgr *mgr)

Detailed Description

Definition at line 159 of file ComputePme.C.


Constructor & Destructor Documentation

PmePencilMap::PmePencilMap ( int  i_a,
int  i_b,
int  n_b,
int  n,
int *  d 
) [inline]

Definition at line 161 of file ComputePme.C.

00162     : ia(i_a), ib(i_b), nb(n_b),
00163       size(n), data(newcopyint(n,d)) {
00164   }


Member Function Documentation

virtual void PmePencilMap::populateInitial ( int  ,
CkArrayIndexMax &  ,
void *  msg,
CkArrMgr *  mgr 
) [inline, virtual]

Definition at line 173 of file ComputePme.C.

References NAMD_bug(), and procNum().

00173                                                                                  {
00174     int mype = CkMyPe();
00175     for ( int i=0; i < size; ++i ) {
00176       if ( data[i] == mype ) {
00177         CkArrayIndex3D ai(0,0,0);
00178         ai.data()[ia] = i / nb;
00179         ai.data()[ib] = i % nb;
00180         if ( procNum(0,ai) != mype ) NAMD_bug("PmePencilMap is inconsistent");
00181         if ( ! msg ) NAMD_bug("PmePencilMap multiple pencils on a pe?");
00182         mgr->insertInitial(ai,msg);
00183         msg = 0;
00184       }
00185     }
00186     mgr->doneInserting();
00187     if ( msg ) CkFreeMsg(msg);
00188   }

virtual int PmePencilMap::procNum ( int  ,
const CkArrayIndex &  i 
) [inline, virtual]

Definition at line 169 of file ComputePme.C.

Referenced by populateInitial().

00169                                                   {
00170     //Return the home processor number for this element of this array
00171     return data[ i.data()[ia] * nb + i.data()[ib] ];
00172   }

virtual int PmePencilMap::registerArray ( CkArrayIndexMax &  ,
CkArrayID   
) [inline, virtual]

Definition at line 165 of file ComputePme.C.

00165                                                          {
00166     //Return an ``arrayHdl'', given some information about the array
00167     return 0;
00168   }


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