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 170 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 172 of file ComputePme.C.

00173     : ia(i_a), ib(i_b), nb(n_b),
00174       size(n), data(newcopyint(n,d)) {
00175   }


Member Function Documentation

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

Definition at line 184 of file ComputePme.C.

References NAMD_bug(), and procNum().

00184                                                                                  {
00185     int mype = CkMyPe();
00186     for ( int i=0; i < size; ++i ) {
00187       if ( data[i] == mype ) {
00188         CkArrayIndex3D ai(0,0,0);
00189         ai.data()[ia] = i / nb;
00190         ai.data()[ib] = i % nb;
00191         if ( procNum(0,ai) != mype ) NAMD_bug("PmePencilMap is inconsistent");
00192         if ( ! msg ) NAMD_bug("PmePencilMap multiple pencils on a pe?");
00193         mgr->insertInitial(ai,msg);
00194         msg = 0;
00195       }
00196     }
00197     mgr->doneInserting();
00198     if ( msg ) CkFreeMsg(msg);
00199   }

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

Definition at line 180 of file ComputePme.C.

Referenced by populateInitial().

00180                                                   {
00181     //Return the home processor number for this element of this array
00182     return data[ i.data()[ia] * nb + i.data()[ib] ];
00183   }

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

Definition at line 176 of file ComputePme.C.

00176                                                          {
00177     //Return an ``arrayHdl'', given some information about the array
00178     return 0;
00179   }


The documentation for this class was generated from the following file:
Generated on Sun Feb 25 01:17:22 2018 for NAMD by  doxygen 1.4.7