PmePencilXMap Class Reference

#include <PmeSolver.h>

List of all members.

Public Member Functions

 PmePencilXMap (int ia, int ib, int width, std::vector< int > &pes)
int registerArray (CkArrayIndex &numElements, CkArrayID aid)
virtual int procNum (int, const CkArrayIndex &idx)
virtual void populateInitial (int, CkArrayOptions &, void *msg, CkArrMgr *mgr)


Detailed Description

Definition at line 33 of file PmeSolver.h.


Constructor & Destructor Documentation

PmePencilXMap::PmePencilXMap ( int  ia,
int  ib,
int  width,
std::vector< int > &  pes 
) [inline]

Definition at line 35 of file PmeSolver.h.

00035 : ia(ia), ib(ib), width(width), pes(pes) {}


Member Function Documentation

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

Definition at line 45 of file PmeSolver.h.

References NAMD_bug(), and procNum().

00045                                                                                 {
00046     for (int i=0;i < pes.size();i++) {
00047       if (pes[i] == CkMyPe()) {
00048         if ( msg == NULL ) NAMD_bug("PmePencilXMap::populateInitial, multiple pencils on a pe?");
00049         CkArrayIndex3D ai(0,0,0);
00050         ai.data()[ib] = i / width;
00051         ai.data()[ia] = i % width;
00052         //fprintf(stderr, "Pe %d i %d at %d %d\n", pes[i], i, ai.data()[ia], ai.data()[ib]);
00053         if ( procNum(0,ai) != CkMyPe() ) NAMD_bug("PmePencilXMap::populateInitial, map is inconsistent");
00054         mgr->insertInitial(ai,msg);
00055         msg = NULL;
00056       }
00057     }
00058     mgr->doneInserting();
00059     if (msg != NULL) CkFreeMsg(msg);
00060   }

virtual int PmePencilXMap::procNum ( int  ,
const CkArrayIndex &  idx 
) [inline, virtual]

Definition at line 39 of file PmeSolver.h.

References NAMD_bug().

Referenced by populateInitial().

00039                                                     {
00040     int ind = idx.data()[ia] + idx.data()[ib] * width;
00041     if (ind < 0 || ind >= pes.size())
00042       NAMD_bug("PmePencilXMap::procNum, index out of bounds");
00043     return pes[ind];
00044   }

int PmePencilXMap::registerArray ( CkArrayIndex &  numElements,
CkArrayID  aid 
) [inline]

Definition at line 36 of file PmeSolver.h.

00036                                                               {
00037     return 0;
00038   }


The documentation for this class was generated from the following file:
Generated on Mon Sep 25 01:17:19 2017 for NAMD by  doxygen 1.4.7