Block-Structured AMR Software Framework
AMReX_ParticleReduce.H File Reference
#include <AMReX_Config.H>
#include <AMReX_IntVect.H>
#include <AMReX_Box.H>
#include <AMReX_Gpu.H>
#include <AMReX_Print.H>
#include <AMReX_GpuUtility.H>
#include <AMReX_TypeTraits.H>
#include <AMReX_ParticleUtil.H>
#include <AMReX_Vector.H>
#include <limits>
#include <type_traits>

Go to the source code of this file.

Namespaces

 amrex
 
 amrex::particle_detail
 

Functions

template<typename F , typename T_ParticleType , int NAR, int NAI>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE auto amrex::particle_detail::call_f (F const &f, const ConstParticleTileData< T_ParticleType, NAR, NAI > &p, const int i) noexcept
 
template<class PC , class F , std::enable_if_t< IsParticleContainer< PC >::value, int > foo = 0>
auto amrex::ReduceSum (PC const &pc, F &&f) -> decltype(particle_detail::call_f(f, typename PC::ParticleTileType::ConstParticleTileDataType(), int()))
 A general reduction method for the particles in a ParticleContainer that can run on either CPUs or GPUs. This version operates over all particles on all levels. More...
 
template<class PC , class F , std::enable_if_t< IsParticleContainer< PC >::value, int > foo = 0>
auto amrex::ReduceSum (PC const &pc, int lev, F &&f) -> decltype(particle_detail::call_f(f, typename PC::ParticleTileType::ConstParticleTileDataType(), int()))
 A general reduction method for the particles in a ParticleContainer that can run on either CPUs or GPUs. This version operates only on the specified level. More...
 
template<class PC , class F , std::enable_if_t< IsParticleContainer< PC >::value, int > foo = 0>
auto amrex::ReduceSum (PC const &pc, int lev_min, int lev_max, F const &f) -> decltype(particle_detail::call_f(f, typename PC::ParticleTileType::ConstParticleTileDataType(), int()))
 A general reduction method for the particles in a ParticleContainer that can run on either CPUs or GPUs. This version operates from the specified lev_min to lev_max. More...
 
template<class PC , class F , std::enable_if_t< IsParticleContainer< PC >::value, int > foo = 0>
auto amrex::ReduceMax (PC const &pc, F &&f) -> decltype(particle_detail::call_f(f, typename PC::ParticleTileType::ConstParticleTileDataType(), int()))
 A general reduction method for the particles in a ParticleContainer that can run on either CPUs or GPUs. This version operates over all particles on all levels. More...
 
template<class PC , class F , std::enable_if_t< IsParticleContainer< PC >::value, int > foo = 0>
auto amrex::ReduceMax (PC const &pc, int lev, F &&f) -> decltype(particle_detail::call_f(f, typename PC::ParticleTileType::ConstParticleTileDataType(), int()))
 A general reduction method for the particles in a ParticleContainer that can run on either CPUs or GPUs. This version operates only on the specified level. More...
 
template<class PC , class F , std::enable_if_t< IsParticleContainer< PC >::value, int > foo = 0>
auto amrex::ReduceMax (PC const &pc, int lev_min, int lev_max, F const &f) -> decltype(particle_detail::call_f(f, typename PC::ParticleTileType::ConstParticleTileDataType(), int()))
 A general reduction method for the particles in a ParticleContainer that can run on either CPUs or GPUs. This version operates from the specified lev_min to lev_max. More...
 
template<class PC , class F , std::enable_if_t< IsParticleContainer< PC >::value, int > foo = 0>
auto amrex::ReduceMin (PC const &pc, F &&f) -> decltype(particle_detail::call_f(f, typename PC::ParticleTileType::ConstParticleTileDataType(), int()))
 A general reduction method for the particles in a ParticleContainer that can run on either CPUs or GPUs. This version operates over all particles on all levels. More...
 
template<class PC , class F , std::enable_if_t< IsParticleContainer< PC >::value, int > foo = 0>
auto amrex::ReduceMin (PC const &pc, int lev, F &&f) -> decltype(particle_detail::call_f(f, typename PC::ParticleTileType::ConstParticleTileDataType(), int()))
 A general reduction method for the particles in a ParticleContainer that can run on either CPUs or GPUs. This version operates only on the specified level. More...
 
template<class PC , class F , std::enable_if_t< IsParticleContainer< PC >::value, int > foo = 0>
auto amrex::ReduceMin (PC const &pc, int lev_min, int lev_max, F const &f) -> decltype(particle_detail::call_f(f, typename PC::ParticleTileType::ConstParticleTileDataType(), int()))
 A general reduction method for the particles in a ParticleContainer that can run on either CPUs or GPUs. This version operates from the specified lev_min to lev_max. More...
 
template<class PC , class F , std::enable_if_t< IsParticleContainer< PC >::value, int > foo = 0>
bool amrex::ReduceLogicalAnd (PC const &pc, F &&f)
 A general reduction method for the particles in a ParticleContainer that can run on either CPUs or GPUs. This version operates over all particles on all levels. More...
 
template<class PC , class F , std::enable_if_t< IsParticleContainer< PC >::value, int > foo = 0>
bool amrex::ReduceLogicalAnd (PC const &pc, int lev, F &&f)
 A general reduction method for the particles in a ParticleContainer that can run on either CPUs or GPUs. This version operates only on the specified level. More...
 
template<class PC , class F , std::enable_if_t< IsParticleContainer< PC >::value, int > foo = 0>
bool amrex::ReduceLogicalAnd (PC const &pc, int lev_min, int lev_max, F const &f)
 A general reduction method for the particles in a ParticleContainer that can run on either CPUs or GPUs. This version operates from the specified lev_min to lev_max. More...
 
template<class PC , class F , std::enable_if_t< IsParticleContainer< PC >::value, int > foo = 0>
bool amrex::ReduceLogicalOr (PC const &pc, F &&f)
 A general reduction method for the particles in a ParticleContainer that can run on either CPUs or GPUs. This version operates over all particles on all levels. More...
 
template<class PC , class F , std::enable_if_t< IsParticleContainer< PC >::value, int > foo = 0>
bool amrex::ReduceLogicalOr (PC const &pc, int lev, F &&f)
 A general reduction method for the particles in a ParticleContainer that can run on either CPUs or GPUs. This version operates only on the specified level. More...
 
template<class PC , class F , std::enable_if_t< IsParticleContainer< PC >::value, int > foo = 0>
bool amrex::ReduceLogicalOr (PC const &pc, int lev_min, int lev_max, F const &f)
 A general reduction method for the particles in a ParticleContainer that can run on either CPUs or GPUs. This version operates from the specified lev_min to lev_max. More...
 
template<class RD , class PC , class F , class ReduceOps , std::enable_if_t< IsParticleContainer< PC >::value, int > foo = 0>
RD::Type amrex::ParticleReduce (PC const &pc, F &&f, ReduceOps &reduce_ops)
 A general reduction method for the particles in a ParticleContainer that can run on either CPUs or GPUs. This version operates over all particles on all levels. More...
 
template<class RD , class PC , class F , class ReduceOps , std::enable_if_t< IsParticleContainer< PC >::value, int > foo = 0>
RD::Type amrex::ParticleReduce (PC const &pc, int lev, F &&f, ReduceOps &reduce_ops)
 A general reduction method for the particles in a ParticleContainer that can run on either CPUs or GPUs. This version operates only on the specified level. More...
 
template<class RD , class PC , class F , class ReduceOps , std::enable_if_t< IsParticleContainer< PC >::value, int > foo = 0>
RD::Type amrex::ParticleReduce (PC const &pc, int lev_min, int lev_max, F const &f, ReduceOps &reduce_ops)
 A general reduction method for the particles in a ParticleContainer that can run on either CPUs or GPUs. This version operates from the specified lev_min to lev_max. More...