IPPL (Independent Parallel Particle Layer)
IPPL
Loading...
Searching...
No Matches
ippl::Tuple< Ts > Class Template Reference

Generic tuple class with various operations. More...

#include <Tuple.h>

Collaboration diagram for ippl::Tuple< Ts >:

Public Member Functions

template<std::size_t Idx>
requires (Idx < sizeof...(Ts))
KOKKOS_INLINE_FUNCTION auto && get () noexcept
template<std::size_t Idx>
requires (Idx < sizeof...(Ts))
KOKKOS_INLINE_FUNCTION auto && get () const noexcept
template<typename Functor, std::size_t Idx, typename... OtherTs>
requires (std::is_copy_assignable_v<Ts> && ...)
KOKKOS_INLINE_FUNCTION int applySingle (Functor func, const Tuple< OtherTs... > &other)
template<typename Functor, typename... OtherTs, std::size_t... Idx>
KOKKOS_INLINE_FUNCTION void applySequence (Functor func, const Tuple< OtherTs... > &other, const std::index_sequence< Idx... > &)
template<std::size_t Idx, typename... OtherTs>
requires (std::is_copy_assignable_v<Ts> && ...)
KOKKOS_INLINE_FUNCTION int assignToSingle (const Tuple< OtherTs... > &other)
template<typename... OtherTs, std::size_t... Idx>
requires (std::is_copy_assignable_v<Ts> && ...)
KOKKOS_INLINE_FUNCTION void assignToSequence (const Tuple< OtherTs... > &other, const std::index_sequence< Idx... > &)
template<std::size_t Idx, typename... OtherTs>
requires (std::is_move_assignable_v<Ts> && ...)
KOKKOS_INLINE_FUNCTION int assignToSingle (Tuple< OtherTs... > &&other)
template<typename... OtherTs, std::size_t... Idx>
requires (std::is_move_assignable_v<Ts> && ...)
KOKKOS_INLINE_FUNCTION void assignToSequence (Tuple< OtherTs... > &&other, const std::index_sequence< Idx... > &)
template<typename... OtherTs>
requires (std::is_copy_assignable_v<Ts> && ...)
KOKKOS_INLINE_FUNCTION Tupleoperator= (const Tuple< OtherTs... > &other)
template<typename... OtherTs>
requires (std::is_move_assignable_v<Ts> && ...)
KOKKOS_INLINE_FUNCTION Tupleoperator= (Tuple< OtherTs... > &&other)
KOKKOS_INLINE_FUNCTION Tupleoperator+= (const Tuple &other)
KOKKOS_INLINE_FUNCTION Tupleoperator-= (const Tuple &other)
KOKKOS_INLINE_FUNCTION Tupleoperator*= (const Tuple &other)
KOKKOS_INLINE_FUNCTION Tupleoperator/= (const Tuple &other)
KOKKOS_INLINE_FUNCTION Tuple operator+ (const Tuple &other) const
KOKKOS_INLINE_FUNCTION Tuple operator- (const Tuple &other) const
KOKKOS_INLINE_FUNCTION Tuple operator* (const Tuple &other) const
KOKKOS_INLINE_FUNCTION Tuple operator/ (const Tuple &other) const
template<std::size_t Idx, std::size_t N, typename... OtherTs>
KOKKOS_INLINE_FUNCTION bool lexicographicalLess (const Tuple &other) const
template<std::size_t Idx, std::size_t N, typename... OtherTs>
KOKKOS_INLINE_FUNCTION bool lexicographicalEquals (const Tuple &other) const
template<typename... OtherTs>
requires ((sizeof...(Ts) == sizeof...(OtherTs)) && (std::totally_ordered<Ts> && ...))
KOKKOS_INLINE_FUNCTION bool operator< (const Tuple< OtherTs... > &other) const
template<typename... OtherTs>
requires ((sizeof...(Ts) == sizeof...(OtherTs)) && (std::totally_ordered<Ts> && ...))
KOKKOS_INLINE_FUNCTION bool operator== (const Tuple< OtherTs... > &other) const
Tupleoperator= (const Tuple< Ts... > &other)=default
Tupleoperator= (Tuple< Ts... > &&other)=default
 Tuple (const Tuple< Ts... > &t)=default
 Tuple (Tuple< Ts... > &&t)=default
 Tuple ()=default
template<typename... CtorTs>
requires (std::constructible_from<Ts, CtorTs> && ...)
KOKKOS_INLINE_FUNCTION Tuple (CtorTs &&... args)

Static Public Attributes

static constexpr std::size_t dim = sizeof...(Ts)
static constexpr std::size_t size = sizeof...(Ts)

Private Attributes

TupleImpl< 0, sizeof...(Ts), Ts... > tupleImpl_m

Detailed Description

template<typename... Ts>
class ippl::Tuple< Ts >

Generic tuple class with various operations.

Template Parameters
TsTypes of elements in the Tuple.

Definition at line 124 of file Tuple.h.

Constructor & Destructor Documentation

◆ Tuple() [1/4]

template<typename... Ts>
ippl::Tuple< Ts >::Tuple ( const Tuple< Ts... > & t)
default

References Tuple().

Referenced by applySequence(), applySingle(), assignToSequence(), assignToSequence(), assignToSingle(), assignToSingle(), lexicographicalEquals(), lexicographicalLess(), operator*(), operator*=(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/=(), operator<(), operator=(), operator=(), operator=(), operator=(), operator==(), Tuple(), Tuple(), and Tuple().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Tuple() [2/4]

template<typename... Ts>
ippl::Tuple< Ts >::Tuple ( Tuple< Ts... > && t)
default

References Tuple().

Here is the call graph for this function:

◆ Tuple() [3/4]

template<typename... Ts>
ippl::Tuple< Ts >::Tuple ( )
default

Referenced by operator*(), operator+(), operator-(), and operator/().

Here is the caller graph for this function:

◆ Tuple() [4/4]

template<typename... Ts>
template<typename... CtorTs>
requires (std::constructible_from<Ts, CtorTs> && ...)
KOKKOS_INLINE_FUNCTION ippl::Tuple< Ts >::Tuple ( CtorTs &&... args)
inline

Definition at line 302 of file Tuple.h.

References Tuple(), and tupleImpl_m.

Here is the call graph for this function:

Member Function Documentation

◆ applySequence()

template<typename... Ts>
template<typename Functor, typename... OtherTs, std::size_t... Idx>
KOKKOS_INLINE_FUNCTION void ippl::Tuple< Ts >::applySequence ( Functor func,
const Tuple< OtherTs... > & other,
const std::index_sequence< Idx... > &  )
inline

Definition at line 149 of file Tuple.h.

References applySingle(), and Tuple().

Referenced by operator*=(), operator+=(), operator-=(), and operator/=().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ applySingle()

template<typename... Ts>
template<typename Functor, std::size_t Idx, typename... OtherTs>
requires (std::is_copy_assignable_v<Ts> && ...)
KOKKOS_INLINE_FUNCTION int ippl::Tuple< Ts >::applySingle ( Functor func,
const Tuple< OtherTs... > & other )
inline

Definition at line 142 of file Tuple.h.

References get(), and Tuple().

Referenced by applySequence().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ assignToSequence() [1/2]

template<typename... Ts>
template<typename... OtherTs, std::size_t... Idx>
requires (std::is_copy_assignable_v<Ts> && ...)
KOKKOS_INLINE_FUNCTION void ippl::Tuple< Ts >::assignToSequence ( const Tuple< OtherTs... > & other,
const std::index_sequence< Idx... > &  )
inline

Definition at line 162 of file Tuple.h.

References assignToSingle(), and Tuple().

Referenced by operator=(), and operator=().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ assignToSequence() [2/2]

template<typename... Ts>
template<typename... OtherTs, std::size_t... Idx>
requires (std::is_move_assignable_v<Ts> && ...)
KOKKOS_INLINE_FUNCTION void ippl::Tuple< Ts >::assignToSequence ( Tuple< OtherTs... > && other,
const std::index_sequence< Idx... > &  )
inline

Definition at line 177 of file Tuple.h.

References assignToSingle(), and Tuple().

Here is the call graph for this function:

◆ assignToSingle() [1/2]

template<typename... Ts>
template<std::size_t Idx, typename... OtherTs>
requires (std::is_copy_assignable_v<Ts> && ...)
KOKKOS_INLINE_FUNCTION int ippl::Tuple< Ts >::assignToSingle ( const Tuple< OtherTs... > & other)
inline

Definition at line 155 of file Tuple.h.

References get(), and Tuple().

Referenced by assignToSequence(), and assignToSequence().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ assignToSingle() [2/2]

template<typename... Ts>
template<std::size_t Idx, typename... OtherTs>
requires (std::is_move_assignable_v<Ts> && ...)
KOKKOS_INLINE_FUNCTION int ippl::Tuple< Ts >::assignToSingle ( Tuple< OtherTs... > && other)
inline

Definition at line 170 of file Tuple.h.

References get(), and Tuple().

Here is the call graph for this function:

◆ get() [1/2]

template<typename... Ts>
template<std::size_t Idx>
requires (Idx < sizeof...(Ts))
KOKKOS_INLINE_FUNCTION auto && ippl::Tuple< Ts >::get ( ) const
inlinenoexcept

Definition at line 138 of file Tuple.h.

References get(), and tupleImpl_m.

Here is the call graph for this function:

◆ get() [2/2]

template<typename... Ts>
template<std::size_t Idx>
requires (Idx < sizeof...(Ts))
KOKKOS_INLINE_FUNCTION auto && ippl::Tuple< Ts >::get ( )
inlinenoexcept

Definition at line 133 of file Tuple.h.

References get(), and tupleImpl_m.

Referenced by applySingle(), assignToSingle(), assignToSingle(), get(), get(), lexicographicalEquals(), and lexicographicalLess().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ lexicographicalEquals()

template<typename... Ts>
template<std::size_t Idx, std::size_t N, typename... OtherTs>
KOKKOS_INLINE_FUNCTION bool ippl::Tuple< Ts >::lexicographicalEquals ( const Tuple< Ts > & other) const
inline

Definition at line 262 of file Tuple.h.

References get(), lexicographicalEquals(), and Tuple().

Referenced by lexicographicalEquals(), and operator==().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ lexicographicalLess()

template<typename... Ts>
template<std::size_t Idx, std::size_t N, typename... OtherTs>
KOKKOS_INLINE_FUNCTION bool ippl::Tuple< Ts >::lexicographicalLess ( const Tuple< Ts > & other) const
inline

Definition at line 252 of file Tuple.h.

References get(), lexicographicalLess(), and Tuple().

Referenced by lexicographicalLess(), and operator<().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator*()

template<typename... Ts>
KOKKOS_INLINE_FUNCTION Tuple ippl::Tuple< Ts >::operator* ( const Tuple< Ts > & other) const
inline

Definition at line 241 of file Tuple.h.

References Tuple(), and Tuple().

Here is the call graph for this function:

◆ operator*=()

template<typename... Ts>
KOKKOS_INLINE_FUNCTION Tuple & ippl::Tuple< Ts >::operator*= ( const Tuple< Ts > & other)
inline

Definition at line 215 of file Tuple.h.

References applySequence(), and Tuple().

Here is the call graph for this function:

◆ operator+()

template<typename... Ts>
KOKKOS_INLINE_FUNCTION Tuple ippl::Tuple< Ts >::operator+ ( const Tuple< Ts > & other) const
inline

Definition at line 231 of file Tuple.h.

References Tuple(), and Tuple().

Here is the call graph for this function:

◆ operator+=()

template<typename... Ts>
KOKKOS_INLINE_FUNCTION Tuple & ippl::Tuple< Ts >::operator+= ( const Tuple< Ts > & other)
inline

Definition at line 199 of file Tuple.h.

References applySequence(), and Tuple().

Here is the call graph for this function:

◆ operator-()

template<typename... Ts>
KOKKOS_INLINE_FUNCTION Tuple ippl::Tuple< Ts >::operator- ( const Tuple< Ts > & other) const
inline

Definition at line 236 of file Tuple.h.

References Tuple(), and Tuple().

Here is the call graph for this function:

◆ operator-=()

template<typename... Ts>
KOKKOS_INLINE_FUNCTION Tuple & ippl::Tuple< Ts >::operator-= ( const Tuple< Ts > & other)
inline

Definition at line 207 of file Tuple.h.

References applySequence(), and Tuple().

Here is the call graph for this function:

◆ operator/()

template<typename... Ts>
KOKKOS_INLINE_FUNCTION Tuple ippl::Tuple< Ts >::operator/ ( const Tuple< Ts > & other) const
inline

Definition at line 246 of file Tuple.h.

References Tuple(), and Tuple().

Here is the call graph for this function:

◆ operator/=()

template<typename... Ts>
KOKKOS_INLINE_FUNCTION Tuple & ippl::Tuple< Ts >::operator/= ( const Tuple< Ts > & other)
inline

Definition at line 223 of file Tuple.h.

References applySequence(), and Tuple().

Here is the call graph for this function:

◆ operator<()

template<typename... Ts>
template<typename... OtherTs>
requires ((sizeof...(Ts) == sizeof...(OtherTs)) && (std::totally_ordered<Ts> && ...))
KOKKOS_INLINE_FUNCTION bool ippl::Tuple< Ts >::operator< ( const Tuple< OtherTs... > & other) const
inline

Definition at line 271 of file Tuple.h.

References lexicographicalLess(), and Tuple().

Here is the call graph for this function:

◆ operator=() [1/4]

template<typename... Ts>
template<typename... OtherTs>
requires (std::is_copy_assignable_v<Ts> && ...)
KOKKOS_INLINE_FUNCTION Tuple & ippl::Tuple< Ts >::operator= ( const Tuple< OtherTs... > & other)
inline

Definition at line 185 of file Tuple.h.

References assignToSequence(), and Tuple().

Here is the call graph for this function:

◆ operator=() [2/4]

template<typename... Ts>
Tuple & ippl::Tuple< Ts >::operator= ( const Tuple< Ts... > & other)
default

References Tuple().

Here is the call graph for this function:

◆ operator=() [3/4]

template<typename... Ts>
template<typename... OtherTs>
requires (std::is_move_assignable_v<Ts> && ...)
KOKKOS_INLINE_FUNCTION Tuple & ippl::Tuple< Ts >::operator= ( Tuple< OtherTs... > && other)
inline

Definition at line 193 of file Tuple.h.

References assignToSequence(), and Tuple().

Here is the call graph for this function:

◆ operator=() [4/4]

template<typename... Ts>
Tuple & ippl::Tuple< Ts >::operator= ( Tuple< Ts... > && other)
default

References Tuple().

Here is the call graph for this function:

◆ operator==()

template<typename... Ts>
template<typename... OtherTs>
requires ((sizeof...(Ts) == sizeof...(OtherTs)) && (std::totally_ordered<Ts> && ...))
KOKKOS_INLINE_FUNCTION bool ippl::Tuple< Ts >::operator== ( const Tuple< OtherTs... > & other) const
inline

Definition at line 277 of file Tuple.h.

References lexicographicalEquals(), and Tuple().

Here is the call graph for this function:

Member Data Documentation

◆ dim

template<typename... Ts>
std::size_t ippl::Tuple< Ts >::dim = sizeof...(Ts)
staticconstexpr

Definition at line 129 of file Tuple.h.

◆ size

template<typename... Ts>
std::size_t ippl::Tuple< Ts >::size = sizeof...(Ts)
staticconstexpr

Definition at line 130 of file Tuple.h.

◆ tupleImpl_m

template<typename... Ts>
TupleImpl<0, sizeof...(Ts), Ts...> ippl::Tuple< Ts >::tupleImpl_m
private

Definition at line 126 of file Tuple.h.

Referenced by get(), get(), and Tuple().


The documentation for this class was generated from the following file: