DDC 0.0.0

a discrete domain computation library

ddc::DiscreteElement< Tags > Class Template Reference

A DiscreteElement identifies an element of the discrete dimension. More...

Public Types

using value_type = DiscreteElementType
 

Public Member Functions

KOKKOS_DEFAULTED_FUNCTION constexpr DiscreteElement ()=default
 
KOKKOS_DEFAULTED_FUNCTION constexpr DiscreteElement (DiscreteElement const &)=default
 
KOKKOS_DEFAULTED_FUNCTION constexpr DiscreteElement (DiscreteElement &&)=default
 
template<class... DElems, class = std::enable_if_t<(is_discrete_element_v<DElems> && ...)>>
KOKKOS_FUNCTION constexpr DiscreteElement (DElems const &... delems) noexcept
 
template<class... Params, class = std::enable_if_t<(!is_discrete_element_v<Params> && ...)>, class = std::enable_if_t<(std::is_integral_v<Params> && ...)>, class = std::enable_if_t<sizeof...(Params) == sizeof...(Tags)>>
KOKKOS_FUNCTION constexpr DiscreteElement (Params const &... params) noexcept
 
KOKKOS_DEFAULTED_FUNCTION ~DiscreteElement ()=default
 
KOKKOS_DEFAULTED_FUNCTION DiscreteElementoperator= (DiscreteElement const &other)=default
 
KOKKOS_DEFAULTED_FUNCTION DiscreteElementoperator= (DiscreteElement &&other)=default
 
template<class QueryTag >
KOKKOS_FUNCTION constexpr value_type constuid_or (value_type const &default_value) const &
 
template<class QueryTag >
KOKKOS_FUNCTION constexpr value_typeuid () noexcept
 
template<class QueryTag >
KOKKOS_FUNCTION constexpr value_type constuid () const noexcept
 
template<std::size_t N = sizeof...(Tags)>
KOKKOS_FUNCTION constexpr std::enable_if_t< N==1, value_type & > uid () noexcept
 
template<std::size_t N = sizeof...(Tags)>
KOKKOS_FUNCTION constexpr std::enable_if_t< N==1, value_type const & > uid () const noexcept
 
template<std::size_t N = sizeof...(Tags), class = std::enable_if_t<N == 1>>
KOKKOS_FUNCTION constexpr DiscreteElementoperator++ ()
 
template<std::size_t N = sizeof...(Tags), class = std::enable_if_t<N == 1>>
KOKKOS_FUNCTION constexpr DiscreteElement operator++ (int)
 
template<std::size_t N = sizeof...(Tags), class = std::enable_if_t<N == 1>>
KOKKOS_FUNCTION constexpr DiscreteElementoperator-- ()
 
template<std::size_t N = sizeof...(Tags), class = std::enable_if_t<N == 1>>
KOKKOS_FUNCTION constexpr DiscreteElement operator-- (int)
 
template<class... OTags>
KOKKOS_FUNCTION constexpr DiscreteElementoperator+= (DiscreteVector< OTags... > const &rhs)
 
template<class IntegralType , std::size_t N = sizeof...(Tags), class = std::enable_if_t<N == 1>, class = std::enable_if_t<std::is_integral_v<IntegralType>>>
KOKKOS_FUNCTION constexpr DiscreteElementoperator+= (IntegralType const &rhs)
 
template<class... OTags>
KOKKOS_FUNCTION constexpr DiscreteElementoperator-= (DiscreteVector< OTags... > const &rhs)
 
template<class IntegralType , std::size_t N = sizeof...(Tags), class = std::enable_if_t<N == 1>, class = std::enable_if_t<std::is_integral_v<IntegralType>>>
KOKKOS_FUNCTION constexpr DiscreteElementoperator-= (IntegralType const &rhs)
 

Static Public Member Functions

static KOKKOS_FUNCTION constexpr std::size_t size () noexcept
 

Detailed Description

template<class... Tags>
class ddc::DiscreteElement< Tags >

A DiscreteElement identifies an element of the discrete dimension.

Each one is tagged by its associated dimensions.

Member Typedef Documentation

◆ value_type

template<class... Tags>
using ddc::DiscreteElement< Tags >::value_type = DiscreteElementType

Constructor & Destructor Documentation

◆ DiscreteElement() [1/5]

template<class... Tags>
KOKKOS_DEFAULTED_FUNCTION constexpr ddc::DiscreteElement< Tags >::DiscreteElement ( )
constexprdefault

◆ DiscreteElement() [2/5]

template<class... Tags>
KOKKOS_DEFAULTED_FUNCTION constexpr ddc::DiscreteElement< Tags >::DiscreteElement ( DiscreteElement< Tags > const )
constexprdefault

◆ DiscreteElement() [3/5]

template<class... Tags>
KOKKOS_DEFAULTED_FUNCTION constexpr ddc::DiscreteElement< Tags >::DiscreteElement ( DiscreteElement< Tags > &&  )
constexprdefault

◆ DiscreteElement() [4/5]

template<class... Tags>
template<class... DElems, class = std::enable_if_t<(is_discrete_element_v<DElems> && ...)>>
KOKKOS_FUNCTION constexpr ddc::DiscreteElement< Tags >::DiscreteElement ( DElems const &...  delems)
inlineexplicitconstexprnoexcept

◆ DiscreteElement() [5/5]

template<class... Tags>
template<class... Params, class = std::enable_if_t<(!is_discrete_element_v<Params> && ...)>, class = std::enable_if_t<(std::is_integral_v<Params> && ...)>, class = std::enable_if_t<sizeof...(Params) == sizeof...(Tags)>>
KOKKOS_FUNCTION constexpr ddc::DiscreteElement< Tags >::DiscreteElement ( Params const &...  params)
inlineexplicitconstexprnoexcept

◆ ~DiscreteElement()

template<class... Tags>
KOKKOS_DEFAULTED_FUNCTION ddc::DiscreteElement< Tags >::~DiscreteElement ( )
default

Member Function Documentation

◆ size()

template<class... Tags>
static KOKKOS_FUNCTION constexpr std::size_t ddc::DiscreteElement< Tags >::size ( )
inlinestaticconstexprnoexcept

◆ operator=() [1/2]

◆ operator=() [2/2]

template<class... Tags>
KOKKOS_DEFAULTED_FUNCTION DiscreteElement & ddc::DiscreteElement< Tags >::operator= ( DiscreteElement< Tags > &&  other)
default

◆ uid_or()

template<class... Tags>
template<class QueryTag >
KOKKOS_FUNCTION constexpr value_type const & ddc::DiscreteElement< Tags >::uid_or ( value_type const default_value) const &
inlineconstexpr

◆ uid() [1/4]

template<class... Tags>
template<class QueryTag >
KOKKOS_FUNCTION constexpr value_type & ddc::DiscreteElement< Tags >::uid ( )
inlineconstexprnoexcept

◆ uid() [2/4]

template<class... Tags>
template<class QueryTag >
KOKKOS_FUNCTION constexpr value_type const & ddc::DiscreteElement< Tags >::uid ( ) const
inlineconstexprnoexcept

◆ uid() [3/4]

template<class... Tags>
template<std::size_t N = sizeof...(Tags)>
KOKKOS_FUNCTION constexpr std::enable_if_t< N==1, value_type & > ddc::DiscreteElement< Tags >::uid ( )
inlineconstexprnoexcept

◆ uid() [4/4]

template<class... Tags>
template<std::size_t N = sizeof...(Tags)>
KOKKOS_FUNCTION constexpr std::enable_if_t< N==1, value_type const & > ddc::DiscreteElement< Tags >::uid ( ) const
inlineconstexprnoexcept

◆ operator++() [1/2]

template<class... Tags>
template<std::size_t N = sizeof...(Tags), class = std::enable_if_t<N == 1>>
KOKKOS_FUNCTION constexpr DiscreteElement & ddc::DiscreteElement< Tags >::operator++ ( )
inlineconstexpr

◆ operator++() [2/2]

template<class... Tags>
template<std::size_t N = sizeof...(Tags), class = std::enable_if_t<N == 1>>
KOKKOS_FUNCTION constexpr DiscreteElement ddc::DiscreteElement< Tags >::operator++ ( int  )
inlineconstexpr

◆ operator--() [1/2]

template<class... Tags>
template<std::size_t N = sizeof...(Tags), class = std::enable_if_t<N == 1>>
KOKKOS_FUNCTION constexpr DiscreteElement & ddc::DiscreteElement< Tags >::operator-- ( )
inlineconstexpr

◆ operator--() [2/2]

template<class... Tags>
template<std::size_t N = sizeof...(Tags), class = std::enable_if_t<N == 1>>
KOKKOS_FUNCTION constexpr DiscreteElement ddc::DiscreteElement< Tags >::operator-- ( int  )
inlineconstexpr

◆ operator+=() [1/2]

template<class... Tags>
template<class... OTags>
KOKKOS_FUNCTION constexpr DiscreteElement & ddc::DiscreteElement< Tags >::operator+= ( DiscreteVector< OTags... > const rhs)
inlineconstexpr

◆ operator+=() [2/2]

template<class... Tags>
template<class IntegralType , std::size_t N = sizeof...(Tags), class = std::enable_if_t<N == 1>, class = std::enable_if_t<std::is_integral_v<IntegralType>>>
KOKKOS_FUNCTION constexpr DiscreteElement & ddc::DiscreteElement< Tags >::operator+= ( IntegralType const rhs)
inlineconstexpr

◆ operator-=() [1/2]

template<class... Tags>
template<class... OTags>
KOKKOS_FUNCTION constexpr DiscreteElement & ddc::DiscreteElement< Tags >::operator-= ( DiscreteVector< OTags... > const rhs)
inlineconstexpr

◆ operator-=() [2/2]

template<class... Tags>
template<class IntegralType , std::size_t N = sizeof...(Tags), class = std::enable_if_t<N == 1>, class = std::enable_if_t<std::is_integral_v<IntegralType>>>
KOKKOS_FUNCTION constexpr DiscreteElement & ddc::DiscreteElement< Tags >::operator-= ( IntegralType const rhs)
inlineconstexpr

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