OptPmePencilMapZ Class Reference

#include <fftmap.h>

List of all members.

Public Member Functions

 OptPmePencilMapZ (int xblock, int yblock, int zblock)
void initialize ()
 OptPmePencilMapZ (CkMigrateMessage *m)
int procNum (int foo, const CkArrayIndex &idx)


Detailed Description

Definition at line 204 of file fftmap.h.


Constructor & Destructor Documentation

OptPmePencilMapZ::OptPmePencilMapZ ( int  xblock,
int  yblock,
int  zblock 
) [inline]

Definition at line 211 of file fftmap.h.

References global_map_z, PmeFFTInfo::xBlocks, PmeFFTInfo::yBlocks, and PmeFFTInfo::zBlocks.

00211                                                        {
00212     _initialized = false;
00213     _info.xBlocks = xblock;
00214     _info.yBlocks = yblock;
00215     _info.zBlocks = zblock;    
00216     global_map_z = thisProxy;
00217   }

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

Definition at line 241 of file fftmap.h.

00241 {}


Member Function Documentation

void OptPmePencilMapZ::initialize ( void   )  [inline]

Definition at line 219 of file fftmap.h.

References if(), initializePmeMap(), pencilPMEProcessors, x, PmeFFTInfo::xBlocks, y, and PmeFFTInfo::yBlocks.

Referenced by procNum().

00219                            {
00220     _initialized = true;
00221     _mapcache = (int *) malloc(_info.xBlocks * _info.yBlocks * sizeof(int)); 
00222 
00223     SortableResizeArray<int>    xprocs;
00224     SortableResizeArray<int>    yprocs;
00225     SortableResizeArray<int>    zprocs;
00226     
00227     initializePmeMap (_info, xprocs, yprocs, zprocs);
00228 
00229     for (int x = 0; x < _info.xBlocks; x++) {
00230       for (int y = 0; y < _info.yBlocks; y ++) {        
00231         int index = y + x * _info.yBlocks;
00232         int pe = zprocs[index];
00233         _mapcache[index] = pe;
00234 
00235         if (CkMyPe() == 0)
00236           pencilPMEProcessors[pe] = 1;
00237       }
00238     }
00239   }

int OptPmePencilMapZ::procNum ( int  foo,
const CkArrayIndex &  idx 
) [inline]

Definition at line 243 of file fftmap.h.

References initialize(), and PmeFFTInfo::yBlocks.

00243                                                 {
00244     if (!_initialized) initialize();
00245     
00246     CkArrayIndex3D idx3d = *(CkArrayIndex3D *) &idx;
00247     int index = idx3d.index[1] + idx3d.index[0] * _info.yBlocks;
00248     return _mapcache[index];
00249   }


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