(git:e70887f)
Loading...
Searching...
No Matches
fft_lib_test.c File Reference
#include "fft_lib_test.h"
#include "fft_utils.h"
#include "../mpiwrap/cp_mpi.h"
#include "fft_lib.h"
#include "../base/cp_assert.h"
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>

Go to the source code of this file.

Functions

static int fft3d_index (const int fft_size[3], const int x, const int y, const int z, const int batch, const int number_of_ffts, const bool transpose)
 Compute the linear index of a point in a batched 3D grid.
static int fft3d_index_complex (const int fft_size[3], const int x, const int y, const int z, const int batch, const int number_of_ffts, const bool transpose)
 Compute the linear index of a point in a batched 3D complex half-spectrum grid.
static int fft3d_index_padded (const int fft_size[3], const int x, const int y, const int z, const int batch, const int number_of_ffts, const bool transpose)
 Compute the linear index of a point in a padded batched 3D grid.
int fft_test_1d_local_low (const int fft_size, const int number_of_ffts, const int transpose_rs, const int transpose_gs)
 Function to test the local FFT backend.
int fft_test_1d_local_inplace_low (const int fft_size, const int number_of_ffts, const int transpose)
 Function to test the local FFT backend (inplace).
int fft_test_1d_local_r2c_low (const int fft_size, const int number_of_ffts, const int transpose_rs, const int transpose_gs)
 Function to test the local FFT backend.
int fft_test_1d_local_r2c_inplace_low (const int fft_size, const int number_of_ffts, const int transpose)
 Function to test the local FFT backend.
int fft_test_2d_local_low (const int fft_size[2], const int number_of_ffts, const int transpose_rs, const int transpose_gs)
 Function to test the local FFT backend.
int fft_test_2d_local_inplace_low (const int fft_size[2], const int number_of_ffts, const int transpose)
 Function to test the local FFT backend.
int fft_test_2d_local_r2c_low (const int fft_size[2], const int number_of_ffts, const int transpose_rs, const int transpose_gs)
 Function to test the local FFT backend.
int fft_test_2d_local_r2c_inplace_low (const int fft_size[2], const int number_of_ffts, const int transpose)
 Function to test the local FFT backend.
int fft_test_3d_local_low (const int fft_size[3], const int test_every, const bool transpose_in, const bool transpose_out)
 Function to test the local FFT backend.
int fft_test_3d_local_inplace_low (const int fft_size[3], const int test_every, const bool transpose)
 Function to test the local FFT backend.
int fft_test_3d_local_r2c_low (const int fft_size[3], const int test_every, const bool transpose_in, const bool transpose_out)
 Function to test the local FFT backend.
int fft_test_3d_local_r2c_inplace_low (const int fft_size[3], const int test_every, const bool transpose)
 Function to test the local FFT backend.
int fft_test_1d_local_omp (void)
 Test concurrent 1D C2C FFTs from independent OpenMP threads.
int fft_test_1d_local_omp_r2c (void)
 Test concurrent 1D R2C/C2R FFTs from independent OpenMP threads.
int fft_test_2d_local_omp (void)
 Test concurrent 2D C2C FFTs from independent OpenMP threads.
int fft_test_2d_local_omp_r2c (void)
 Test concurrent 2D R2C/C2R FFTs from independent OpenMP threads.
int fft_test_3d_local_omp (void)
 Test concurrent 3D C2C FFTs from independent OpenMP threads.
int fft_test_3d_local_omp_r2c (void)
 Test concurrent 3D R2C/C2R FFTs from independent OpenMP threads.
int fft_test_local ()
 Function to test the local FFT backend (1-3D).

Function Documentation

◆ fft3d_index()

int fft3d_index ( const int fft_size[3],
const int x,
const int y,
const int z,
const int batch,
const int number_of_ffts,
const bool transpose )
inlinestatic

Compute the linear index of a point in a batched 3D grid.

Parameters
fft_sizeSize of the transform in each dimension.
xIndex along the first dimension.
yIndex along the second dimension.
zIndex along the third dimension.
batchIndex of the transform batch.
number_of_fftsNumber of independent (batched) transforms.
transposeWhether the array uses the transposed layout.
Returns
Linear index into the grid buffer.

Definition at line 33 of file fft_lib_test.c.

Here is the caller graph for this function:

◆ fft3d_index_complex()

int fft3d_index_complex ( const int fft_size[3],
const int x,
const int y,
const int z,
const int batch,
const int number_of_ffts,
const bool transpose )
inlinestatic

Compute the linear index of a point in a batched 3D complex half-spectrum grid.

Parameters
fft_sizeSize of the transform in each dimension.
xIndex along the first dimension.
yIndex along the second dimension.
zIndex along the third dimension.
batchIndex of the transform batch.
number_of_fftsNumber of independent (batched) transforms.
transposeWhether the array uses the transposed layout.
Returns
Linear index into the grid buffer.

Definition at line 54 of file fft_lib_test.c.

Here is the caller graph for this function:

◆ fft3d_index_padded()

int fft3d_index_padded ( const int fft_size[3],
const int x,
const int y,
const int z,
const int batch,
const int number_of_ffts,
const bool transpose )
inlinestatic

Compute the linear index of a point in a padded batched 3D grid.

Parameters
fft_sizeSize of the transform in each dimension.
xIndex along the first dimension.
yIndex along the second dimension.
zIndex along the third dimension.
batchIndex of the transform batch.
number_of_fftsNumber of independent (batched) transforms.
transposeWhether the array uses the transposed layout.
Returns
Linear index into the grid buffer.

Definition at line 76 of file fft_lib_test.c.

Here is the caller graph for this function:

◆ fft_test_1d_local_low()

int fft_test_1d_local_low ( const int fft_size,
const int number_of_ffts,
const int transpose_rs,
const int transpose_gs )

Function to test the local FFT backend.

Parameters
fft_sizeSize of the transform in each dimension.
number_of_fftsNumber of independent (batched) transforms.
transpose_rsWhether the real-space array uses the transposed layout.
transpose_gsWhether the reciprocal-space array uses the transposed layout.
Author
Frederick Stein

Definition at line 96 of file fft_lib_test.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fft_test_1d_local_inplace_low()

int fft_test_1d_local_inplace_low ( const int fft_size,
const int number_of_ffts,
const int transpose )

Function to test the local FFT backend (inplace).

Parameters
fft_sizeSize of the transform in each dimension.
number_of_fftsNumber of independent (batched) transforms.
transposeWhether the array uses the transposed layout.
Author
Frederick Stein

Definition at line 285 of file fft_lib_test.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fft_test_1d_local_r2c_low()

int fft_test_1d_local_r2c_low ( const int fft_size,
const int number_of_ffts,
const int transpose_rs,
const int transpose_gs )

Function to test the local FFT backend.

Parameters
fft_sizeSize of the transform in each dimension.
number_of_fftsNumber of independent (batched) transforms.
transpose_rsWhether the real-space array uses the transposed layout.
transpose_gsWhether the reciprocal-space array uses the transposed layout.
Author
Frederick Stein

Definition at line 472 of file fft_lib_test.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fft_test_1d_local_r2c_inplace_low()

int fft_test_1d_local_r2c_inplace_low ( const int fft_size,
const int number_of_ffts,
const int transpose )

Function to test the local FFT backend.

Parameters
fft_sizeSize of the transform in each dimension.
number_of_fftsNumber of independent (batched) transforms.
transposeWhether the array uses the transposed layout.
Author
Frederick Stein

Definition at line 665 of file fft_lib_test.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fft_test_2d_local_low()

int fft_test_2d_local_low ( const int fft_size[2],
const int number_of_ffts,
const int transpose_rs,
const int transpose_gs )

Function to test the local FFT backend.

Parameters
fft_sizeSize of the transform in each dimension.
number_of_fftsNumber of independent (batched) transforms.
transpose_rsWhether the real-space array uses the transposed layout.
transpose_gsWhether the reciprocal-space array uses the transposed layout.
Author
Frederick Stein

Definition at line 863 of file fft_lib_test.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fft_test_2d_local_inplace_low()

int fft_test_2d_local_inplace_low ( const int fft_size[2],
const int number_of_ffts,
const int transpose )

Function to test the local FFT backend.

Parameters
fft_sizeSize of the transform in each dimension.
number_of_fftsNumber of independent (batched) transforms.
transposeWhether the array uses the transposed layout.
Author
Frederick Stein

Definition at line 1071 of file fft_lib_test.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fft_test_2d_local_r2c_low()

int fft_test_2d_local_r2c_low ( const int fft_size[2],
const int number_of_ffts,
const int transpose_rs,
const int transpose_gs )

Function to test the local FFT backend.

Parameters
fft_sizeSize of the transform in each dimension.
number_of_fftsNumber of independent (batched) transforms.
transpose_rsWhether the real-space array uses the transposed layout.
transpose_gsWhether the reciprocal-space array uses the transposed layout.
Author
Frederick Stein

Definition at line 1283 of file fft_lib_test.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fft_test_2d_local_r2c_inplace_low()

int fft_test_2d_local_r2c_inplace_low ( const int fft_size[2],
const int number_of_ffts,
const int transpose )

Function to test the local FFT backend.

Parameters
fft_sizeSize of the transform in each dimension.
number_of_fftsNumber of independent (batched) transforms.
transposeWhether the array uses the transposed layout.
Author
Frederick Stein

Definition at line 1523 of file fft_lib_test.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fft_test_3d_local_low()

int fft_test_3d_local_low ( const int fft_size[3],
const int test_every,
const bool transpose_in,
const bool transpose_out )

Function to test the local FFT backend.

Parameters
fft_sizeSize of the transform in each dimension.
test_everyStride selecting the basis vectors to test.
transpose_inWhether the input array uses the transposed layout.
transpose_outWhether the output array uses the transposed layout.
Author
Frederick Stein

Definition at line 1769 of file fft_lib_test.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fft_test_3d_local_inplace_low()

int fft_test_3d_local_inplace_low ( const int fft_size[3],
const int test_every,
const bool transpose )

Function to test the local FFT backend.

Parameters
fft_sizeSize of the transform in each dimension.
test_everyStride selecting the basis vectors to test.
transposeWhether the array uses the transposed layout.
Author
Frederick Stein

Definition at line 1929 of file fft_lib_test.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fft_test_3d_local_r2c_low()

int fft_test_3d_local_r2c_low ( const int fft_size[3],
const int test_every,
const bool transpose_in,
const bool transpose_out )

Function to test the local FFT backend.

Parameters
fft_sizeSize of the transform in each dimension.
test_everyStride selecting the basis vectors to test.
transpose_inWhether the input array uses the transposed layout.
transpose_outWhether the output array uses the transposed layout.
Author
Frederick Stein

Definition at line 2081 of file fft_lib_test.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fft_test_3d_local_r2c_inplace_low()

int fft_test_3d_local_r2c_inplace_low ( const int fft_size[3],
const int test_every,
const bool transpose )

Function to test the local FFT backend.

Parameters
fft_sizeSize of the transform in each dimension.
test_everyStride selecting the basis vectors to test.
transposeWhether the array uses the transposed layout.
Author
Frederick Stein

Definition at line 2256 of file fft_lib_test.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fft_test_1d_local_omp()

int fft_test_1d_local_omp ( void )

Test concurrent 1D C2C FFTs from independent OpenMP threads.

Author
Frederick Stein

Definition at line 2427 of file fft_lib_test.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fft_test_1d_local_omp_r2c()

int fft_test_1d_local_omp_r2c ( void )

Test concurrent 1D R2C/C2R FFTs from independent OpenMP threads.

Author
Frederick Stein

Definition at line 2472 of file fft_lib_test.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fft_test_2d_local_omp()

int fft_test_2d_local_omp ( void )

Test concurrent 2D C2C FFTs from independent OpenMP threads.

Author
Frederick Stein

Definition at line 2519 of file fft_lib_test.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fft_test_2d_local_omp_r2c()

int fft_test_2d_local_omp_r2c ( void )

Test concurrent 2D R2C/C2R FFTs from independent OpenMP threads.

Author
Frederick Stein

Definition at line 2564 of file fft_lib_test.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fft_test_3d_local_omp()

int fft_test_3d_local_omp ( void )

Test concurrent 3D C2C FFTs from independent OpenMP threads.

Author
Frederick Stein

Definition at line 2611 of file fft_lib_test.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fft_test_3d_local_omp_r2c()

int fft_test_3d_local_omp_r2c ( void )

Test concurrent 3D R2C/C2R FFTs from independent OpenMP threads.

Author
Frederick Stein

Definition at line 2657 of file fft_lib_test.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fft_test_local()

int fft_test_local ( )

Function to test the local FFT backend (1-3D).

Author
Frederick Stein

Definition at line 2706 of file fft_lib_test.c.

Here is the call graph for this function:
Here is the caller graph for this function: