PPL Logo

LineFFTArray Class Reference

Main Pencil FFT Chare Array. More...

#include <pencilfft.h>

Inheritance diagram for LineFFTArray:

Inheritance graph
[legend]
Collaboration diagram for LineFFTArray:

Collaboration graph
[legend]

Public Member Functions

 LineFFTArray (CkMigrateMessage *m)
 Entry Methods.
 LineFFTArray ()
 The default constructor.
 LineFFTArray (LineFFTInfo &info, int phase)
 the real constructor
 ~LineFFTArray ()
void receiveGridMessage (LineFFTGridMsg *msg)
 Receive data points to be fft'ed.
void receiveFFTMessage (LineFFTMsg *msg)
 Receive an intermediate FFT message.
void startFFT (int direction=FFTW_FORWARD)
 Start the 3D fft operation.
void setNumGridMessages (int n, CkCallback &cb)
 Set the number of grid messages to expect.

Private Member Functions

void sendFFTMessages (int dir)
 End Entry Methods.
void sendGridMessages ()
 Send the grids back to the callers.
void call_donecallback ()
 Call the application done callback.

Private Attributes

complex_line
 The fft points.
fftw_plan _fwdplan
 Forward and backward fftw plans.
fftw_plan _bwdplan
LineFFTInfo _info
 The FFT info structure.
LineFFTPhase _phase
int _curGridMessages
 the current number of grid messages received so far
int _curFFTMessages
 number of messssages received
int _nElements
 number of fft points in this thick pencil
int _fftSize
 size of the fft
int _nFFTMessages
int _nGridMessages
 Number of grid messages to expect before starting the FFT.
LineFFTGrid_gridList
 List of grids to send back to the the client.

Detailed Description

Main Pencil FFT Chare Array.

Definition at line 112 of file pencilfft.h.


Constructor & Destructor Documentation

LineFFTArray::LineFFTArray ( CkMigrateMessage m  )  [inline]

Entry Methods.

Add loadbalancing and migration later

Definition at line 171 of file pencilfft.h.

LineFFTArray::LineFFTArray (  )  [inline]

The default constructor.

Definition at line 176 of file pencilfft.h.

References _bwdplan, _curFFTMessages, _curGridMessages, _fwdplan, _line, and _nGridMessages.

LineFFTArray::LineFFTArray ( LineFFTInfo info,
int  phase 
)

LineFFTArray::~LineFFTArray (  )  [inline]

Definition at line 190 of file pencilfft.h.

References _line.


Member Function Documentation

void LineFFTArray::receiveGridMessage ( LineFFTGridMsg msg  ) 

Receive data points to be fft'ed.

This will happen in the first and last phases

This will happen in the first and last phases

Definition at line 290 of file pencilfft.C.

References _curGridMessages, _gridList, _info, _line, _nElements, _nGridMessages, _phase, CkFreeMsg(), LineFFTGridMsg::data, LineFFTInfo::grainY, LineFFTInfo::grainZ, LineFFTGridMsg::grid, PHASE_X, ckcomplex::re, LineFFTInfo::sizeX, startFFT(), LineFFTGrid::x0, LineFFTGrid::xsize, LineFFTGrid::y0, LineFFTGrid::ysize, LineFFTGrid::z0, and LineFFTGrid::zsize.

void LineFFTArray::receiveFFTMessage ( LineFFTMsg *  msg  ) 

void LineFFTArray::startFFT ( int  dir = FFTW_FORWARD  ) 

Start the 3D fft operation.

This can be called externally or intiated when all the grid/fft messages have been received.

This can be called externally or intiated when all the grid/fft messages have been received.

Definition at line 237 of file pencilfft.C.

References _bwdplan, _fftSize, _fwdplan, _info, _line, _nElements, _phase, call_donecallback(), ckcomplex::im, LineFFTInfo::normalize, PHASE_X, PHASE_Z, ckcomplex::re, sendFFTMessages(), LineFFTInfo::sizeX, LineFFTInfo::sizeY, and LineFFTInfo::sizeZ.

Referenced by receiveFFTMessage(), and receiveGridMessage().

void LineFFTArray::setNumGridMessages ( int  n,
CkCallback cb 
) [inline]

Set the number of grid messages to expect.

Definition at line 215 of file pencilfft.h.

References _gridList, _nGridMessages, and CkReduction::sum_int.

void LineFFTArray::sendFFTMessages ( int  dir  )  [private]

End Entry Methods.

Send the fft messages for the next few phases.

Send the fft messages for the next few phases

Entry constructs a LineFFTMsg by splitting the thick pencil into chunks and then sends a chunk to a the neighbor intersecting on that chunk. The message is always formatted in the XYZ order

Definition at line 137 of file pencilfft.C.

References _info, _line, _nElements, _nFFTMessages, _phase, Converse::CkMyPe(), LineFFTInfo::grainX, LineFFTInfo::grainY, LineFFTInfo::grainZ, msg, PHASE_X, PHASE_Y, PHASE_Z, size, LineFFTInfo::sizeX, LineFFTInfo::sizeY, LineFFTInfo::sizeZ, LineFFTInfo::xProxy, LineFFTInfo::yProxy, and LineFFTInfo::zProxy.

Referenced by startFFT().

void LineFFTArray::sendGridMessages (  )  [private]

Send the grids back to the callers.

Receive data points to be fft'ed.

This will happen in the first and last phases

Definition at line 338 of file pencilfft.C.

References _gridList, _info, _line, _nElements, _nGridMessages, LineFFTGrid::cb_done, LineFFTGridMsg::data, LineFFTInfo::grainY, LineFFTInfo::grainZ, msg, ckcomplex::re, CkCallback::send(), LineFFTInfo::sizeX, LineFFTGrid::x0, LineFFTGrid::xsize, LineFFTGrid::y0, LineFFTGrid::ysize, LineFFTGrid::z0, and LineFFTGrid::zsize.

Referenced by call_donecallback().

void LineFFTArray::call_donecallback (  )  [inline, private]

Call the application done callback.

Definition at line 246 of file pencilfft.h.

References _info, _phase, ARRAY_REDUCTION, LineFFTInfo::completionId, PHASE_X, sendGridMessages(), and CkReduction::sum_int.

Referenced by startFFT().


Field Documentation

The fft points.

The order of the points depends on the phase. For example in Phase_X they will be stored in an XYZ order.

Definition at line 117 of file pencilfft.h.

Referenced by LineFFTArray(), receiveFFTMessage(), receiveGridMessage(), sendFFTMessages(), sendGridMessages(), startFFT(), and ~LineFFTArray().

fftw_plan LineFFTArray::_fwdplan [private]

Forward and backward fftw plans.

Definition at line 120 of file pencilfft.h.

Referenced by LineFFTArray(), and startFFT().

fftw_plan LineFFTArray::_bwdplan [private]

Definition at line 120 of file pencilfft.h.

Referenced by LineFFTArray(), and startFFT().

The FFT info structure.

Definition at line 125 of file pencilfft.h.

Referenced by call_donecallback(), receiveFFTMessage(), receiveGridMessage(), sendFFTMessages(), sendGridMessages(), and startFFT().

the current number of grid messages received so far

Definition at line 133 of file pencilfft.h.

Referenced by LineFFTArray(), and receiveGridMessage().

number of messssages received

Definition at line 138 of file pencilfft.h.

Referenced by LineFFTArray(), and receiveFFTMessage().

number of fft points in this thick pencil

Definition at line 143 of file pencilfft.h.

Referenced by LineFFTArray(), receiveFFTMessage(), receiveGridMessage(), sendFFTMessages(), sendGridMessages(), and startFFT().

size of the fft

Definition at line 148 of file pencilfft.h.

Referenced by LineFFTArray(), and startFFT().

Definition at line 150 of file pencilfft.h.

Referenced by LineFFTArray(), receiveFFTMessage(), and sendFFTMessages().

Number of grid messages to expect before starting the FFT.

Definition at line 155 of file pencilfft.h.

Referenced by LineFFTArray(), receiveGridMessage(), sendGridMessages(), and setNumGridMessages().

List of grids to send back to the the client.

Definition at line 160 of file pencilfft.h.

Referenced by receiveGridMessage(), sendGridMessages(), and setNumGridMessages().


The documentation for this class was generated from the following files:

Generated on Fri May 25 08:04:03 2012 for Charm++ by  doxygen 1.5.5