DDC 0.1.0
Loading...
Searching...
No Matches
ddc::DiscreteDomain< DDims > Class Template Reference

#include <discrete_domain.hpp>

Collaboration diagram for ddc::DiscreteDomain< DDims >:
Collaboration graph

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.
 
KOKKOS_FUNCTION constexpr DiscreteDomain (discrete_element_type const &element_begin, mlength_type const &size)
 Construct a DiscreteDomain starting from element_begin with size points.
 
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
 
template<class... ODims>
KOKKOS_FUNCTION constexpr bool operator!= (DiscreteDomain< ODims... > 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< QueryDDimextent () 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(autooperator[] (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(autooperator[] (std::size_t n) const
 

Static Public Member Functions

static KOKKOS_FUNCTION constexpr std::size_t rank ()
 

Friends

template<class... >
class DiscreteDomain
 

Detailed Description

template<class... DDims>
class ddc::DiscreteDomain< DDims >

Definition at line 52 of file discrete_domain.hpp.

Member Typedef Documentation

◆ discrete_element_type

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

Definition at line 58 of file discrete_domain.hpp.

◆ mlength_type

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

Definition at line 60 of file discrete_domain.hpp.

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.

Definition at line 77 of file discrete_domain.hpp.

◆ 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

Definition at line 87 of file discrete_domain.hpp.

◆ 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

Definition at line 68 of file discrete_domain.hpp.

◆ operator=() [1/2]

◆ operator=() [2/2]

◆ operator==()

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

Definition at line 106 of file discrete_domain.hpp.

◆ operator!=()

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

Definition at line 117 of file discrete_domain.hpp.

◆ size()

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

Definition at line 123 of file discrete_domain.hpp.

◆ extents()

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

Definition at line 128 of file discrete_domain.hpp.

◆ extent()

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

Definition at line 134 of file discrete_domain.hpp.

◆ front()

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

Definition at line 140 of file discrete_domain.hpp.

◆ back()

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

Definition at line 145 of file discrete_domain.hpp.

◆ take_first()

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

Definition at line 150 of file discrete_domain.hpp.

◆ take_last()

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

Definition at line 155 of file discrete_domain.hpp.

◆ remove_first()

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

Definition at line 160 of file discrete_domain.hpp.

◆ remove_last()

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

Definition at line 165 of file discrete_domain.hpp.

◆ remove()

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

Definition at line 170 of file discrete_domain.hpp.

◆ restrict()

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

Definition at line 176 of file discrete_domain.hpp.

◆ empty()

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

Definition at line 188 of file discrete_domain.hpp.

◆ operator bool()

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

Definition at line 193 of file discrete_domain.hpp.

◆ 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

Definition at line 201 of file discrete_domain.hpp.

◆ 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

Definition at line 209 of file discrete_domain.hpp.

◆ 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

Definition at line 217 of file discrete_domain.hpp.

◆ 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

Definition at line 225 of file discrete_domain.hpp.

◆ 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

Definition at line 233 of file discrete_domain.hpp.

◆ 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

Definition at line 241 of file discrete_domain.hpp.

Friends And Related Symbol Documentation

◆ DiscreteDomain

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

Definition at line 55 of file discrete_domain.hpp.


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