AccFFT
Functions
accfftf.cpp File Reference
#include <mpi.h>
#include <fftw3.h>
#include <omp.h>
#include <iostream>
#include <cmath>
#include <math.h>
#include "transpose.h"
#include <string.h>
#include "accfftf.h"
#include "accfft_common.h"

Functions

int accfft_local_size_dft_r2cf (int *n, int *isize, int *istart, int *osize, int *ostart, MPI_Comm c_comm)
 
accfft_planf * accfft_plan_dft_3d_r2cf (int *n, float *data, float *data_out, MPI_Comm c_comm, unsigned flags)
 
int accfft_local_size_dft_c2cf (int *n, int *isize, int *istart, int *osize, int *ostart, MPI_Comm c_comm)
 
accfft_planf * accfft_plan_dft_3d_c2cf (int *n, Complexf *data, Complexf *data_out, MPI_Comm c_comm, unsigned flags)
 
void accfft_execute_r2cf (accfft_planf *plan, float *data, Complexf *data_out, double *timer, std::bitset< 3 > XYZ)
 
void accfft_execute_c2rf (accfft_planf *plan, Complexf *data, float *data_out, double *timer, std::bitset< 3 > XYZ)
 
void accfft_execute_c2cf (accfft_planf *plan, int direction, Complexf *data, Complexf *data_out, double *timer, std::bitset< 3 > XYZ)
 
void accfft_destroy_plan (accfft_planf *plan)
 

Detailed Description

Single precision CPU functions of AccFFT

Function Documentation

void accfft_destroy_plan ( accfft_planf *  plan)

Destroy single precision AccFFT CPU plan.

Parameters
planInput plan to be destroyed.
void accfft_execute_c2cf ( accfft_planf *  plan,
int  direction,
Complexf *  data,
Complexf *  data_out,
double *  timer,
std::bitset< 3 >  XYZ 
)

Execute single precision C2C plan. This function is blocking and only returns after the transform is completed.

Note
For inplace transforms, data_out should point to the same memory address as data, AND the plan must have been created as inplace.
Parameters
planFFT plan created by accfft_plan_dft_3d_r2cf.
dataInput data in frequency domain.
data_outOutput data in frequency domain.
timerSee Timing AccFFT for more details.
XYZa bit set field that determines which directions FFT should be executed
void accfft_execute_c2rf ( accfft_planf *  plan,
Complexf *  data,
float *  data_out,
double *  timer,
std::bitset< 3 >  XYZ 
)

Execute single precision C2R plan. This function is blocking and only returns after the transform is completed.

Note
For inplace transform, data_out should point to the same memory address as data, AND the plan must have been created as inplace.
Parameters
planFFT plan created by accfft_plan_dft_3d_r2cf.
dataInput data in frequency domain.
data_outOutput data in frequency domain.
timerSee Timing AccFFT for more details.
XYZa bit set field that determines which directions FFT should be executed
void accfft_execute_r2cf ( accfft_planf *  plan,
float *  data,
Complexf *  data_out,
double *  timer,
std::bitset< 3 >  XYZ 
)

Execute single precision R2C plan. This function is blocking and only returns after the transform is completed.

Note
For inplace transforms, data_out should point to the same memory address as data, AND the plan must have been created as inplace.
Parameters
planFFT plan created by accfft_plan_dft_3d_r2cf.
dataInput data in spatial domain.
data_outOutput data in frequency domain.
timerSee Timing AccFFT for more details.
XYZa bit set field that determines which directions FFT should be executed
int accfft_local_size_dft_c2cf ( int *  n,
int *  isize,
int *  istart,
int *  osize,
int *  ostart,
MPI_Comm  c_comm 
)

Get the local sizes of the distributed global data for a C2C single precision transform

Parameters
nInteger array of size 3, corresponding to the global data size
isizeThe size of the data that is locally distributed to the calling process
istartThe starting index of the data that locally resides on the calling process
osizeThe output size of the data that locally resides on the calling process, after the C2C transform is finished
ostartThe output starting index of the data that locally resides on the calling process, after the R2C transform is finished
c_commCartesian communicator returned by accfft_create_comm
Returns
int accfft_local_size_dft_r2cf ( int *  n,
int *  isize,
int *  istart,
int *  osize,
int *  ostart,
MPI_Comm  c_comm 
)

Get the local sizes of the distributed global data for a R2C single precision transform

Parameters
nInteger array of size 3, corresponding to the global data size
isizeThe size of the data that is locally distributed to the calling process
istartThe starting index of the data that locally resides on the calling process
osizeThe output size of the data that locally resides on the calling process, after the R2C transform is finished
ostartThe output starting index of the data that locally resides on the calling process, after the R2C transform is finished
c_commCartesian communicator returned by accfft_create_comm
Returns
accfft_planf* accfft_plan_dft_3d_c2cf ( int *  n,
Complexf *  data,
Complexf *  data_out,
MPI_Comm  c_comm,
unsigned  flags 
)

Creates a 3D C2C single precision parallel FFT plan. If data_out point to the same location as the input data, then an inplace plan will be created. Otherwise the plan would be outplace.

Parameters
nInteger array of size 3, corresponding to the global data size
dataInput data in spatial domain
data_outOutput data in frequency domain
c_commCartesian communicator returned by accfft_create_comm
flagsAccFFT flags, See AccFFT Flags for more details.
Returns
accfft_planf* accfft_plan_dft_3d_r2cf ( int *  n,
float *  data,
float *  data_out,
MPI_Comm  c_comm,
unsigned  flags 
)

Creates a 3D R2C single precision parallel FFT plan. If data_out point to the same location as the input data, then an inplace plan will be created. Otherwise the plan would be outplace.

Parameters
nInteger array of size 3, corresponding to the global data size
dataInput data in spatial domain
data_outOutput data in frequency domain
c_commCartesian communicator returned by accfft_create_comm
flagsAccFFT flags, See AccFFT Flags for more details.
Returns