#include <mpi.h>
#include <omp.h>
#include <iostream>
#include <cmath>
#include <math.h>
#include <string.h>
#include <accfftf.h>
#include <accfft_operators.h>
#include <../src/operators.txx>
#include <pnetcdf.h>
#include <cstdlib>
#include <string>
|
| void | accfft_gradf (float *A_x, float *A_y, float *A_z, float *A, accfft_planf *plan, std::bitset< 3 > *pXYZ, double *timer) |
| |
| void | accfft_laplacef (float *LA, float *A, accfft_planf *plan, double *timer) |
| |
| void | accfft_divergencef (float *divA, float *A_x, float *A_y, float *A_z, accfft_planf *plan, double *timer) |
| |
| void | accfft_biharmonicf (float *BA, float *A, accfft_planf *plan, double *timer) |
| |
| void | read_pnetcdf (const std::string &filename, MPI_Offset starts[3], MPI_Offset counts[3], int gsizes[3], float *localData) |
| |
| void | write_pnetcdf (const std::string &filename, MPI_Offset starts[3], MPI_Offset counts[3], int gsizes[3], float *localData) |
| |
Single Precision CPU functions of AccFFT operators
| void accfft_biharmonicf |
( |
float * |
BA, |
|
|
float * |
A, |
|
|
accfft_planf * |
plan, |
|
|
double * |
timer |
|
) |
| |
Computes single precision Biharmonic of its input real data A, and writes the output into LA.
- Parameters
-
| BA | |
| plan | FFT plan created by accfft_plan_dft_3d_r2cf. Must be an outplace plan, otherwise the function will return without computing the gradient. |
| timer | See Timing AccFFT for more details. |
| void accfft_divergencef |
( |
float * |
divA, |
|
|
float * |
A_x, |
|
|
float * |
A_y, |
|
|
float * |
A_z, |
|
|
accfft_planf * |
plan, |
|
|
double * |
timer |
|
) |
| |
| void accfft_gradf |
( |
float * |
A_x, |
|
|
float * |
A_y, |
|
|
float * |
A_z, |
|
|
float * |
A, |
|
|
accfft_planf * |
plan, |
|
|
std::bitset< 3 > * |
pXYZ, |
|
|
double * |
timer |
|
) |
| |
| void accfft_laplacef |
( |
float * |
LA, |
|
|
float * |
A, |
|
|
accfft_planf * |
plan, |
|
|
double * |
timer |
|
) |
| |
Computes single precision Laplacian of its input real data A, and writes the output into LA.
- Parameters
-
| LA | |
| plan | FFT plan created by accfft_plan_dft_3d_r2cf. Must be an outplace plan, otherwise the function will return without computing the gradient. |
| timer | See Timing AccFFT for more details. |
| void read_pnetcdf |
( |
const std::string & |
filename, |
|
|
MPI_Offset |
starts[3], |
|
|
MPI_Offset |
counts[3], |
|
|
int |
gsizes[3], |
|
|
float * |
localData |
|
) |
| |
Read a single-precision parallel-nedcdf file.
We assume here that localData is a scalar.
Pnetcdf uses row-major format (same as FFTW).
- Parameters
-
| [in] | filename | : PnetCDF filename |
| [in] | starts | : offset to where to start reading data |
| [in] | counts | : number of elements read (3D sub-domain inside global) |
| [in] | gsizes | : global sizes |
| [out] | localData | : actual data buffer (size : nx*ny*nz*sizeof(float)) |
localData must have been allocated prior to calling this routine.
| void write_pnetcdf |
( |
const std::string & |
filename, |
|
|
MPI_Offset |
starts[3], |
|
|
MPI_Offset |
counts[3], |
|
|
int |
gsizes[3], |
|
|
float * |
localData |
|
) |
| |
Write a parallel-nedcdf file.
We assume here that localData is a scalar.
Pnetcdf uses row-major format (same as FFTW).
- Parameters
-
| [in] | filename | : PnetCDF filename |
| [in] | starts | : offset to where to start reading data |
| [in] | counts | : number of elements read (3D sub-domain inside global) |
| [in] | gsizes | : global sizes |
| [in] | localData | : actual data buffer (size : nx*ny*nz*sizeof(float)) |