OPALX (Object Oriented Parallel Accelerator Library for Exascale) MINIorX
OPALX
ippl::detail Namespace Reference

Classes

class  Archive
 
class  BCondBase
 
struct  CapturedExpression
 
struct  ConstructVariant
 
struct  ConstructVariant< std::variant< Next, ToAdd... >, std::variant< Added... >, Verifier >
 
struct  ConstructVariant< std::variant<>, std::variant< T... >, Verifier >
 
struct  ConstructVariant< std::variant<>, std::variant<>, Verifier >
 
struct  ContainerForAllSpaces
 
struct  Coords
 
struct  Coords< 1, T >
 
struct  CreateUniformType
 
struct  Expression
 
struct  ExtractRank
 
struct  ExtractRank< Kokkos::MDRangePolicy< T... > >
 
struct  ExtractRank< Kokkos::RangePolicy< T... > >
 
struct  ExtractReducerReturnType
 
struct  ExtractReducerReturnType< T >
 
struct  FieldBufferData
 
struct  Forward
 
struct  Forward< Type, Kokkos::View< T, Properties... > >
 
struct  Forward< Type, std::variant< Spaces... > >
 
struct  FunctorWrapper
 
struct  FunctorWrapper< FOR, Functor, Policy, std::tuple< T... > >
 
struct  FunctorWrapper< REDUCE, Functor, Policy, std::tuple< T... >, Acc... >
 
class  HaloCells
 
struct  HeffteBackendType
 
struct  HeffteBackendType< Kokkos::HostSpace >
 Use heFFTe's inbuilt 1D fft computation on CPUs if no vendor specific or optimized backend is found. More...
 
struct  IsEnabled
 
struct  isExpression
 
struct  isExpression< BareField< T, Dim, ViewArgs... > >
 
struct  isExpression< Field< T, Dim, Mesh, Centering, ViewArgs... > >
 
struct  isExpression< Scalar< T > >
 
struct  isExpression< Vector< T, Dim > >
 
struct  IsUnique
 
struct  meta_cross
 
struct  meta_curl
 
struct  meta_div
 
struct  meta_dot
 
struct  meta_grad
 
struct  meta_hess
 
struct  meta_laplace
 
struct  meta_lower_laplace
 
struct  meta_poisson
 
struct  meta_upper_and_lower_laplace
 
struct  meta_upper_laplace
 
class  MultispaceContainer
 
struct  NPtr
 
struct  NPtr< T, 1 >
 
class  ParticleAttribBase
 
struct  ParticleBC
 
class  ParticleLayout
 
class  Partitioner
 
struct  PeriodicBC
 
struct  ReflectiveBC
 
class  RegionLayout
 
struct  Scalar
 
struct  SinkBC
 
struct  TypeForAllSpaces
 
struct  ViewAccess
 
struct  ViewAccess< 0, View >
 
struct  ViewAccess< 1, View >
 
struct  ViewAccess< 2, View >
 
struct  ViewType
 
struct  WrapUnique
 

Concepts

concept  HasMemberValueType
 

Typedefs

typedef std::size_t size_type
 
template<typename MemorySpace >
using hash_type = typename detail::ViewType< int, 1, MemorySpace >::view_type
 
template<bool B, typename T >
using ConditionalType = std::conditional_t< B, T, void >
 
template<typename... Types>
using VariantFromConditionalTypes = typename ConstructVariant< std::variant< Types... >, std::variant<>, IsEnabled >::type
 
template<typename... Types>
using VariantFromUniqueTypes = typename ConstructVariant< std::variant< Types... >, std::variant<>, IsUnique >::type
 
template<template< typename... > class Verifier, typename... Types>
using VariantWithVerifier = typename ConstructVariant< std::variant< Types... >, std::variant<>, Verifier >::type
 

Enumerations

enum  e_functor_type { FOR , REDUCE , SCAN }
 

Functions

template<typename Field >
std::ostream & operator<< (std::ostream &, const BCondBase< Field > &)
 
bool isUpper (unsigned int face)
 
unsigned int getFaceDim (unsigned int face)
 
KOKKOS_INLINE_FUNCTION constexpr unsigned int countHypercubes (unsigned int dim)
 
constexpr unsigned int factorial (unsigned x)
 
constexpr unsigned int binomialCoefficient (unsigned a, unsigned b)
 
template<unsigned Dim>
constexpr unsigned int countCubes (unsigned m)
 
template<unsigned Dim>
unsigned int indexToFace (unsigned int index)
 
template<unsigned Dim, typename... CubeTags, typename = std::enable_if_t<sizeof...(CubeTags) == Dim - 1>, typename = std::enable_if_t<std::conjunction_v<std::is_same<e_cube_tag, CubeTags>...>>>
unsigned int getCube (e_cube_tag tag, CubeTags... tags)
 
template<size_t... Idx>
unsigned int getFace_impl (const std::array< e_cube_tag, sizeof...(Idx)> &args, const std::index_sequence< Idx... > &)
 
template<unsigned Dim>
unsigned int getFace (unsigned int axis, e_cube_tag side)
 
template<unsigned long Point, unsigned long Index, typename Weights >
KOKKOS_INLINE_FUNCTION constexpr Weights::value_type interpolationWeight (const Weights &wlo, const Weights &whi)
 
template<unsigned long Point, unsigned long Index, typename Indices >
KOKKOS_INLINE_FUNCTION constexpr Indices::value_type interpolationIndex (const Indices &args)
 
template<unsigned long ScatterPoint, unsigned long... Index, typename View , typename T , typename IndexType = size_t>
KOKKOS_INLINE_FUNCTION constexpr void scatterToPoint (const std::index_sequence< Index... > &, const View &view, const Vector< T, View::rank > &wlo, const Vector< T, View::rank > &whi, const Vector< IndexType, View::rank > &args, const T &val)
 
template<unsigned long... ScatterPoint, typename View , typename T , typename IndexType = size_t>
KOKKOS_INLINE_FUNCTION constexpr void scatterToField (const std::index_sequence< ScatterPoint... > &, const View &view, const Vector< T, View::rank > &wlo, const Vector< T, View::rank > &whi, const Vector< IndexType, View::rank > &args, T val=1)
 
template<unsigned long GatherPoint, unsigned long... Index, typename View , typename T , typename IndexType = size_t>
KOKKOS_INLINE_FUNCTION constexpr View::value_type gatherFromPoint (const std::index_sequence< Index... > &, const View &view, const Vector< T, View::rank > &wlo, const Vector< T, View::rank > &whi, const Vector< IndexType, View::rank > &args)
 
template<unsigned long... GatherPoint, typename View , typename T , typename IndexType = size_t>
KOKKOS_INLINE_FUNCTION constexpr View::value_type gatherFromField (const std::index_sequence< GatherPoint... > &, const View &view, const Vector< T, View::rank > &wlo, const Vector< T, View::rank > &whi, const Vector< IndexType, View::rank > &args)
 
bool checkOption (const char *arg, const char *lstr, const char *sstr)
 
template<typename T , typename >
T getNumericalOption (const char *arg)
 
template<typename ParticleContainer , typename index_type >
void copyAttributes (ParticleContainer &pc, const index_type &boundaryIndices)
 
template<typename ParticleContainer , typename index_type >
void sortParticles (ParticleContainer &pc, const index_type &newIndex)
 
template<typename T , unsigned Dim, class Mesh >
std::ostream & operator<< (std::ostream &, const RegionLayout< T, Dim, Mesh > &)
 
template<typename T , unsigned Dim, class Mesh , class... Properties>
std::ostream & operator<< (std::ostream &out, const RegionLayout< T, Dim, Mesh > &rl)
 
template<e_functor_type Type, typename Policy , typename... Acc, typename Functor >
auto functorize (const Functor &f)
 
template<typename Functor >
void runForAllSpaces (Functor &&f)
 
template<unsigned Dim, unsigned Current = 0, class BeginFunctor , class EndFunctor , class Functor , typename Check = std::nullptr_t>
constexpr void nestedLoop (BeginFunctor &&begin, EndFunctor &&end, Functor &&body, Check &&check=nullptr)
 
template<typename View , class Functor , typename Check = std::nullptr_t>
constexpr void nestedViewLoop (View &view, int shift, Functor &&body, Check &&check=nullptr)
 
template<typename T , unsigned Dim, class... Properties>
void write (const typename ViewType< T, Dim, Properties... >::view_type &view, std::ostream &out=std::cout)
 
template<typename View , size_t... Idx>
decltype(auto) shrinkView_impl (std::string label, const View &view, int nghost, const std::index_sequence< Idx... > &)
 
template<typename View >
decltype(auto) shrinkView (std::string label, const View &view, int nghost)
 

Class Documentation

◆ ippl::detail::ConstructVariant

struct ippl::detail::ConstructVariant
template<typename, typename, template< typename... > class Verifier = IsUnique>
struct ippl::detail::ConstructVariant< typename, typename, Verifier >

Base struct declaration (see full declaration below for details)

Definition at line 75 of file TypeUtils.h.

Collaboration diagram for ippl::detail::ConstructVariant< typename, typename, Verifier >:
Collaboration graph

◆ ippl::detail::ConstructVariant< std::variant< Next, ToAdd... >, std::variant< Added... >, Verifier >

struct ippl::detail::ConstructVariant< std::variant< Next, ToAdd... >, std::variant< Added... >, Verifier >
template<typename Next, typename... ToAdd, typename... Added, template< typename... > class Verifier>
struct ippl::detail::ConstructVariant< std::variant< Next, ToAdd... >, std::variant< Added... >, Verifier >

Constructs a variant type containing all the provided types that fulfill a certain condition. This is done by recursively adding types to the variant based on the inclusion criteria.

The default verification struct is IsPresent defined above, which includes the type if it has not already been added to the variant before. This is useful if the provided types include duplicates, e.g. if they are type aliases that can sometimes refer to the same type. In particular, Kokkos memory spaces can sometimes have different names but refer to the same memory space. Variants do not allow duplicate types to appear in their parameter packs; each type may only appear once.

The verification struct can be user defined as long as it conforms to the variant verification struct interface. The struct must accept at least a parameter pack; the first parameter is the type currently being checked and the rest are the types already added to the variant. The struct must expose a boolean enable that indicates whether the next type should be included in the variant. The struct must also expose a type type, which is the type to be added to the variant

Template Parameters
Nextthe next type to add to the variant
ToAdd...the remaining types waiting to be added to the variant
Added...the types that have already been added to the variant
Verifierthe variant verification struct

Definition at line 121 of file TypeUtils.h.

Collaboration diagram for ippl::detail::ConstructVariant< std::variant< Next, ToAdd... >, std::variant< Added... >, Verifier >:
Collaboration graph
Class Members
typedef Verifier< Next, Added... > Check
typedef conditional_t< B, T, F > cond
typedef cond< enable, typename ConstructVariant< variant< ToAdd... >, variant< typename type, Added... >, Verifier >::type, typename ConstructVariant< variant< ToAdd... >, variant< Added... >, Verifier >::type > type
typedef variant< T... > variant

◆ ippl::detail::ConstructVariant< std::variant<>, std::variant< T... >, Verifier >

struct ippl::detail::ConstructVariant< std::variant<>, std::variant< T... >, Verifier >
template<typename... T, template< typename... > class Verifier>
struct ippl::detail::ConstructVariant< std::variant<>, std::variant< T... >, Verifier >

Base case for a fully constructed variant

Template Parameters
T...the types to be included in the variant

Definition at line 90 of file TypeUtils.h.

Collaboration diagram for ippl::detail::ConstructVariant< std::variant<>, std::variant< T... >, Verifier >:
Collaboration graph
Class Members
typedef variant< T... > type

◆ ippl::detail::ConstructVariant< std::variant<>, std::variant<>, Verifier >

struct ippl::detail::ConstructVariant< std::variant<>, std::variant<>, Verifier >
template<template< typename... > class Verifier>
struct ippl::detail::ConstructVariant< std::variant<>, std::variant<>, Verifier >

Base case for variant construction with no types to add

Definition at line 81 of file TypeUtils.h.

Collaboration diagram for ippl::detail::ConstructVariant< std::variant<>, std::variant<>, Verifier >:
Collaboration graph
Class Members
typedef variant type

◆ ippl::detail::Coords

struct ippl::detail::Coords
template<unsigned Dim, typename T = size_t>
struct ippl::detail::Coords< Dim, T >

Recursively templated struct for defining tuples with arbitrary length

Template Parameters
Dimthe length of the tuple
Tthe data type to repeat (default size_t)

Definition at line 109 of file ParallelDispatch.h.

Collaboration diagram for ippl::detail::Coords< Dim, T >:
Collaboration graph
Class Members
typedef decltype(tuple_cat(type >(), type >())) type

◆ ippl::detail::Coords< 1, T >

struct ippl::detail::Coords< 1, T >
template<typename T>
struct ippl::detail::Coords< 1, T >

Definition at line 118 of file ParallelDispatch.h.

Collaboration diagram for ippl::detail::Coords< 1, T >:
Collaboration graph
Class Members
typedef tuple< T > type

◆ ippl::detail::CreateUniformType

struct ippl::detail::CreateUniformType
template<template< typename... > class Type, typename View>
struct ippl::detail::CreateUniformType< Type, View >

Constructs a uniform type based on Kokkos views' uniform types (i.e. a type where all optional template parameters are explicitly specified)

Template Parameters
Typethe type to specialize
Viewthe view type

Definition at line 203 of file TypeUtils.h.

Collaboration diagram for ippl::detail::CreateUniformType< Type, View >:
Collaboration graph
Class Members
typedef typename type type
typedef typename uniform_type view_type

◆ ippl::detail::ExtractRank

struct ippl::detail::ExtractRank
template<typename>
struct ippl::detail::ExtractRank< typename >

Definition at line 171 of file ParallelDispatch.h.

Collaboration diagram for ippl::detail::ExtractRank< typename >:
Collaboration graph

◆ ippl::detail::ExtractReducerReturnType

struct ippl::detail::ExtractReducerReturnType
template<typename T>
struct ippl::detail::ExtractReducerReturnType< T >

Definition at line 186 of file ParallelDispatch.h.

Collaboration diagram for ippl::detail::ExtractReducerReturnType< T >:
Collaboration graph
Class Members
typedef T type

◆ ippl::detail::ExtractReducerReturnType< T >

struct ippl::detail::ExtractReducerReturnType< T >
template<HasMemberValueType T>
struct ippl::detail::ExtractReducerReturnType< T >

Definition at line 190 of file ParallelDispatch.h.

Collaboration diagram for ippl::detail::ExtractReducerReturnType< T >:
Collaboration graph
Class Members
typedef typename value_type type

◆ ippl::detail::Forward

struct ippl::detail::Forward
template<template< typename... > class Type, typename Pack>
struct ippl::detail::Forward< Type, Pack >

Utility struct for forwarding parameter packs (see specializations)

Template Parameters
Typethe templated type
Packa type containing the parameters to forward

Definition at line 177 of file TypeUtils.h.

Collaboration diagram for ippl::detail::Forward< Type, Pack >:
Collaboration graph

◆ ippl::detail::Forward< Type, Kokkos::View< T, Properties... > >

struct ippl::detail::Forward< Type, Kokkos::View< T, Properties... > >
template<template< typename... > class Type, typename T, typename... Properties>
struct ippl::detail::Forward< Type, Kokkos::View< T, Properties... > >

Forwards the properties of a Kokkos view to another type

Definition at line 191 of file TypeUtils.h.

Collaboration diagram for ippl::detail::Forward< Type, Kokkos::View< T, Properties... > >:
Collaboration graph
Class Members
typedef Type< Properties... > type

◆ ippl::detail::Forward< Type, std::variant< Spaces... > >

struct ippl::detail::Forward< Type, std::variant< Spaces... > >
template<template< typename... > class Type, typename... Spaces>
struct ippl::detail::Forward< Type, std::variant< Spaces... > >

Forwards the types in a variant to another type

Definition at line 183 of file TypeUtils.h.

Collaboration diagram for ippl::detail::Forward< Type, std::variant< Spaces... > >:
Collaboration graph
Class Members
typedef Type< Spaces... > type

◆ ippl::detail::FunctorWrapper

struct ippl::detail::FunctorWrapper
template<e_functor_type, typename, typename, typename, typename...>
struct ippl::detail::FunctorWrapper< e_functor_type, typename, typename, typename,... >

Definition at line 129 of file ParallelDispatch.h.

Collaboration diagram for ippl::detail::FunctorWrapper< e_functor_type, typename, typename, typename,... >:
Collaboration graph

◆ ippl::detail::HeffteBackendType

struct ippl::detail::HeffteBackendType
template<typename>
struct ippl::detail::HeffteBackendType< typename >

Wrapper type for heFFTe backends, templated on the Kokkos memory space

Definition at line 73 of file FFT.h.

Collaboration diagram for ippl::detail::HeffteBackendType< typename >:
Collaboration graph

◆ ippl::detail::HeffteBackendType< Kokkos::HostSpace >

struct ippl::detail::HeffteBackendType< Kokkos::HostSpace >

Use heFFTe's inbuilt 1D fft computation on CPUs if no vendor specific or optimized backend is found.

Definition at line 132 of file FFT.h.

Collaboration diagram for ippl::detail::HeffteBackendType< Kokkos::HostSpace >:
Collaboration graph
Class Members
typedef stock backend
typedef stock_cos backendCos
typedef stock_cos1 backendCos1
typedef stock_sin backendSine

◆ ippl::detail::NPtr

struct ippl::detail::NPtr
template<typename T, int N>
struct ippl::detail::NPtr< T, N >

Recursively templated struct for defining pointers with arbitrary indirection depth.

Template Parameters
Tdata type
Nindirection level

Definition at line 25 of file ViewTypes.h.

Collaboration diagram for ippl::detail::NPtr< T, N >:
Collaboration graph
Class Members
typedef type * type

◆ ippl::detail::NPtr< T, 1 >

struct ippl::detail::NPtr< T, 1 >
template<typename T>
struct ippl::detail::NPtr< T, 1 >

Base case template specialization for a simple pointer.

Definition at line 33 of file ViewTypes.h.

Collaboration diagram for ippl::detail::NPtr< T, 1 >:
Collaboration graph
Class Members
typedef T * type

◆ ippl::detail::TypeForAllSpaces

struct ippl::detail::TypeForAllSpaces
template<template< typename... > class Type>
struct ippl::detail::TypeForAllSpaces< Type >

Instantiates a parameter pack with all the available Kokkos memory spaces

Definition at line 212 of file TypeUtils.h.

Collaboration diagram for ippl::detail::TypeForAllSpaces< Type >:
Collaboration graph
Class Members
typedef typename type exec_spaces_type
typedef typename type memory_spaces_type
typedef VariantFromUniqueTypes< DefaultExecutionSpace > unique_exec_spaces
typedef VariantFromUniqueTypes< HostSpace, SharedSpace, SharedHostPinnedSpace > unique_memory_spaces

◆ ippl::detail::ViewAccess

struct ippl::detail::ViewAccess
template<int tensorRank, typename>
struct ippl::detail::ViewAccess< tensorRank, typename >

Access a view that either contains a vector field or a scalar field in such a way that the correct element access is determined at compile time, reducing the number of functions needed to achieve the same behavior for both kinds of fields

Template Parameters
tensorRankindicates whether scalar, vector, or matrix field
-the view type

Definition at line 40 of file FFTOpenPoissonSolver.h.

Collaboration diagram for ippl::detail::ViewAccess< tensorRank, typename >:
Collaboration graph

◆ ippl::detail::ViewType

struct ippl::detail::ViewType
template<typename T, unsigned Dim, class... Properties>
struct ippl::detail::ViewType< T, Dim, Properties >

View type for an arbitrary number of dimensions.

Template Parameters
Tview data type
Dimview dimension
Propertiesfurther template parameters of Kokkos

Definition at line 44 of file ViewTypes.h.

Collaboration diagram for ippl::detail::ViewType< T, Dim, Properties >:
Collaboration graph
Class Members
typedef type, Properties... > view_type

◆ ippl::detail::WrapUnique

struct ippl::detail::WrapUnique
template<template< typename > class Wrapper>
struct ippl::detail::WrapUnique< Wrapper >

Defines a variant verification struct Performs the same check as IsUnique, but instead of using the provided types directly, the types are wrapped in another provided type. For example, if the wrapper type is std::shared_ptr and the types are <int, float, int>, then the final variant will allow std::shared_ptr<int> and std::shared_ptr<float>.

Template Parameters
Wrapperthe wrapper type

Definition at line 39 of file TypeUtils.h.

Collaboration diagram for ippl::detail::WrapUnique< Wrapper >:
Collaboration graph

Typedef Documentation

◆ ConditionalType

template<bool B, typename T >
using ippl::detail::ConditionalType = typedef std::conditional_t<B, T, void>

Convenience alias for types that should or should not be included in variants constructed with ConstructVariant (defined below) based on some compile-time constant

Template Parameters
Bwhether the type should be enabled
Tthe type

Definition at line 56 of file TypeUtils.h.

◆ hash_type

template<typename MemorySpace >
using ippl::detail::hash_type = typedef typename detail::ViewType<int, 1, MemorySpace>::view_type

Definition at line 49 of file ViewTypes.h.

◆ size_type

typedef std::size_t ippl::detail::size_type

Definition at line 13 of file IpplTypes.h.

◆ VariantFromConditionalTypes

template<typename... Types>
using ippl::detail::VariantFromConditionalTypes = typedef typename ConstructVariant<std::variant<Types...>, std::variant<>, IsEnabled>::type

A variant containing all the enabled types, where "enabled" types are assumed to be void when disabled (i.e. std::conditional_t<B, T, void>)

Definition at line 146 of file TypeUtils.h.

◆ VariantFromUniqueTypes

template<typename... Types>
using ippl::detail::VariantFromUniqueTypes = typedef typename ConstructVariant<std::variant<Types...>, std::variant<>, IsUnique>::type

A variant containing just the unique types from the pack

Definition at line 154 of file TypeUtils.h.

◆ VariantWithVerifier

template<template< typename... > class Verifier, typename... Types>
using ippl::detail::VariantWithVerifier = typedef typename ConstructVariant<std::variant<Types...>, std::variant<>, Verifier>::type

A variant containing the types enabled by a custom verifier; to implement a custom verifier, provide the following:

  • template <typename Next, typename... Added> Next: the next input type to check Added: the types that have already been added
  • bool enable: whether the type should be added
  • typename type: the output type to be added

Definition at line 167 of file TypeUtils.h.

Enumeration Type Documentation

◆ e_functor_type

Enumerator
FOR 
REDUCE 
SCAN 

Definition at line 122 of file ParallelDispatch.h.

Function Documentation

◆ binomialCoefficient()

constexpr unsigned int ippl::detail::binomialCoefficient ( unsigned  a,
unsigned  b 
)
constexpr

Compile-time evaluation of binomial coefficients, aka elements of Pascal's triangle, aka choices from combinatorics, etc

Parameters
anumber of options
bnumber of choices
Returns
a choose b

Definition at line 68 of file FieldLayout.h.

References factorial().

Referenced by countCubes().

Here is the call graph for this function:

◆ checkOption()

bool ippl::detail::checkOption ( const char *  arg,
const char *  lstr,
const char *  sstr 
)

Definition at line 115 of file Ippl.cpp.

Referenced by ippl::initialize().

◆ copyAttributes()

template<typename ParticleContainer , typename index_type >
void ippl::detail::copyAttributes ( ParticleContainer pc,
const index_type &  boundaryIndices 
)
inline

◆ countCubes()

template<unsigned Dim>
constexpr unsigned int ippl::detail::countCubes ( unsigned  m)
constexpr

Compile-time evaluation of the number of hypercubes of dimension m in a hypercube of dimension Dim

Template Parameters
Dimparent hypercube dimension
Parameters
msub-hypercube dimension
Returns
The number of m-cubes in an n-cube

Definition at line 80 of file FieldLayout.h.

References binomialCoefficient(), and Dim.

Here is the call graph for this function:

◆ countHypercubes()

◆ factorial()

constexpr unsigned int ippl::detail::factorial ( unsigned  x)
constexpr

Compile-time evaluation of x!

Parameters
xinput value
Returns
x factorial

Definition at line 57 of file FieldLayout.h.

References factorial().

Referenced by binomialCoefficient(), factorial(), Multipole::setNormalComponent(), and Multipole::setSkewComponent().

Here is the call graph for this function:

◆ functorize()

template<e_functor_type Type, typename Policy , typename... Acc, typename Functor >
auto ippl::detail::functorize ( const Functor &  f)

Convenience function for wrapping a functor with the wrapper struct.

Template Parameters
Functorthe functor type
Typethe parallel dispatch type
Policythe range policy type
Acc...the accumulator type(s)
Returns
A wrapper containing the given functor

Definition at line 203 of file ParallelDispatch.h.

References Dim.

Referenced by ippl::parallel_reduce().

◆ gatherFromField()

template<unsigned long... GatherPoint, typename View , typename T , typename IndexType = size_t>
KOKKOS_INLINE_FUNCTION constexpr View::value_type ippl::detail::gatherFromField ( const std::index_sequence< GatherPoint... > &  ,
const View &  view,
const Vector< T, View::rank > &  wlo,
const Vector< T, View::rank > &  whi,
const Vector< IndexType, View::rank > &  args 
)
constexpr

Gathers the particle attribute from a field (see scatter_field for more details)

Template Parameters
GatherPoint...the indices of the points from which to gather (sequence 0 to 2^Dim)
Viewthe field view type
Tthe field data type
IndexTypethe index type for accessing the field (default size_t)
Parameters
viewthe field view on which to scatter
wlolower weights for interpolation
whiupper weights for interpolation
argsthe indices at which to access the field

Definition at line 68 of file CIC.hpp.

◆ gatherFromPoint()

template<unsigned long GatherPoint, unsigned long... Index, typename View , typename T , typename IndexType = size_t>
KOKKOS_INLINE_FUNCTION constexpr View::value_type ippl::detail::gatherFromPoint ( const std::index_sequence< Index... > &  ,
const View &  view,
const Vector< T, View::rank > &  wlo,
const Vector< T, View::rank > &  whi,
const Vector< IndexType, View::rank > &  args 
)
constexpr

Gathers from a field at a single point

Template Parameters
GatherPointthe index of the point from which data is gathered
Indexthe sequence 0...Dim - 1
Viewthe field view type
Tthe field data type
IndexTypethe index type for accessing the field (default size_t)
Parameters
viewthe field view on which to scatter
wlolower weights for interpolation
whiupper weights for interpolation
argsthe indices at which to access the field
Returns
The gathered value

Definition at line 59 of file CIC.hpp.

◆ getCube()

template<unsigned Dim, typename... CubeTags, typename = std::enable_if_t<sizeof...(CubeTags) == Dim - 1>, typename = std::enable_if_t<std::conjunction_v<std::is_same<e_cube_tag, CubeTags>...>>>
unsigned int ippl::detail::getCube ( e_cube_tag  tag,
CubeTags...  tags 
)

Computes the ternary-encoded index of a hypercube

Template Parameters
Dimthe number of dimensions in the full hypercube
CubeTags...variadic argument list, must be all e_cube_tag
Parameters
tag(s...)the tags describing the hypercube of interest
Returns
The index of the desired hypercube

Definition at line 132 of file FieldLayout.h.

References Dim, and getCube().

Referenced by getCube(), and getFace_impl().

Here is the call graph for this function:

◆ getFace()

template<unsigned Dim>
unsigned int ippl::detail::getFace ( unsigned int  axis,
e_cube_tag  side 
)

Convenience alias for getCube for getting facets

Template Parameters
Dimthe number of dimensions in the parent hypercube
Parameters
axisthe axis perpendicular to the facet
sidewhether the facet is an upper or lower facet
Returns
The index of the facet

Definition at line 157 of file FieldLayout.h.

References getFace_impl(), and ippl::IS_PARALLEL.

Here is the call graph for this function:

◆ getFace_impl()

template<size_t... Idx>
unsigned int ippl::detail::getFace_impl ( const std::array< e_cube_tag, sizeof...(Idx)> &  args,
const std::index_sequence< Idx... > &   
)

Utility function for getFace

Definition at line 144 of file FieldLayout.h.

References getCube().

Referenced by getFace().

Here is the call graph for this function:

◆ getFaceDim()

unsigned int ippl::detail::getFaceDim ( unsigned int  face)

Determine the axis perpendicular to a given facet (throws an exception if the index does not correspond to a facet)

Parameters
facethe facet's index
Returns
The index of the axis perpendicular to that facet

Definition at line 14 of file FieldLayout.cpp.

◆ getNumericalOption()

template<typename T , typename >
T ippl::detail::getNumericalOption ( const char *  arg)

Definition at line 120 of file Ippl.cpp.

References Physics::e.

◆ indexToFace()

template<unsigned Dim>
unsigned int ippl::detail::indexToFace ( unsigned int  index)

Converts between ternary encoding and face set indexing

Template Parameters
Dimthe number of dimensions
Parameters
indexthe ternary-encoded index of a facet in [0, 3^Dim)
Returns
The index of that facet in a set of faces in [0, 2*Dim)

Definition at line 110 of file FieldLayout.h.

References countHypercubes(), and Dim.

Here is the call graph for this function:

◆ interpolationIndex()

template<unsigned long Point, unsigned long Index, typename Indices >
KOKKOS_INLINE_FUNCTION constexpr Indices::value_type ippl::detail::interpolationIndex ( const Indices &  args)
constexpr

Computes the index for a given point for a given axis

Template Parameters
Pointindex of the point
Indexindex of the axis
Indicesthe index vector type
Parameters
argsthe indices of the source point
Returns
The index along the given axis for the displaced point

Definition at line 24 of file CIC.hpp.

◆ interpolationWeight()

template<unsigned long Point, unsigned long Index, typename Weights >
KOKKOS_INLINE_FUNCTION constexpr Weights::value_type ippl::detail::interpolationWeight ( const Weights &  wlo,
const Weights &  whi 
)
constexpr

Computes the weight for a given point for a given axial direction

Template Parameters
Pointindex of the point
Indexindex of the axis
Weightsthe weight vector type
Parameters
wlolower weights for interpolation
whiupper weights for interpolation
Returns
Interpolation weight for the given point's displacement along the given axis

Definition at line 11 of file CIC.hpp.

◆ isUpper()

bool ippl::detail::isUpper ( unsigned int  face)

Determines whether a facet is on the upper boundary of its domain. For lower dimension hypercubes, determines whether the component is on the upper boundary of the domain along at least one axis

Parameters
facethe hypercube's index
Returns
Whether it touches any upper boundary

Definition at line 5 of file FieldLayout.cpp.

Referenced by ippl::detail::ParticleLayout< T, Dim, PositionProperties >::applyBC().

◆ nestedLoop()

template<unsigned Dim, unsigned Current = 0, class BeginFunctor , class EndFunctor , class Functor , typename Check = std::nullptr_t>
constexpr void ippl::detail::nestedLoop ( BeginFunctor &&  begin,
EndFunctor &&  end,
Functor &&  body,
Check &&  check = nullptr 
)
constexpr

Expands into a nested loop via templating Source: https://stackoverflow.com/questions/34535795/n-dimensionally-nested-metaloops-with-templates

Template Parameters
Dimthe number of nested levels
BeginFunctorfunctor type for determining the start index of each loop
EndFunctorfunctor type for determining the end index of each loop
Functorfunctor type for the loop body
Checkfunctor type for loop check
Parameters
begina functor that returns the starting index for each level of the loop
enda functor that returns the ending index (exclusive) for each level of the loop
bodya functor to be called in each iteration of the loop with the indices as arguments
checka check function to be run after each loop; takes the current axis as an argument (default none)

Definition at line 33 of file ViewUtils.h.

References begin(), Dim, and end().

Here is the call graph for this function:

◆ nestedViewLoop()

template<typename View , class Functor , typename Check = std::nullptr_t>
constexpr void ippl::detail::nestedViewLoop ( View &  view,
int  shift,
Functor &&  body,
Check &&  check = nullptr 
)
constexpr

Convenience function for nested looping through a view

Template Parameters
Viewthe view type
Functorthe loop body functor type
Checkfunctor type for loop check
Parameters
viewthe view
shiftthe number of ghost cells
bodythe functor to be called in each iteration
checka check function to be run after each loop; takes the current axis as an argument (default none)

Definition at line 62 of file ViewUtils.h.

Referenced by write().

◆ operator<<() [1/3]

template<typename Field >
std::ostream & ippl::detail::operator<< ( std::ostream &  os,
const BCondBase< Field > &  bc 
)
inline

Definition at line 28 of file BcTypes.hpp.

References ippl::detail::BCondBase< Field >::write().

Here is the call graph for this function:

◆ operator<<() [2/3]

template<typename T , unsigned Dim, class Mesh >
std::ostream & ippl::detail::operator<< ( std::ostream &  ,
const RegionLayout< T, Dim, Mesh > &   
)

◆ operator<<() [3/3]

template<typename T , unsigned Dim, class Mesh , class... Properties>
std::ostream & ippl::detail::operator<< ( std::ostream &  out,
const RegionLayout< T, Dim, Mesh > &  rl 
)

Definition at line 125 of file RegionLayout.hpp.

References ippl::detail::RegionLayout< T, Dim, Mesh, Properties >::write().

Here is the call graph for this function:

◆ runForAllSpaces()

template<typename Functor >
void ippl::detail::runForAllSpaces ( Functor &&  f)

Performs an action for all memory spaces

Template Parameters
Functorthe functor type
Parameters
fa functor object whose call operator takes a memory space as a template parameter

Definition at line 428 of file TypeUtils.h.

Referenced by copyAttributes(), ippl::ParticleBase< PLayout, IDProperties >::getAttributeNum(), ippl::ParticleBase< PLayout, IDProperties >::internalDestroy(), ippl::ParticleBase< PLayout, IDProperties >::pack(), ippl::ParticleBase< PLayout, IDProperties >::recvFromRank(), sortParticles(), and ippl::ParticleBase< PLayout, IDProperties >::unpack().

◆ scatterToField()

template<unsigned long... ScatterPoint, typename View , typename T , typename IndexType = size_t>
KOKKOS_INLINE_FUNCTION constexpr void ippl::detail::scatterToField ( const std::index_sequence< ScatterPoint... > &  ,
const View &  view,
const Vector< T, View::rank > &  wlo,
const Vector< T, View::rank > &  whi,
const Vector< IndexType, View::rank > &  args,
T  val = 1 
)
constexpr

Scatters the particle attribute to the field.

The coordinates to which an attribute must be scattered is given by 2^n, where n is the number of dimensions. Example: the point (x, y) is scattered to (x, y), (x - 1, y), (x, y - 1), and (x - 1, y - 1). In other words, for each coordinate, we choose between the unchanged coordinate and a neighboring value. We can identify each point to which the attribute is scattered by interpreting this set of choices as a binary number.

Template Parameters
ScatterPoint...the indices of the points to which to scatter (sequence 0 to 2^Dim)
Viewthe field view type
Tthe field data type
IndexTypethe index type for accessing the field (default size_t)
Parameters
viewthe field view on which to scatter
wlolower weights for interpolation
whiupper weights for interpolation
argsthe indices at which to access the field
valthe value to interpolate

Definition at line 47 of file CIC.hpp.

Referenced by ippl::OrthogonalRecursiveBisection< Field, Tp >::scatterR().

◆ scatterToPoint()

template<unsigned long ScatterPoint, unsigned long... Index, typename View , typename T , typename IndexType = size_t>
KOKKOS_INLINE_FUNCTION constexpr void ippl::detail::scatterToPoint ( const std::index_sequence< Index... > &  ,
const View &  view,
const Vector< T, View::rank > &  wlo,
const Vector< T, View::rank > &  whi,
const Vector< IndexType, View::rank > &  args,
const T val 
)
constexpr

Scatters to a field at a single point

Template Parameters
ScatterPointthe index of the point to which we are scattering
Indexthe sequence 0...Dim - 1
Viewthe field view type
Tthe field data type
IndexTypethe index type for accessing the field (default size_t)
Parameters
viewthe field view on which to scatter
wlolower weights for interpolation
whiupper weights for interpolation
argsthe indices at which to access the field
valthe value to interpolate

Definition at line 38 of file CIC.hpp.

◆ shrinkView()

template<typename View >
decltype(auto) ippl::detail::shrinkView ( std::string  label,
const View &  view,
int  nghost 
)

Constructs a new view with size equal to that of the given view, minus the ghost cells (used for heFFTe, which expects the data to have a certain layout and no ghost cells)

Parameters
labelthe new view's name
viewthe view to shrink
nghostthe number of ghost cells on the view's boundary
Returns
The shrunken view

Definition at line 122 of file ViewUtils.h.

References shrinkView_impl().

Referenced by ippl::FFT< CCTransform, ComplexField >::transform(), ippl::FFT< SineTransform, Field >::transform(), ippl::FFT< CosTransform, Field >::transform(), ippl::FFT< Cos1Transform, Field >::transform(), and ippl::FFT< RCTransform, RealField >::transform().

Here is the call graph for this function:

◆ shrinkView_impl()

template<typename View , size_t... Idx>
decltype(auto) ippl::detail::shrinkView_impl ( std::string  label,
const View &  view,
int  nghost,
const std::index_sequence< Idx... > &   
)

Utility function for shrinkView

Definition at line 106 of file ViewUtils.h.

Referenced by shrinkView().

◆ sortParticles()

template<typename ParticleContainer , typename index_type >
void ippl::detail::sortParticles ( ParticleContainer pc,
const index_type &  newIndex 
)
inline

Definition at line 804 of file ParticleSpatialOverlapLayout.hpp.

References ippl::fence(), and runForAllSpaces().

Referenced by ippl::ParticleSpatialOverlapLayout< T, Dim, Mesh, PositionProperties >::buildCells().

Here is the call graph for this function:

◆ write()

template<typename T , unsigned Dim, class... Properties>
void ippl::detail::write ( const typename ViewType< T, Dim, Properties... >::view_type view,
std::ostream &  out = std::cout 
)

Writes a view to an output stream

Template Parameters
Tview data type
Dimview dimension
Propertiesfurther template parameters of Kokkos
Parameters
viewto write
outstream

Definition at line 84 of file ViewUtils.h.

References Dim, endl(), and nestedViewLoop().

Here is the call graph for this function: