DDC 0.0.0

a discrete domain computation library

ddc::DiscreteDomain< DDims > Class Template Reference

Public Types

using discrete_element_type = DiscreteElement< DDims... >
 
using mlength_type = DiscreteVector< DDims... >
 

Public Member Functions

KOKKOS_DEFAULTED_FUNCTION DiscreteDomain ()=default
 
template<class... DDoms, class = std::enable_if_t<(is_discrete_domain_v<DDoms> && ...)>>
KOKKOS_FUNCTION constexpr DiscreteDomain (DDoms const &... domains)
 Construct a DiscreteDomain by copies and merge of domains. More...
 
KOKKOS_FUNCTION constexpr DiscreteDomain (discrete_element_type const &element_begin, mlength_type const &size)
 Construct a DiscreteDomain starting from element_begin with size points. More...
 
KOKKOS_DEFAULTED_FUNCTION DiscreteDomain (DiscreteDomain const &x)=default
 
KOKKOS_DEFAULTED_FUNCTION DiscreteDomain (DiscreteDomain &&x)=default
 
KOKKOS_DEFAULTED_FUNCTION ~DiscreteDomain ()=default
 
KOKKOS_DEFAULTED_FUNCTION DiscreteDomainoperator= (DiscreteDomain const &x)=default
 
KOKKOS_DEFAULTED_FUNCTION DiscreteDomainoperator= (DiscreteDomain &&x)=default
 
template<class... ODims>
KOKKOS_FUNCTION constexpr bool operator== (DiscreteDomain< ODims... > const &other) const
 
KOKKOS_FUNCTION constexpr bool operator!= (DiscreteDomain const &other) const
 
KOKKOS_FUNCTION constexpr std::size_t size () const
 
KOKKOS_FUNCTION constexpr mlength_type extents () const noexcept
 
template<class QueryDDim >
KOKKOS_FUNCTION constexpr DiscreteVector< QueryDDim > extent () const noexcept
 
KOKKOS_FUNCTION constexpr discrete_element_type front () const noexcept
 
KOKKOS_FUNCTION constexpr discrete_element_type back () const noexcept
 
KOKKOS_FUNCTION constexpr DiscreteDomain take_first (mlength_type n) const
 
KOKKOS_FUNCTION constexpr DiscreteDomain take_last (mlength_type n) const
 
KOKKOS_FUNCTION constexpr DiscreteDomain remove_first (mlength_type n) const
 
KOKKOS_FUNCTION constexpr DiscreteDomain remove_last (mlength_type n) const
 
KOKKOS_FUNCTION constexpr DiscreteDomain remove (mlength_type n1, mlength_type n2) const
 
template<class... ODDims>
KOKKOS_FUNCTION constexpr auto restrict (DiscreteDomain< ODDims... > const &odomain) const
 
KOKKOS_FUNCTION constexpr bool empty () const noexcept
 
KOKKOS_FUNCTION constexpr operator bool ()
 
template<std::size_t N = sizeof...(DDims), class DDim0 = std::enable_if_t<N == 1, std::tuple_element_t<0, std::tuple<DDims...>>>>
KOKKOS_FUNCTION auto begin () const
 
template<std::size_t N = sizeof...(DDims), class DDim0 = std::enable_if_t<N == 1, std::tuple_element_t<0, std::tuple<DDims...>>>>
KOKKOS_FUNCTION auto end () const
 
template<std::size_t N = sizeof...(DDims), class DDim0 = std::enable_if_t<N == 1, std::tuple_element_t<0, std::tuple<DDims...>>>>
KOKKOS_FUNCTION auto cbegin () const
 
template<std::size_t N = sizeof...(DDims), class DDim0 = std::enable_if_t<N == 1, std::tuple_element_t<0, std::tuple<DDims...>>>>
KOKKOS_FUNCTION auto cend () const
 
template<std::size_t N = sizeof...(DDims), class = std::enable_if_t<N == 1, std::tuple_element_t<0, std::tuple<DDims...>>>>
KOKKOS_FUNCTION constexpr decltype(auto) operator[] (std::size_t n)
 
template<std::size_t N = sizeof...(DDims), class = std::enable_if_t<N == 1, std::tuple_element_t<0, std::tuple<DDims...>>>>
KOKKOS_FUNCTION constexpr decltype(auto) operator[] (std::size_t n) const
 

Static Public Member Functions

static KOKKOS_FUNCTION constexpr std::size_t rank ()
 

Friends

template<class... >
class DiscreteDomain
 

Member Typedef Documentation

◆ discrete_element_type

template<class... DDims>
using ddc::DiscreteDomain< DDims >::discrete_element_type = DiscreteElement<DDims...>

◆ mlength_type

template<class... DDims>
using ddc::DiscreteDomain< DDims >::mlength_type = DiscreteVector<DDims...>

Constructor & Destructor Documentation

◆ DiscreteDomain() [1/5]

template<class... DDims>
KOKKOS_DEFAULTED_FUNCTION ddc::DiscreteDomain< DDims >::DiscreteDomain ( )
default

◆ DiscreteDomain() [2/5]

template<class... DDims>
template<class... DDoms, class = std::enable_if_t<(is_discrete_domain_v<DDoms> && ...)>>
KOKKOS_FUNCTION constexpr ddc::DiscreteDomain< DDims >::DiscreteDomain ( DDoms const &...  domains)
inlineexplicitconstexpr

Construct a DiscreteDomain by copies and merge of domains.

◆ DiscreteDomain() [3/5]

template<class... DDims>
KOKKOS_FUNCTION constexpr ddc::DiscreteDomain< DDims >::DiscreteDomain ( discrete_element_type const &  element_begin,
mlength_type const &  size 
)
inlineconstexpr

Construct a DiscreteDomain starting from element_begin with size points.

Parameters
element_beginthe lower bound in each direction
sizethe number of points in each direction

◆ DiscreteDomain() [4/5]

template<class... DDims>
KOKKOS_DEFAULTED_FUNCTION ddc::DiscreteDomain< DDims >::DiscreteDomain ( DiscreteDomain< DDims > const &  x)
default

◆ DiscreteDomain() [5/5]

template<class... DDims>
KOKKOS_DEFAULTED_FUNCTION ddc::DiscreteDomain< DDims >::DiscreteDomain ( DiscreteDomain< DDims > &&  x)
default

◆ ~DiscreteDomain()

template<class... DDims>
KOKKOS_DEFAULTED_FUNCTION ddc::DiscreteDomain< DDims >::~DiscreteDomain ( )
default

Member Function Documentation

◆ rank()

template<class... DDims>
static KOKKOS_FUNCTION constexpr std::size_t ddc::DiscreteDomain< DDims >::rank ( )
inlinestaticconstexpr

◆ operator=() [1/2]

template<class... DDims>
KOKKOS_DEFAULTED_FUNCTION DiscreteDomain & ddc::DiscreteDomain< DDims >::operator= ( DiscreteDomain< DDims > const &  x)
default

◆ operator=() [2/2]

template<class... DDims>
KOKKOS_DEFAULTED_FUNCTION DiscreteDomain & ddc::DiscreteDomain< DDims >::operator= ( DiscreteDomain< DDims > &&  x)
default

◆ operator==()

template<class... DDims>
template<class... ODims>
KOKKOS_FUNCTION constexpr bool ddc::DiscreteDomain< DDims >::operator== ( DiscreteDomain< ODims... > const &  other) const
inlineconstexpr

◆ operator!=()

template<class... DDims>
KOKKOS_FUNCTION constexpr bool ddc::DiscreteDomain< DDims >::operator!= ( DiscreteDomain< DDims > const &  other) const
inlineconstexpr

◆ size()

template<class... DDims>
KOKKOS_FUNCTION constexpr std::size_t ddc::DiscreteDomain< DDims >::size ( ) const
inlineconstexpr

◆ extents()

template<class... DDims>
KOKKOS_FUNCTION constexpr mlength_type ddc::DiscreteDomain< DDims >::extents ( ) const
inlineconstexprnoexcept

◆ extent()

template<class... DDims>
template<class QueryDDim >
KOKKOS_FUNCTION constexpr DiscreteVector< QueryDDim > ddc::DiscreteDomain< DDims >::extent ( ) const
inlineconstexprnoexcept

◆ front()

template<class... DDims>
KOKKOS_FUNCTION constexpr discrete_element_type ddc::DiscreteDomain< DDims >::front ( ) const
inlineconstexprnoexcept

◆ back()

template<class... DDims>
KOKKOS_FUNCTION constexpr discrete_element_type ddc::DiscreteDomain< DDims >::back ( ) const
inlineconstexprnoexcept

◆ take_first()

template<class... DDims>
KOKKOS_FUNCTION constexpr DiscreteDomain ddc::DiscreteDomain< DDims >::take_first ( mlength_type  n) const
inlineconstexpr

◆ take_last()

template<class... DDims>
KOKKOS_FUNCTION constexpr DiscreteDomain ddc::DiscreteDomain< DDims >::take_last ( mlength_type  n) const
inlineconstexpr

◆ remove_first()

template<class... DDims>
KOKKOS_FUNCTION constexpr DiscreteDomain ddc::DiscreteDomain< DDims >::remove_first ( mlength_type  n) const
inlineconstexpr

◆ remove_last()

template<class... DDims>
KOKKOS_FUNCTION constexpr DiscreteDomain ddc::DiscreteDomain< DDims >::remove_last ( mlength_type  n) const
inlineconstexpr

◆ remove()

template<class... DDims>
KOKKOS_FUNCTION constexpr DiscreteDomain ddc::DiscreteDomain< DDims >::remove ( mlength_type  n1,
mlength_type  n2 
) const
inlineconstexpr

◆ restrict()

template<class... DDims>
template<class... ODDims>
KOKKOS_FUNCTION constexpr auto ddc::DiscreteDomain< DDims >::restrict ( DiscreteDomain< ODDims... > const &  odomain) const
inlineconstexpr

◆ empty()

template<class... DDims>
KOKKOS_FUNCTION constexpr bool ddc::DiscreteDomain< DDims >::empty ( ) const
inlineconstexprnoexcept

◆ operator bool()

template<class... DDims>
KOKKOS_FUNCTION constexpr ddc::DiscreteDomain< DDims >::operator bool ( )
inlineexplicitconstexpr

◆ begin()

template<class... DDims>
template<std::size_t N = sizeof...(DDims), class DDim0 = std::enable_if_t<N == 1, std::tuple_element_t<0, std::tuple<DDims...>>>>
KOKKOS_FUNCTION auto ddc::DiscreteDomain< DDims >::begin ( ) const
inline

◆ end()

template<class... DDims>
template<std::size_t N = sizeof...(DDims), class DDim0 = std::enable_if_t<N == 1, std::tuple_element_t<0, std::tuple<DDims...>>>>
KOKKOS_FUNCTION auto ddc::DiscreteDomain< DDims >::end ( ) const
inline

◆ cbegin()

template<class... DDims>
template<std::size_t N = sizeof...(DDims), class DDim0 = std::enable_if_t<N == 1, std::tuple_element_t<0, std::tuple<DDims...>>>>
KOKKOS_FUNCTION auto ddc::DiscreteDomain< DDims >::cbegin ( ) const
inline

◆ cend()

template<class... DDims>
template<std::size_t N = sizeof...(DDims), class DDim0 = std::enable_if_t<N == 1, std::tuple_element_t<0, std::tuple<DDims...>>>>
KOKKOS_FUNCTION auto ddc::DiscreteDomain< DDims >::cend ( ) const
inline

◆ operator[]() [1/2]

template<class... DDims>
template<std::size_t N = sizeof...(DDims), class = std::enable_if_t<N == 1, std::tuple_element_t<0, std::tuple<DDims...>>>>
KOKKOS_FUNCTION constexpr decltype(auto) ddc::DiscreteDomain< DDims >::operator[] ( std::size_t  n)
inlineconstexpr

◆ operator[]() [2/2]

template<class... DDims>
template<std::size_t N = sizeof...(DDims), class = std::enable_if_t<N == 1, std::tuple_element_t<0, std::tuple<DDims...>>>>
KOKKOS_FUNCTION constexpr decltype(auto) ddc::DiscreteDomain< DDims >::operator[] ( std::size_t  n) const
inlineconstexpr

Friends And Related Function Documentation

◆ DiscreteDomain

template<class... DDims>
template<class... >
friend class DiscreteDomain
friend

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