milupHPC documentation
  • SubDomainKeyTreeNS
  • Kernel
Namespaces | Functions
SubDomainKeyTreeNS::Kernel Namespace Reference

Kernels. More...

Namespaces

namespace  Launch
 Wrapped kernels.
 

Functions

__global__ void set (SubDomainKeyTree *subDomainKeyTree, integer rank, integer numProcesses, keyType *range, integer *procParticleCounter)
 Kernel call to setter. More...
 
__global__ void test (SubDomainKeyTree *subDomainKeyTree)
 Test kernel call (for debugging/testing purposes). More...
 
__global__ void buildDomainTree (Tree *tree, Particles *particles, DomainList *domainList, integer n, integer m)
 Kernel to build the domain tree. More...
 
__global__ void buildDomainTree (SubDomainKeyTree *subDomainKeyTree, Tree *tree, Particles *particles, DomainList *domainList, integer n, integer m, integer level)
 
__global__ void getParticleKeys (SubDomainKeyTree *subDomainKeyTree, Tree *tree, Particles *particles, keyType *keys, integer maxLevel, integer n, Curve::Type curveType=Curve::lebesgue)
 Kernel to get all particle keys (and additional information for debugging purposes). More...
 
__global__ void particlesPerProcess (SubDomainKeyTree *subDomainKeyTree, Tree *tree, Particles *particles, integer n, integer m, Curve::Type curveType=Curve::lebesgue)
 Kernel to check particle's belonging and count in dependence of belonging/process. More...
 
__global__ void markParticlesProcess (SubDomainKeyTree *subDomainKeyTree, Tree *tree, Particles *particles, integer n, integer m, integer *sortArray, Curve::Type curveType=Curve::lebesgue)
 Kernel to mark particle's belonging. More...
 
__global__ void zeroDomainListNodes (Particles *particles, DomainList *domainList, DomainList *lowestDomainList)
 Zero domain list nodes. More...
 
template<typename T >
__global__ void prepareLowestDomainExchange (Particles *particles, DomainList *lowestDomainList, T *buffer, Entry::Name entry)
 Prepare lowest domain exchange via MPI by copying to contiguous memory. More...
 
template<typename T >
__global__ void updateLowestDomainListNodes (Particles *particles, DomainList *lowestDomainList, T *buffer, Entry::Name entry)
 Update lowest domain list nodes. More...
 
__global__ void compLowestDomainListNodes (Tree *tree, Particles *particles, DomainList *lowestDomainList)
 Compute/Find lowest domain list nodes. More...
 
__global__ void compLocalPseudoParticles (Tree *tree, Particles *particles, DomainList *domainList, int n)
 Compute local (tree) pseudo particles. More...
 
__global__ void compDomainListPseudoParticlesPerLevel (Tree *tree, Particles *particles, DomainList *domainList, DomainList *lowestDomainList, int n, int level)
 Compute domain list pseudo particles (per level). More...
 
__global__ void compDomainListPseudoParticles (Tree *tree, Particles *particles, DomainList *domainList, DomainList *lowestDomainList, int n)
 
__global__ void repairTree (SubDomainKeyTree *subDomainKeyTree, Tree *tree, Particles *particles, DomainList *domainList, DomainList *lowestDomainList, int n, int m, Curve::Type curveType)
 Repair tree by removing received and inserted (pseudo-)particles. More...
 
__global__ void createKeyHistRanges (Helper *helper, integer bins)
 
__global__ void keyHistCounter (Tree *tree, Particles *particles, SubDomainKeyTree *subDomainKeyTree, Helper *helper, int bins, int n, Curve::Type curveType=Curve::lebesgue)
 
__global__ void calculateNewRange (SubDomainKeyTree *subDomainKeyTree, Helper *helper, int bins, int n, Curve::Type curveType=Curve::lebesgue)
 

Detailed Description

Kernels.

Function Documentation

◆ buildDomainTree() [1/2]

__global__ void SubDomainKeyTreeNS::Kernel::buildDomainTree ( SubDomainKeyTree *  subDomainKeyTree,
Tree *  tree,
Particles *  particles,
DomainList *  domainList,
integer  n,
integer  m,
integer  level 
)

Definition at line 609 of file subdomain.cu.

◆ buildDomainTree() [2/2]

__global__ void SubDomainKeyTreeNS::Kernel::buildDomainTree ( Tree *  tree,
Particles *  particles,
DomainList *  domainList,
integer  n,
integer  m 
)

Kernel to build the domain tree.

‍Corresponding wrapper function: SubDomainKeyTreeNS::Kernel::Launch::buildDomainTree()

Using the already built tree, marking domain list nodes and adding them if necessary.

The common coarse tree construction takes care of the existence of the domain list nodes and saves this information in an instance of the DomainList class by traversing the tree specified by the keys derived in TreeNS::Kernel::createDomainList() and distinguishes three cases:

  • The corresponding node exists, thus nothing to do
  • The corresponding node exists, but is a leaf, which is not allowed, thus insert pseudo-particle in between
  • The corresponding node does not exist, thus create/request

Subsequent the index of the found domain list node is saved. This is possible since the key contains the path of the node in the tree, which can be used for traversing.

Parameters
treeTarget Tree class instance
particlesParticle class instance/information
domainListdomainList instance
nnumber of
mnumber of

Definition at line 148 of file subdomain.cu.

◆ calculateNewRange()

__global__ void SubDomainKeyTreeNS::Kernel::calculateNewRange ( SubDomainKeyTree *  subDomainKeyTree,
Helper *  helper,
int  bins,
int  n,
Curve::Type  curveType = Curve::lebesgue 
)

Definition at line 1507 of file subdomain.cu.

◆ compDomainListPseudoParticles()

__global__ void SubDomainKeyTreeNS::Kernel::compDomainListPseudoParticles ( Tree *  tree,
Particles *  particles,
DomainList *  domainList,
DomainList *  lowestDomainList,
int  n 
)

Definition at line 1291 of file subdomain.cu.

◆ compDomainListPseudoParticlesPerLevel()

__global__ void SubDomainKeyTreeNS::Kernel::compDomainListPseudoParticlesPerLevel ( Tree *  tree,
Particles *  particles,
DomainList *  domainList,
DomainList *  lowestDomainList,
int  n,
int  level 
)

Compute domain list pseudo particles (per level).

‍Corresponding wrapper function: SubDomainKeyTreeNS::Kernel::Launch::compDomainListPseudoParticlesPerLevel()

Parameters
treeTree class instance
particlesParticles class instance
domainListDomainList class instance/information about domain list nodes
lowestDomainListDomainList class instance/information about lowest domain list nodes
n
levelTree level

Definition at line 1175 of file subdomain.cu.

◆ compLocalPseudoParticles()

__global__ void SubDomainKeyTreeNS::Kernel::compLocalPseudoParticles ( Tree *  tree,
Particles *  particles,
DomainList *  domainList,
int  n 
)

Compute local (tree) pseudo particles.

‍Corresponding wrapper function: SubDomainKeyTreeNS::Kernel::Launch::compLocalPseudoParticles()

Parameters
treeTree class instance
particlesParticles class instance
domainListDomainList class instance/information about domain list nodes
n

Definition at line 1139 of file subdomain.cu.

◆ compLowestDomainListNodes()

__global__ void SubDomainKeyTreeNS::Kernel::compLowestDomainListNodes ( Tree *  tree,
Particles *  particles,
DomainList *  lowestDomainList 
)

Compute/Find lowest domain list nodes.

‍Corresponding wrapper function: SubDomainKeyTreeNS::Kernel::Launch::compLowestDomainListNodes()

Parameters
treeTree class instance
particlesParticles class instance
lowestDomainListDomainList class instance/information about lowest domain list nodes

Definition at line 1087 of file subdomain.cu.

+ Here is the call graph for this function:

◆ createKeyHistRanges()

__global__ void SubDomainKeyTreeNS::Kernel::createKeyHistRanges ( Helper *  helper,
integer  bins 
)

Definition at line 1459 of file subdomain.cu.

◆ getParticleKeys()

__global__ void SubDomainKeyTreeNS::Kernel::getParticleKeys ( SubDomainKeyTree *  subDomainKeyTree,
Tree *  tree,
Particles *  particles,
keyType *  keys,
integer  maxLevel,
integer  n,
Curve::Type  curveType = Curve::lebesgue 
)

Kernel to get all particle keys (and additional information for debugging purposes).

‍Corresponding wrapper function: SubDomainKeyTreeNS::Kernel::Launch::getParticleKeys()

Parameters
subDomainKeyTreeSubdomainKeyTree class instance
treeTree class instance
particlesParticles class instance
keysParticle keys
maxLevelTree maximum level
nnumber of particles
curveTypeSFC curve type (Lebesgue/Hilbert)

Definition at line 849 of file subdomain.cu.

◆ keyHistCounter()

__global__ void SubDomainKeyTreeNS::Kernel::keyHistCounter ( Tree *  tree,
Particles *  particles,
SubDomainKeyTree *  subDomainKeyTree,
Helper *  helper,
int  bins,
int  n,
Curve::Type  curveType = Curve::lebesgue 
)

Definition at line 1479 of file subdomain.cu.

◆ markParticlesProcess()

__global__ void SubDomainKeyTreeNS::Kernel::markParticlesProcess ( SubDomainKeyTree *  subDomainKeyTree,
Tree *  tree,
Particles *  particles,
integer  n,
integer  m,
integer *  sortArray,
Curve::Type  curveType = Curve::lebesgue 
)

Kernel to mark particle's belonging.

‍Corresponding wrapper function: SubDomainKeyTreeNS::Kernel::Launch::markParticlesProcess()

To assign particles to the correct process, the key for each particle is computed and translated to a process via KeyNS::key2proc(). This information is saved in an array which can be used for sorting enabling the subsequent copying into contiguous memory and exchanging via MPI.

Parameters
subDomainKeyTreeSubDomainKeyTree class instance
treeTree class instance
particlesParticles class instance
n
m
sortArray
curveTypeSFC curve type (Lebesgue/Hilbert)

Definition at line 921 of file subdomain.cu.

+ Here is the call graph for this function:

◆ particlesPerProcess()

__global__ void SubDomainKeyTreeNS::Kernel::particlesPerProcess ( SubDomainKeyTree *  subDomainKeyTree,
Tree *  tree,
Particles *  particles,
integer  n,
integer  m,
Curve::Type  curveType = Curve::lebesgue 
)

Kernel to check particle's belonging and count in dependence of belonging/process.

‍Corresponding wrapper function: SubDomainKeyTreeNS::Kernel::Launch::particlesPerProcess()

Parameters
subDomainKeyTreeSubDomainKeyTree class instance
treeTree class instance
particlesParticles class instance
n
m
curveTypeSFC curve type (Lebesgue/Hilbert)

Definition at line 897 of file subdomain.cu.

+ Here is the call graph for this function:

◆ prepareLowestDomainExchange()

template<typename T >
__global__ void SubDomainKeyTreeNS::Kernel::prepareLowestDomainExchange ( Particles *  particles,
DomainList *  lowestDomainList,
T *  buffer,
Entry::Name  entry 
)

Prepare lowest domain exchange via MPI by copying to contiguous memory.

‍Corresponding wrapper function: SubDomainKeyTreeNS::Kernel::Launch::prepareLowestDomainExchange()

Parameters
particlesParticles class instance
lowestDomainListDomainList class instance/information about lowest domain list nodes
helper
entry

Definition at line 995 of file subdomain.cu.

+ Here is the call graph for this function:

◆ repairTree()

__global__ void SubDomainKeyTreeNS::Kernel::repairTree ( SubDomainKeyTree *  subDomainKeyTree,
Tree *  tree,
Particles *  particles,
DomainList *  domainList,
DomainList *  lowestDomainList,
int  n,
int  m,
Curve::Type  curveType 
)

Repair tree by removing received and inserted (pseudo-)particles.

‍Corresponding wrapper function: SubDomainKeyTreeNS::Kernel::Launch::repairTree()

Deleting the received (pseudo-)particles is inevitable for simulations using a predictor-corrector scheme or for simulations with self-gravity and SPH. Key part of this is the knowledge of whether a (pseudo-)particle is received or intrinsically belongs to the process by its index. This information is saved in the variables toDeleteLeaf and toDeleteNode. Only the domain list nodes need to be handled separately, since children of these nodes if they do not belong to the corresponding process need to be deleted as well.

Parameters
subDomainKeyTreeSubDomainKeyTree class instance
treeTree class instance
particlesParticles class instance
domainListDomainList class instance/information about domain list nodes
lowestDomainListDomainList class instance/information about lowest domain list nodes
n
m
curveTypeSFC curve type (Lebesgue/Hilbert)

Definition at line 1355 of file subdomain.cu.

◆ set()

__global__ void SubDomainKeyTreeNS::Kernel::set ( SubDomainKeyTree *  subDomainKeyTree,
integer  rank,
integer  numProcesses,
keyType *  range,
integer *  procParticleCounter 
)

Kernel call to setter.

‍Corresponding wrapper function: SubDomainKeyTreeNS::Kernel::Launch::set()

Parameters
subDomainKeyTreeSubDomainKeyTree class instance
rankMPI rank
numProcessesMPI number of processes
rangeSFC curve range to MPI process mapping
procParticleCounterNumber of particles per MPI process

Definition at line 137 of file subdomain.cu.

+ Here is the call graph for this function:

◆ test()

__global__ void SubDomainKeyTreeNS::Kernel::test ( SubDomainKeyTree *  subDomainKeyTree)

Test kernel call (for debugging/testing purposes).

‍Corresponding wrapper function: SubDomainKeyTreeNS::Kernel::Launch::test()

Parameters
subDomainKeyTreeSubDomainKeyTree class instance

Definition at line 142 of file subdomain.cu.

◆ updateLowestDomainListNodes()

template<typename T >
__global__ void SubDomainKeyTreeNS::Kernel::updateLowestDomainListNodes ( Particles *  particles,
DomainList *  lowestDomainList,
T *  buffer,
Entry::Name  entry 
)

Update lowest domain list nodes.

‍Corresponding wrapper function: SubDomainKeyTreeNS::Kernel::Launch::updateLowestDomainListNodes()

Parameters
particlesParticles class instance
lowestDomainListDomainList class instance/information about lowest domain list nodes
helper
domainListSize
entry

Definition at line 1034 of file subdomain.cu.

+ Here is the call graph for this function:

◆ zeroDomainListNodes()

__global__ void SubDomainKeyTreeNS::Kernel::zeroDomainListNodes ( Particles *  particles,
DomainList *  domainList,
DomainList *  lowestDomainList 
)

Zero domain list nodes.

‍Corresponding wrapper function: SubDomainKeyTreeNS::Kernel::Launch::zeroDomainListNodes()

Parameters
particlesParticles class instance
domainListDomainList class instance/information about domain list nodes
lowestDomainListDomainList class instance/information about lowest domain list nodes

Definition at line 946 of file subdomain.cu.


milupHPC - SubDomainKeyTreeNS::Kernel Namespace Reference
Generated on Wed Aug 31 2022 12:16:54 by Doxygen 1.9.3