
#include <pencilfft.h>


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. | |
Definition at line 112 of file pencilfft.h.
| LineFFTArray::LineFFTArray | ( | CkMigrateMessage * | m | ) | [inline] |
| 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 | |||
| ) |
the real constructor
main constructor
Definition at line 10 of file pencilfft.C.
References _bwdplan, _curFFTMessages, _curGridMessages, _fftSize, _fwdplan, _line, _nElements, _nFFTMessages, _nGridMessages, _phase, LineFFTInfo::grainX, LineFFTInfo::grainY, LineFFTInfo::grainZ, PHASE_X, PHASE_Y, PHASE_Z, LineFFTInfo::sizeX, LineFFTInfo::sizeY, and LineFFTInfo::sizeZ.
| LineFFTArray::~LineFFTArray | ( | ) | [inline] |
| 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 | ) |
Receive an intermediate FFT message.
Definition at line 63 of file pencilfft.C.
References _curFFTMessages, _info, _line, _nElements, _nFFTMessages, _phase, CkFreeMsg(), LineFFTInfo::grainX, LineFFTInfo::grainY, LineFFTInfo::grainZ, PHASE_X, PHASE_Y, PHASE_Z, LineFFTInfo::sizeX, LineFFTInfo::sizeY, LineFFTInfo::sizeZ, and startFFT().
| 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().
complex* LineFFTArray::_line [private] |
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] |
LineFFTInfo LineFFTArray::_info [private] |
The FFT info structure.
Definition at line 125 of file pencilfft.h.
Referenced by call_donecallback(), receiveFFTMessage(), receiveGridMessage(), sendFFTMessages(), sendGridMessages(), and startFFT().
LineFFTPhase LineFFTArray::_phase [private] |
Definition at line 127 of file pencilfft.h.
Referenced by call_donecallback(), LineFFTArray(), receiveFFTMessage(), receiveGridMessage(), sendFFTMessages(), and startFFT().
int LineFFTArray::_curGridMessages [private] |
the current number of grid messages received so far
Definition at line 133 of file pencilfft.h.
Referenced by LineFFTArray(), and receiveGridMessage().
int LineFFTArray::_curFFTMessages [private] |
number of messssages received
Definition at line 138 of file pencilfft.h.
Referenced by LineFFTArray(), and receiveFFTMessage().
int LineFFTArray::_nElements [private] |
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().
int LineFFTArray::_fftSize [private] |
size of the fft
Definition at line 148 of file pencilfft.h.
Referenced by LineFFTArray(), and startFFT().
int LineFFTArray::_nFFTMessages [private] |
Definition at line 150 of file pencilfft.h.
Referenced by LineFFTArray(), receiveFFTMessage(), and sendFFTMessages().
int LineFFTArray::_nGridMessages [private] |
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().
LineFFTGrid* LineFFTArray::_gridList [private] |
List of grids to send back to the the client.
Definition at line 160 of file pencilfft.h.
Referenced by receiveGridMessage(), sendGridMessages(), and setNumGridMessages().
1.5.5