57 #ifndef HACC_DISTRIBUTION_HPP
58 #define HACC_DISTRIBUTION_HPP
89 int Ndims[3] = { 0, 0, 0 };
98 int n[3] = { ng, ng, ng };
99 int Ndims[3] = { 0, 0, 0 };
122 int n[3] = { ng, ng, ng };
140 MPI_Initialized(&flag);
172 for (
int i = 0; i < 3; ++i) {
180 for (
int i = 0; i < 3; ++i) {
int MPI_Comm
Definition: AMReX_ccse-mpi.H:47
Definition: Distribution.H:73
void coords_2d_x(int r, int c[])
Definition: Distribution.H:269
int * m_rmap
Definition: Distribution.H:281
int const (& self_2d_z() const)[3]
Definition: Distribution.H:231
int local_ng_1d(int i) const
Definition: Distribution.H:187
int nproc_1d(int i) const
Definition: Distribution.H:205
MPI_Comm cart_1d() const
Definition: Distribution.H:237
void redistribute_1_to_3(const complex_t *a, complex_t *b)
Definition: Distribution.H:151
int const (& local_ng_1d() const)[3]
Definition: Distribution.H:194
size_t global_size() const
Definition: Distribution.H:178
int local_ng_2d_y(int i) const
Definition: Distribution.H:189
MPI_Comm parent_comm() const
Definition: Distribution.H:243
int const (& local_ng_2d_x() const)[3]
Definition: Distribution.H:195
int nproc() const
Definition: Distribution.H:203
Distribution(MPI_Comm comm, int const n[], bool debug=false)
Definition: Distribution.H:84
int const (& nproc_1d() const)[3]
Definition: Distribution.H:211
int const (& self_3d() const)[3]
Definition: Distribution.H:232
int const (& local_ng_3d() const)[3]
Definition: Distribution.H:198
MPI_Comm cart_3d() const
Definition: Distribution.H:241
void coords_2d_z(int r, int c[])
Definition: Distribution.H:271
MPI_Comm cart_2d_y() const
Definition: Distribution.H:239
MPI_Comm m_comm
Definition: Distribution.H:280
MPI_Comm cart_2d_x() const
Definition: Distribution.H:238
int local_ng_3d(int i) const
Definition: Distribution.H:191
void coords_2d_y(int r, int c[])
Definition: Distribution.H:270
int global_ng(int i) const
Definition: Distribution.H:186
void initialize(MPI_Comm comm, int const n[], int const Ndims[])
Definition: Distribution.H:138
bool m_debug
Definition: Distribution.H:282
int const (& self_2d_x() const)[3]
Definition: Distribution.H:229
int const (& local_ng_2d_z() const)[3]
Definition: Distribution.H:197
int self_2d_z(int i) const
Definition: Distribution.H:225
MPI_Comm cart_2d_z() const
Definition: Distribution.H:240
Distribution(MPI_Comm comm, int ng, bool debug=false)
Definition: Distribution.H:93
Distribution(MPI_Comm comm, int const n[], int const Ndims[], int *rmap, bool debug=false)
Definition: Distribution.H:105
int self_3d(int i) const
Definition: Distribution.H:226
int const (& local_ng_2d_y() const)[3]
Definition: Distribution.H:196
int const (& global_ng() const)[3]
Definition: Distribution.H:193
distribution_t m_d
Definition: Distribution.H:277
void redistribute_2_to_3(const complex_t *a, complex_t *b, int axis)
Definition: Distribution.H:159
Distribution(MPI_Comm comm, int ng, int const Ndims[], int *rmap, bool debug=false)
Definition: Distribution.H:115
int nproc_2d_z(int i) const
Definition: Distribution.H:208
void redistribute_3_to_2(const complex_t *a, complex_t *b, int axis)
Definition: Distribution.H:163
int local_ng_2d_z(int i) const
Definition: Distribution.H:190
int self_2d_x(int i) const
Definition: Distribution.H:223
int nproc_2d_x(int i) const
Definition: Distribution.H:206
int self_1d(int i) const
Definition: Distribution.H:222
int rank_2d_z(int c[])
Definition: Distribution.H:260
int const (& nproc_3d() const)[3]
Definition: Distribution.H:215
int self_2d_y(int i) const
Definition: Distribution.H:224
size_t local_size() const
Definition: Distribution.H:170
int nproc_3d(int i) const
Definition: Distribution.H:209
int nproc_2d_y(int i) const
Definition: Distribution.H:207
int const (& self_1d() const)[3]
Definition: Distribution.H:228
int rank_2d_y(int c[])
Definition: Distribution.H:254
int const (& nproc_2d_x() const)[3]
Definition: Distribution.H:212
int rank_2d_x(int c[])
Definition: Distribution.H:248
void redistribute_3_to_1(const complex_t *a, complex_t *b)
Definition: Distribution.H:155
int const (& self_2d_y() const)[3]
Definition: Distribution.H:230
int local_ng_2d_x(int i) const
Definition: Distribution.H:188
virtual ~Distribution()
Definition: Distribution.H:130
int const (& nproc_2d_y() const)[3]
Definition: Distribution.H:213
int const (& nproc_2d_z() const)[3]
Definition: Distribution.H:214
double complex complex_t
Definition: complex-type.h:79
void Rank_x_pencils(int *myrank, int coord[], distribution_t *d)
Definition: distribution.c:150
void distribution_3_to_1(const complex_t *a, complex_t *b, distribution_t *d)
Definition: distribution.c:1287
void distribution_fini(distribution_t *d)
Definition: distribution.c:1222
void distribution_3_to_2(const complex_t *a, complex_t *b, distribution_t *d, int z_dim)
Definition: distribution.c:1509
void Coord_y_pencils(int myrank, int coord[], distribution_t *d)
Definition: distribution.c:171
void Rank_y_pencils(int *myrank, int coord[], distribution_t *d)
Definition: distribution.c:189
void distribution_1_to_3(const complex_t *a, complex_t *b, distribution_t *d)
Definition: distribution.c:1269
void Coord_z_pencils(int myrank, int coord[], distribution_t *d)
Definition: distribution.c:206
void Rank_z_pencils(int *myrank, int coord[], distribution_t *d)
Definition: distribution.c:224
void distribution_init(MPI_Comm comm, const int n[], const int Ndims[], distribution_t *d, const int *rmap, bool debug)
Definition: distribution.c:248
void Coord_x_pencils(int myrank, int coord[], distribution_t *d)
Definition: distribution.c:117
void distribution_2_to_3(const complex_t *a, complex_t *b, distribution_t *d, int z_dim)
Definition: distribution.c:1495
AMREX_GPU_HOST_DEVICE Long size(T const &b) noexcept
integer version
Definition: AMReX_GpuRange.H:26
Definition: AlignedAllocator.h:63
Definition: distribution_c.h:93
process_topology_t process_topology_2_y
Definition: distribution_c.h:98
process_topology_t process_topology_1
Definition: distribution_c.h:96
process_topology_t process_topology_2_z
Definition: distribution_c.h:97
process_topology_t process_topology_3
Definition: distribution_c.h:100
int n[3]
Definition: distribution_c.h:95
process_topology_t process_topology_2_x
Definition: distribution_c.h:99
int self[3]
Definition: distribution_c.h:80
int n[3]
Definition: distribution_c.h:81
int nproc[3]
Definition: distribution_c.h:78
MPI_Comm cart
Definition: distribution_c.h:77