AccFFT
|
#include <mpi.h>
#include <omp.h>
#include <iostream>
#include <cmath>
#include <math.h>
#include "accfft_common.h"
Functions | |
void * | accfft_alloc (ptrdiff_t size) |
void | accfft_free (void *ptr) |
void | accfft_create_comm (MPI_Comm in_comm, int *c_dims, MPI_Comm *c_comm) |
int | accfft_init () |
int | accfft_init (int nthreads) |
void | accfft_cleanup () |
common functions in AccFFT.
void* accfft_alloc | ( | ptrdiff_t | size | ) |
Allocates aligned memory to enable SIMD
size | Allocation size in Bytes |
void accfft_cleanup | ( | ) |
Cleanup all CPU resources
void accfft_create_comm | ( | MPI_Comm | in_comm, |
int * | c_dims, | ||
MPI_Comm * | c_comm | ||
) |
Creates a Cartesian communicator of size c_dims[0]xc_dims[1] from its input. If c_dims[0]xc_dims[1] would not match the size of in_comm, then the function prints an error and automatically sets c_dims to the correct values.
in_comm | Input MPI communicator handle |
c_dims | A 2D integer array, which sets the size of the Cartesian array to c_dims[0]xc_dims[1] |
c_comm | A pointer to the Cartesian communicator which will be created |
void accfft_free | ( | void * | ptr | ) |
Free memory allocated by accfft_alloc
ptr | Address of the memory to be freed. |
int accfft_init | ( | ) |
Initialize AccFFT library.
int accfft_init | ( | int | nthreads | ) |
Initializes the library.
nthreads | The number of OpenMP threads to use for execution of local FFT. |