OptPmePencilMapY Class Reference

#include <fftmap.h>

List of all members.

Public Member Functions

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


Detailed Description

Definition at line 156 of file fftmap.h.


Constructor & Destructor Documentation

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

Definition at line 163 of file fftmap.h.

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

00163                                                        {
00164     _initialized = false;
00165     _info.xBlocks = xblock;
00166     _info.yBlocks = yblock;
00167     _info.zBlocks = zblock;    
00168     global_map_y = thisProxy;
00169   }

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

Definition at line 193 of file fftmap.h.

00193 {}


Member Function Documentation

void OptPmePencilMapY::initialize ( void   )  [inline]

Definition at line 171 of file fftmap.h.

References if(), initializePmeMap(), pencilPMEProcessors, x, PmeFFTInfo::xBlocks, z, and PmeFFTInfo::zBlocks.

Referenced by procNum().

00171                            {
00172     _initialized = true;
00173     _mapcache = (int *) malloc(_info.xBlocks * _info.zBlocks * sizeof(int)); 
00174     
00175     SortableResizeArray<int>    xprocs;
00176     SortableResizeArray<int>    yprocs;
00177     SortableResizeArray<int>    zprocs;
00178     
00179     initializePmeMap (_info, xprocs, yprocs, zprocs);
00180     
00181     for (int x = 0; x < _info.xBlocks; x ++) {
00182       for (int z = 0; z < _info.zBlocks; z++) {
00183         int index = z + x * _info.zBlocks;
00184         int pe = yprocs[index];
00185         _mapcache [index] = pe;
00186 
00187         if (CkMyPe() == 0) 
00188           pencilPMEProcessors[pe] = 1;
00189       }
00190     }
00191   }

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

Definition at line 195 of file fftmap.h.

References initialize(), and PmeFFTInfo::zBlocks.

00195                                                 {
00196     if (!_initialized) initialize();
00197 
00198     CkArrayIndex3D idx3d = *(CkArrayIndex3D *) &idx;
00199     int index = idx3d.index[2] + idx3d.index[0] * _info.zBlocks;
00200     return _mapcache [index];
00201   }


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