Go to the documentation of this file.
74 namespace transposed {
108 grid(MPI_Comm comm,
int n0,
int n1,
int n2,
int pA = 0,
int pB = 0)
113 template<
class InputIterator1,
class InputIterator2 >
114 grid(MPI_Comm comm, InputIterator1 n, InputIterator2 p)
117 const int n0 = *n++;
const int n1 = *n++;
const int n2 = *n;
118 const int pA = *p++;
const int pB = *p;
124 template<
class InputIterator >
125 grid(MPI_Comm comm, InputIterator n)
128 const int n0 = *n++;
const int n1 = *n++;
const int n2 = *n;
146 operator bool ()
const {
return grid_ != NULL; };
160 problem(
const grid &g,
int howmany,
unsigned transposed_flags = 0)
162 g.
get(), howmany, transposed_flags))
182 int *order = NULL)
const
200 operator bool ()
const {
return problem_ != NULL; };
245 unsigned transpose_flags = 0,
246 unsigned fftw_rigor_flags = 0)
289 operator bool ()
const {
return plan_ != NULL; };
306 template<
typename charT,
typename traits >
308 std::basic_ostream<charT,traits> &os,
329 #endif // UNDERLING_HPP
@ long_n0
Definition: underling.hpp:82
size_t underling_local_memory(const underling_problem problem)
Find the amount of local storage necessary to plan and execute a problem.
size_t local_memory_maximum(const grid &g, const problem &p)
Definition: underling.hpp:208
int size[4]
The amount of global data stored locally in directions n{0,1,2}.
Definition: underling.h:93
size_t underling_local(const underling_problem problem, int i, int *start, int *size, int *stride, int *order)
Obtain the processor-local sizes, storage details, and global starting offsets when the data is long ...
std::basic_ostream< charT, traits > & operator<<(std::basic_ostream< charT, traits > &os, const underling::extents &e)
Outputs an underling_extents or underling::extents instance as a human-readable string on any std::ba...
Definition: underling.hpp:307
size_t local_memory() const
Definition: underling.hpp:188
@ long_n0_to_long_n1
Definition: underling.hpp:58
grid(MPI_Comm comm, InputIterator1 n, InputIterator2 p)
Definition: underling.hpp:114
size_t underling_local_memory_optimum(const underling_problem problem)
Find the amount of local storage necessary to merely hold a problem in memory.
underling_real real
Definition: underling.hpp:41
A mixin for making a subclass non-copyable via private inheritance.
Definition: underling.hpp:89
underling_problem get() const
Definition: underling.hpp:169
underling_grid underling_grid_create(MPI_Comm comm, int n0, int n1, int n2, int pA, int pB)
Collectively create a reusable domain-to-processor mapping across the given MPI communicator.
Provides a thin RAII wrapper for underling_problem.
Definition: underling.hpp:156
struct underling_plan_s * underling_plan
A type encapsulating the FFTW MPI invocations necessary to transition from being long in one directio...
Definition: underling.h:614
bool operator==(const underling::extents &e1, const underling::extents &e2)
Definition: underling.hpp:324
underling_plan get() const
Definition: underling.hpp:258
size_t local_memory_minimum(const grid &g, const problem &p)
Definition: underling.hpp:215
grid(MPI_Comm comm, int n0, int n1, int n2, int pA=0, int pB=0)
Definition: underling.hpp:108
void underling_grid_destroy(underling_grid grid)
Destroy all resources associated with the given grid.
size_t local(int i, int *start=NULL, int *size=NULL, int *stride=NULL, int *order=NULL) const
Definition: underling.hpp:178
#define UNDERLING_TRANSPOSE_LONG_N1_TO_LONG_N0
Flag indicating a transform from long in n1 to long in n0.
Definition: underling.h:562
#define UNDERLING_TRANSPOSE_LONG_N2_TO_LONG_N1
Flag indicating a transform from long in n2 to long in n1.
Definition: underling.h:554
#define UNDERLING_TRANSPOSE_NONE
Flag indicating that no transposes will be performed.
Definition: underling.h:593
@ long_n1_to_long_n0
Definition: underling.hpp:55
Provides a thin RAII wrapper for underling_grid.
Definition: underling.hpp:104
int underling_grid_pA_size(const underling_grid grid)
Obtain the size of the processor grid in the pA direction.
#define UNDERLING_TRANSPOSE_LONG_N0_TO_LONG_N1
Flag indicating a transform from long in n0 to long in n1.
Definition: underling.h:570
@ all
Definition: underling.hpp:64
Provides C++ wrappers for underling's C-based API.
Definition: underling.hpp:38
struct underling_grid_s * underling_grid
A type encapsulating a reusable domain-to-processor mapping.
Definition: underling.h:238
#define UNDERLING_TRANSPOSED_LONG_N0
Flag indicating that "long in n0" storage is stored as n0 x (n1/pB x n2/pA) in row-major order.
Definition: underling.h:789
@ long_n2_to_long_n1
Definition: underling.hpp:52
#define UNDERLING_TRANSPOSED_LONG_N2
Flag indicating that "long in n2" storage is stored as n2 x (n0/pB x n1/pA) in row-major order.
Definition: underling.h:775
noncopyable()
Definition: underling.hpp:92
@ long_n1_to_long_n2
Definition: underling.hpp:61
int underling_execute_long_n2_to_long_n1(const underling_plan plan, underling_real *in, underling_real *out)
Collectively transform data from being long in n2 within buffer in to being long in n1 within buffer ...
#define UNDERLING_TRANSPOSE_LONG_N1_TO_LONG_N2
Flag indicating a transform from long in n1 to long in n2.
Definition: underling.h:578
grid(MPI_Comm comm, InputIterator n)
Definition: underling.hpp:125
int pA_size() const
Definition: underling.hpp:137
~problem()
Definition: underling.hpp:166
size_t global_memory(const grid &g, const problem &p)
Definition: underling.hpp:222
Provides a thin RAII wrapper for underling_plan.
Definition: underling.hpp:238
int underling_grid_pB_size(const underling_grid grid)
Obtain the size of the processor grid in the pB direction.
size_t global_memory_optimum(const grid &g, const problem &p)
Definition: underling.hpp:229
int execute_long_n1_to_long_n2(underling_real *in, underling_real *out) const
Definition: underling.hpp:282
size_t underling_local_memory_maximum(const underling_grid grid, const underling_problem problem)
Collectively find the maximum amount of per-processor memory required to handle the problem across al...
int execute_long_n0_to_long_n1(underling_real *in, underling_real *out) const
Definition: underling.hpp:275
void underling_problem_destroy(underling_problem problem)
Destroy all resources associated with the given problem.
@ none
Definition: underling.hpp:67
@ long_n2
Definition: underling.hpp:79
int start[4]
The inclusive global data starting offset in directions n{0,1,2}.
Definition: underling.h:85
~noncopyable()
Definition: underling.hpp:93
underling_extents underling_local_extents(const underling_problem problem, int i)
Obtain the processor-local sizes, storage details, and global starting offsets when the data is long ...
#define UNDERLING_TRANSPOSE_ALL
Convenience flag indicating all transform directions.
Definition: underling.h:596
size_t underling_local_memory_minimum(const underling_grid grid, const underling_problem problem)
Collectively find the minimal amount of per-processor memory required to handle the problem across al...
size_t underling_global_memory_optimum(const underling_grid grid, const underling_problem problem)
Find the theoretical optimum (minimum) amount of memory required to store the given problem on all pr...
int pB_size() const
Definition: underling.hpp:140
double underling_real
The real-valued scalar type used throughout the library.
Definition: underling.h:63
A transparent type storing the local sizes, strides, and storage when the data is long in a particula...
Definition: underling.h:79
int execute_long_n2_to_long_n1(underling_real *in, underling_real *out) const
Definition: underling.hpp:261
plan(const problem &p, underling_real *in, underling_real *out, unsigned transpose_flags=0, unsigned fftw_rigor_flags=0)
Definition: underling.hpp:242
int underling_execute_long_n0_to_long_n1(const underling_plan plan, underling_real *in, underling_real *out)
Collectively transform data from being long in n0 within buffer in to being long in n1 within buffer ...
underling_grid get() const
Definition: underling.hpp:143
int underling_execute_long_n1_to_long_n0(const underling_plan plan, underling_real *in, underling_real *out)
Collectively transform data from being long in n1 within buffer in to being long in n0 within buffer ...
underling_extents local_extents(int i) const
Definition: underling.hpp:172
~grid()
Definition: underling.hpp:134
void underling_plan_destroy(underling_plan plan)
Destroy all resources associated with the given plan.
~plan()
Definition: underling.hpp:255
int underling_extents_cmp(const underling_extents *const e1, const underling_extents *const e2)
Compare two underling_extents instances using lexicographic ordering.
int execute_long_n1_to_long_n0(underling_real *in, underling_real *out) const
Definition: underling.hpp:268
struct underling_problem_s * underling_problem
A type encapsulating all parallel decomposition information, including required local storage and str...
Definition: underling.h:352
int underling_execute_long_n1_to_long_n2(const underling_plan plan, underling_real *in, underling_real *out)
Collectively transform data from being long in n1 within buffer in to being long in n2 within buffer ...
size_t local_memory_optimum() const
Definition: underling.hpp:194
size_t underling_global_memory(const underling_grid grid, const underling_problem problem)
Collectively find the global amount of memory required to handle the problem across all processors in...
underling_extents extents
Definition: underling.hpp:44
underling_problem underling_problem_create(underling_grid grid, int howmany, unsigned transposed_flags)
Collectively create an instance encapsulating the parallel decomposition details for a decomposition ...
problem(const grid &g, int howmany, unsigned transposed_flags=0)
Definition: underling.hpp:160
underling_plan underling_plan_create(const underling_problem problem, underling_real *in, underling_real *out, unsigned transpose_flags, unsigned fftw_rigor_flags)
Collectively create an execution plan to solve the given decomposition problem using the given input ...
Generated on Wed Jul 1 2026 13:22:57 for underling
by
doxygen
1.8.17