underling  0.3.2
underling_fftw.h
Go to the documentation of this file.
1 /***************************************************************************
2 //-----------------------------------------------------------------------bl-
3 // underling 0.3.1: an FFTW MPI-based library for 3D pencil decompositions
4 // https://github.com/RhysU/underling
5 //
6 // Copyright (C) 2010--2013, 2026 Rhys Ulerich
7 // Copyright (C) 2012, 2013 The PECOS Development Team
8 //
9 // This file is part of underling.
10 //
11 // underling is free software: you can redistribute it and/or modify
12 // it under the terms of the GNU General Public License as published by
13 // the Free Software Foundation, either version 3 of the License, or
14 // (at your option) any later version.
15 //
16 // underling is distributed in the hope that it will be useful,
17 // but WITHOUT ANY WARRANTY; without even the implied warranty of
18 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 // GNU General Public License for more details.
20 //
21 // You should have received a copy of the GNU General Public License
22 // along with underling. If not, see <http://www.gnu.org/licenses/>.
23 //-----------------------------------------------------------------------el-
24 // $Id$
25 ***************************************************************************/
26 
27 #ifndef UNDERLING_FFTW_H
28 #define UNDERLING_FFTW_H
29 
30 #include <underling/underling.h>
31 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35 
48 typedef struct underling_fftw_plan_s *underling_fftw_plan;
49 
69 #define UNDERLING_FFTW_PACKED_LONG_N2 (1U << 6)
70 
90 #define UNDERLING_FFTW_PACKED_LONG_N0 (1U << 7)
91 
93 #define UNDERLING_FFTW_PACKED_ALL \
94  (UNDERLING_FFTW_PACKED_LONG_N2 | UNDERLING_FFTW_PACKED_LONG_N0)
95 
105 #define UNDERLING_FFTW_PACKED_NONE (1U << 8)
106 
144  const underling_problem problem,
145  int long_ni,
146  underling_real * in,
147  underling_real * out,
148  unsigned fftw_rigor_flags,
149  unsigned packed_flags) UNDERLING_API;
150 
158  const underling_problem problem,
159  int long_ni,
160  underling_real * in,
161  underling_real * out,
162  unsigned fftw_rigor_flags,
163  unsigned packed_flags) UNDERLING_API;
164 
172  const underling_problem problem,
173  int long_ni,
174  underling_real * in,
175  underling_real * out,
176  unsigned fftw_rigor_flags,
177  unsigned packed_flags) UNDERLING_API;
178 
186  const underling_problem problem,
187  int long_ni,
188  underling_real * in,
189  underling_real * out,
190  unsigned fftw_rigor_flags,
191  unsigned packed_flags) UNDERLING_API;
192 
223  const underling_fftw_plan plan_to_invert,
224  underling_real * in,
225  underling_real * out,
226  unsigned fftw_rigor_flags) UNDERLING_API;
227 
242 int
244  const underling_fftw_plan plan,
245  underling_real * in,
246  underling_real * out) UNDERLING_API;
247 
253 void
255  underling_fftw_plan plan) UNDERLING_API;
256 
264 void
266  const underling_fftw_plan plan,
267  FILE *output_file) UNDERLING_API;
268 
291 typedef struct underling_fftw_extents {
297  int start[5];
298 
307  int size[5];
308 
314  int stride[5];
315 
323  int order[5];
325 
328 
339 int
341  const underling_fftw_extents * const e1,
342  const underling_fftw_extents * const e2) UNDERLING_API;
343 
351 void
354  FILE *output_file) UNDERLING_API;
355 
370  const underling_fftw_plan plan) UNDERLING_API;
371 
386  const underling_fftw_plan plan) UNDERLING_API;
387 
411 int
413  const underling_fftw_plan plan,
414  int *start,
415  int *size,
416  int *stride,
417  int *order) UNDERLING_API;
418 
442 int
444  const underling_fftw_plan plan,
445  int *start,
446  int *size,
447  int *stride,
448  int *order) UNDERLING_API;
449 
452 #ifdef __cplusplus
453 } /* extern "C" */
454 #endif
455 
456 #endif // UNDERLING_FFTW_H
underling_fftw_local_input
int underling_fftw_local_input(const underling_fftw_plan plan, int *start, int *size, int *stride, int *order)
Obtain the processor-local sizes, storage details, and global starting offsets for the given plan's i...
underling_fftw_extents::stride
int stride[5]
The stride between adjacent elements in directions n{0,1,2}.
Definition: underling_fftw.h:314
underling_fftw_local_output
int underling_fftw_local_output(const underling_fftw_plan plan, int *start, int *size, int *stride, int *order)
Obtain the processor-local sizes, storage details, and global starting offsets for the given plan's o...
underling_fftw_plan_create_inverse
underling_fftw_plan underling_fftw_plan_create_inverse(const underling_fftw_plan plan_to_invert, underling_real *in, underling_real *out, unsigned fftw_rigor_flags)
Create a plan to invert another underling_fftw_plan.
underling_fftw_extents::order
int order[5]
The storage order from the fastest index to the slowest.
Definition: underling_fftw.h:323
underling_fftw_fprint_plan
void underling_fftw_fprint_plan(const underling_fftw_plan plan, FILE *output_file)
Dump an instance's internals in a debugging-friendly format.
UNDERLING_FFTW_EXTENTS_INVALID
const underling_fftw_extents UNDERLING_FFTW_EXTENTS_INVALID
A static instance used to communicate wholly invalid extents.
underling_fftw_extents::size
int size[5]
The amount of global data stored locally in directions n{0,1,2}.
Definition: underling_fftw.h:307
underling_fftw_plan_create_c2c_backward
underling_fftw_plan underling_fftw_plan_create_c2c_backward(const underling_problem problem, int long_ni, underling_real *in, underling_real *out, unsigned fftw_rigor_flags, unsigned packed_flags)
Create a plan to perform a backward complex-to-complex FFT on the given data when long in the long_ni...
underling_fftw_plan_destroy
void underling_fftw_plan_destroy(underling_fftw_plan plan)
Destroy all resources associated with the given plan.
underling_fftw_plan_create_c2r_backward
underling_fftw_plan underling_fftw_plan_create_c2r_backward(const underling_problem problem, int long_ni, underling_real *in, underling_real *out, unsigned fftw_rigor_flags, unsigned packed_flags)
Create a plan to perform a backward complex-to-real FFT on the given data when long in the long_nith ...
underling_fftw_local_extents_input
underling_fftw_extents underling_fftw_local_extents_input(const underling_fftw_plan plan)
Obtain local size, stride, and storage information for the input data to a given plan.
underling_fftw_plan_create_r2c_forward
underling_fftw_plan underling_fftw_plan_create_r2c_forward(const underling_problem problem, int long_ni, underling_real *in, underling_real *out, unsigned fftw_rigor_flags, unsigned packed_flags)
Create a plan to perform a forward real-to-complex FFT on the given data when long in the long_nith d...
underling_fftw_plan_create_c2c_forward
underling_fftw_plan underling_fftw_plan_create_c2c_forward(const underling_problem problem, int long_ni, underling_real *in, underling_real *out, unsigned fftw_rigor_flags, unsigned packed_flags)
Create a plan to perform a forward complex-to-complex FFT on the given data when long in the long_nit...
underling_fftw_extents
A transparent type storing the local sizes, strides, and storage when the data is long in a particula...
Definition: underling_fftw.h:291
underling_fftw_extents::start
int start[5]
The inclusive global data starting offset in directions n{0,1,2}.
Definition: underling_fftw.h:297
underling_fftw_extents_cmp
int underling_fftw_extents_cmp(const underling_fftw_extents *const e1, const underling_fftw_extents *const e2)
Compare two underling_fftw_extents instances using lexicographic ordering.
underling_fftw_local_extents_output
underling_fftw_extents underling_fftw_local_extents_output(const underling_fftw_plan plan)
Obtain local size, stride, and storage information for the input data to a given plan.
underling_real
double underling_real
The real-valued scalar type used throughout the library.
Definition: underling.h:63
underling_fftw_plan
struct underling_fftw_plan_s * underling_fftw_plan
A type encapsulating FFTW-like planning information.
Definition: underling_fftw.h:48
underling.h
underling_problem
struct underling_problem_s * underling_problem
A type encapsulating all parallel decomposition information, including required local storage and str...
Definition: underling.h:352
underling_fftw_fprint_extents
void underling_fftw_fprint_extents(const underling_fftw_extents *extents, FILE *output_file)
Dump an instance's internals in a debugging-friendly format.
underling::extents
underling_extents extents
Definition: underling.hpp:44
underling_fftw_plan_execute
int underling_fftw_plan_execute(const underling_fftw_plan plan, underling_real *in, underling_real *out)
Perform a previously planned FFT.

Generated on Wed Jul 1 2026 13:22:57 for underling by  doxygen 1.8.17