1#include "../../include/subdomain_key_tree/tree_handler.h"
112 boost::mpi::communicator comm;
116 all_reduce(comm, boost::mpi::inplace_t<real*>(
d_minX), 1, boost::mpi::minimum<real>());
117 all_reduce(comm, boost::mpi::inplace_t<real*>(
d_maxX), 1, boost::mpi::maximum<real>());
119 all_reduce(comm, boost::mpi::inplace_t<real*>(
d_minY), 1, boost::mpi::minimum<real>());
120 all_reduce(comm, boost::mpi::inplace_t<real*>(
d_maxY), 1, boost::mpi::maximum<real>());
122 all_reduce(comm, boost::mpi::inplace_t<real*>(
d_minZ), 1, boost::mpi::minimum<real>());
123 all_reduce(comm, boost::mpi::inplace_t<real*>(
d_maxZ), 1, boost::mpi::maximum<real>());
128 all_reduce(comm, boost::mpi::inplace_t<real*>(
h_minX), 1, boost::mpi::minimum<real>());
129 all_reduce(comm, boost::mpi::inplace_t<real*>(
h_maxX), 1, boost::mpi::maximum<real>());
131 all_reduce(comm, boost::mpi::inplace_t<real*>(
h_minY), 1, boost::mpi::minimum<real>());
132 all_reduce(comm, boost::mpi::inplace_t<real*>(
h_maxY), 1, boost::mpi::maximum<real>());
134 all_reduce(comm, boost::mpi::inplace_t<real*>(
h_minZ), 1, boost::mpi::minimum<real>());
135 all_reduce(comm, boost::mpi::inplace_t<real*>(
h_maxZ), 1, boost::mpi::maximum<real>());
Tree * d_tree
device instance of Class Tree
real * h_minX
host (pointer to) bounding box minimal x
real * h_minY
host (pointer to) bounding box minimal y
integer * d_mutex
device (pointer to) mutex/lock
integer * d_sorted
device (pointer to) sorted (array)
real * h_maxX
host (pointer to) bounding box maximal x
integer * h_index
host (pointer to) index
integer * h_toDeleteLeaf
host (pointer to) array remembering leaf indices for rebuilding after temporarily inserting particles
real * d_maxX
device (pointer to) bounding box maximal x
real * d_maxZ
device (pointer to) bounding box maximal z
integer * h_toDeleteNode
host (pointer to) array remembering leaf indices for rebuilding after temporarily inserting particles
integer * d_start
device (pointer to) start (array)
integer * d_toDeleteLeaf
device (pointer to) array remembering leaf indices for rebuilding after temporarily inserting particl...
real * d_minZ
device (pointer to) bounding box minimal z
integer * d_index
device (pointer to) index
real * d_minX
device (pointer to) bounding box minimal x
void copy(To::Target target=To::device, bool borders=true, bool index=true, bool toDelete=true)
Copy (parts of the) tree instance(s) between host and device.
real * h_maxY
host (pointer to) bounding box maximal y
TreeHandler(integer numParticles, integer numNodes)
Constructor.
integer numNodes
number of nodes
real * d_minY
device (pointer to) bounding box minimal y
real * h_minZ
host (pointer to) bounding box minimal z
real * d_maxY
device (pointer to) bounding box maximal y
~TreeHandler()
Destructor.
real * h_maxZ
host (pointer to) bounding box maximal x
integer * d_count
device (pointer to) count (array)
void globalizeBoundingBox(Execution::Location exLoc=Execution::device)
All reduce bounding box(es)/borders (among MPI processes)
integer * d_child
device (pointer to) child/children (array)
integer * d_toDeleteNode
device (pointer to) array remembering leaf indices for rebuilding after temporarily inserting particl...
const char *const numParticles
void set(Tree *tree, integer *count, integer *start, integer *child, integer *sorted, integer *index, integer *toDeleteLeaf, integer *toDeleteNode, real *minX, real *maxX)
Wrapper for TreeNS::Kernel::set()
void copy(T *h_var, T *d_var, std::size_t count=1, To::Target copyTo=To::device)
Copy between host and device and vice-versa.
void free(T *d_var)
Free device memory.
void malloc(T *&d_var, std::size_t count)
Allocate device memory.