15#include "../mpi_utils/setcomm.h"
18#define CONCAT(prefix, name) prefix##name
19#ifdef DOUBLEPRECISION_FFTW
20#define FFTW(x) CONCAT(fftw_, x)
22#define FFTW(x) CONCAT(fftwf_, x)
36 FFTW(plan) forward_plan_zdir;
37 FFTW(plan) forward_plan_xdir;
38 FFTW(plan) forward_plan_ydir;
40 FFTW(plan) backward_plan_zdir;
41 FFTW(plan) backward_plan_ydir;
42 FFTW(plan) backward_plan_xdir;
44#ifndef FFT_COLUMN_BASED
60 int firstcol_XY, ncol_XY, lastcol_XY;
61 int firstcol_XZ, ncol_XZ, lastcol_XZ;
62 int firstcol_ZY, ncol_ZY, lastcol_ZY;
64 int transposed_firstcol, transposed_ncol;
65 int second_transposed_firstcol, second_transposed_ncol;
66 size_t second_transposed_ncells;
72 size_t *offsets_send_A;
73 size_t *offsets_recv_A;
74 size_t *offsets_send_B;
75 size_t *offsets_recv_B;
76 size_t *offsets_send_C;
77 size_t *offsets_recv_C;
78 size_t *offsets_send_D;
79 size_t *offsets_recv_D;
89 size_t *count_send_13;
90 size_t *count_recv_13;
91 size_t *count_send_23;
92 size_t *count_recv_23;
93 size_t *count_send_13back;
94 size_t *count_recv_13back;
95 size_t *count_send_23back;
96 size_t *count_recv_23back;
117#ifndef FFT_COLUMN_BASED
119 void my_slab_transpose(
void *av,
void *bv,
int *sx,
int *firstx,
int *sy,
int *firsty,
int nx,
int ny,
int nz,
int mode);
122 void my_fft_column_remap(fft_complex *data,
int Ndims[3],
int in_firstcol,
int in_ncol, fft_complex *out,
int perm[3],
123 int out_firstcol,
int out_ncol,
size_t *offset_send,
size_t *offset_recv,
size_t *count_send,
124 size_t *count_recv,
size_t just_count_flag);
126 void my_fft_column_transpose(fft_real *data,
int Ndims[3],
127 int in_firstcol,
int in_ncol,
128 fft_real *out,
int perm[3],
int out_firstcol,
int out_ncol,
size_t *count_send,
size_t *count_recv,
129 size_t just_count_flag);
void my_slab_based_fft_free(fft_plan *plan)
void my_column_based_fft_free(fft_plan *plan)
void my_column_based_fft_init(fft_plan *plan, int NgridX, int NgridY, int NgridZ)
void my_column_based_fft(fft_plan *plan, void *data, void *workspace, int forward)
void my_fft_swap13back(fft_plan *plan, fft_real *data, fft_real *out)
void my_fft_swap13(fft_plan *plan, fft_real *data, fft_real *out)
void my_slab_transposeB(fft_plan *plan, fft_real *field, fft_real *scratch)
void my_slab_based_fft(fft_plan *plan, void *data, void *workspace, int forward)
void my_fft_swap23(fft_plan *plan, fft_real *data, fft_real *out)
void my_fft_swap23back(fft_plan *plan, fft_real *data, fft_real *out)
void my_slab_transposeA(fft_plan *plan, fft_real *field, fft_real *scratch)
void my_slab_based_fft_init(fft_plan *plan, int NgridX, int NgridY, int NgridZ)
pm_mpi_fft(MPI_Comm comm)
int * first_slab_x_of_task
int * first_slab_y_of_task
FFTW(plan) forward_plan_zdir
FFTW(plan) forward_plan_xdir
FFTW(plan) forward_plan_ydir
FFTW(plan) backward_plan_zdir
FFTW(plan) backward_plan_xdir
FFTW(plan) backward_plan_ydir