|
IPPL (Independent Parallel Particle Layer)
IPPL
|
#include <TypeUtils.h>
Public Member Functions | |
| MultispaceContainer () | |
| template<typename DataType, typename Filter = std::nullptr_t> | |
| MultispaceContainer (const DataType &data, Filter &&predicate=nullptr) | |
| template<typename Space, typename Filter = std::nullptr_t> | |
| void | copyToOtherSpaces (Filter &&predicate=nullptr) |
| template<typename Space> | |
| const Type< Space > & | get () const |
| template<typename Space> | |
| Type< Space > & | get () |
| template<typename Functor> | |
| void | forAll (Functor &&f) const |
| template<typename Functor> | |
| void | forAll (Functor &&f) |
Private Types | |
| template<typename T, typename... Ts> | |
| using | Verifier = typename WrapUnique<Type>::template Verifier<T, Ts...> |
| using | Types = VariantWithVerifier<Verifier, Spaces...> |
Private Member Functions | |
| template<typename Space> | |
| void | initElements () |
| template<typename MemorySpace, typename Filter, std::enable_if_t< std::is_null_pointer_v< std::decay_t< Filter > >, int > = 0> | |
| constexpr bool | copyToSpace (Filter &&) |
| template<typename MemorySpace, typename Filter, std::enable_if_t<!std::is_null_pointer_v< std::decay_t< Filter > >, int > = 0> | |
| bool | copyToSpace (Filter &&predicate) |
Static Private Member Functions | |
| template<typename Space, unsigned Idx = 0> | |
| static constexpr unsigned | spaceToIndex () |
Private Attributes | |
| std::array< Types, sizeof...(Spaces)> | elements_m |
A container indexed by type instead of by numerical indices; designed for storing elements associated with Kokkos memory spaces
| Type | the element type |
| Spaces... | the memory spaces of interest |
Definition at line 276 of file TypeUtils.h.
|
private |
Definition at line 280 of file TypeUtils.h.
|
private |
Definition at line 278 of file TypeUtils.h.
|
inline |
Definition at line 329 of file TypeUtils.h.
|
inline |
Constructs a container where all spaces have a mirror with the same data as the provided data structure; a predicate functor can be provided to skip any undesired memory spaces
| DataType | the type of the provided element |
| Filter | the predicate type, or nullptr_t if there is no predicate |
| data | the original data |
| predicate | an optional functor that determines which memory spaces need a copy of the data |
Definition at line 342 of file TypeUtils.h.
|
inline |
Copies the data from one memory space to all other memory spaces
| Space | the source space |
| Filter | the predicate type |
| predicate | an optional functor that determines which memory spaces need a copy of the data |
Definition at line 359 of file TypeUtils.h.
Referenced by ippl::detail::MultispaceContainer< Type, Spaces... >::MultispaceContainer().
|
inlineconstexprprivate |
Determine whether the element for a space should be initialized, possibly based on a predicate functor
Definition at line 318 of file TypeUtils.h.
|
inlineprivate |
Definition at line 324 of file TypeUtils.h.
|
inline |
Definition at line 398 of file TypeUtils.h.
|
inline |
Performs an action for each element
| Functor | the functor type |
| f | a functor taking an element for a given space |
Definition at line 393 of file TypeUtils.h.
Referenced by ippl::detail::MultispaceContainer< Type, Spaces... >::copyToOtherSpaces().
|
inline |
Definition at line 383 of file TypeUtils.h.
|
inline |
Accessor for a space's element
| Space | the memory space |
Definition at line 378 of file TypeUtils.h.
Referenced by ippl::detail::MultispaceContainer< Type, Spaces... >::copyToOtherSpaces().
|
inlineprivate |
Initializes the element for a space
Definition at line 308 of file TypeUtils.h.
Referenced by ippl::detail::MultispaceContainer< Type, Spaces... >::MultispaceContainer().
|
inlinestaticconstexprprivate |
Locates an element associated with a space
| Space | the memory space |
Definition at line 290 of file TypeUtils.h.
Referenced by ippl::detail::MultispaceContainer< Type, Spaces... >::get(), ippl::detail::MultispaceContainer< Type, Spaces... >::get(), ippl::detail::MultispaceContainer< Type, Spaces... >::initElements(), ippl::detail::MultispaceContainer< Type, Spaces... >::MultispaceContainer(), and ippl::detail::MultispaceContainer< Type, Spaces... >::spaceToIndex().
|
private |
Definition at line 282 of file TypeUtils.h.