#include <PmeSolver.h>
Definition at line 33 of file PmeSolver.h.
PmePencilXMap::PmePencilXMap |
( |
int |
ia, |
|
|
int |
ib, |
|
|
int |
width, |
|
|
const std::vector< int > & |
pes |
|
) |
| |
|
inline |
Definition at line 35 of file PmeSolver.h.
35 : ia(ia), ib(ib), width(width), pes(pes) {}
virtual void PmePencilXMap::populateInitial |
( |
int |
, |
|
|
CkArrayOptions & |
, |
|
|
void * |
msg, |
|
|
CkArrMgr * |
mgr |
|
) |
| |
|
inlinevirtual |
Definition at line 45 of file PmeSolver.h.
References NAMD_bug(), and procNum().
46 for (
int i=0;i < pes.size();i++) {
47 if (pes[i] == CkMyPe()) {
48 if ( msg == NULL )
NAMD_bug(
"PmePencilXMap::populateInitial, multiple pencils on a pe?");
49 CkArrayIndex3D ai(0,0,0);
50 ai.data()[ib] = i / width;
51 ai.data()[ia] = i % width;
53 if (
procNum(0,ai) != CkMyPe() )
NAMD_bug(
"PmePencilXMap::populateInitial, map is inconsistent");
54 mgr->insertInitial(ai,msg);
59 if (msg != NULL) CkFreeMsg(msg);
virtual int procNum(int, const CkArrayIndex &idx)
void NAMD_bug(const char *err_msg)
virtual int PmePencilXMap::procNum |
( |
int |
, |
|
|
const CkArrayIndex & |
idx |
|
) |
| |
|
inlinevirtual |
Definition at line 39 of file PmeSolver.h.
References NAMD_bug().
Referenced by populateInitial().
40 int ind = idx.data()[ia] + idx.data()[ib] * width;
41 if (ind < 0 || ind >= pes.size())
42 NAMD_bug(
"PmePencilXMap::procNum, index out of bounds");
void NAMD_bug(const char *err_msg)
int PmePencilXMap::registerArray |
( |
CkArrayIndex & |
numElements, |
|
|
CkArrayID |
aid |
|
) |
| |
|
inline |
The documentation for this class was generated from the following file: