18#define FFT_BACKWARD -1
28 return omp_in_parallel() ? 1 : omp_get_max_threads();
35static inline int imin(
int x,
int y) {
return (x < y ? x : y); }
41static inline int imax(
int x,
int y) {
return (x > y ? x : y); }
47static inline double dmin(
double x,
double y) {
return (x < y ? x : y); }
53static inline double dmax(
double x,
double y) {
return (x > y ? x : y); }
60static inline int modulo(
int a,
int m) {
return ((a % m + m) % m); }
66static inline long int product3(
const int array3[3]) {
67 return (
long int)array3[0] * array3[1] * array3[2];
static long int product3(const int array3[3])
Calculates the product of three numbers.
static int imin(int x, int y)
Returns the smaller of two given integer (missing from the C standard).
static int fft_team_size(void)
Returns the number of threads used for FFT planning. Outside an OpenMP parallel region the maximum nu...
static int modulo(int a, int m)
Equivalent of Fortran's MODULO which always returns a positive number. https://gcc....
static double dmin(double x, double y)
Returns the smaller of two given integer (missing from the C standard).
static int imax(int x, int y)
Returns the larger of two given integer (missing from the C standard).
static double dmax(double x, double y)
Returns the larger of two given integer (missing from the C standard).