|
dune-common 2.12-git
|
Loading...
Searching...
No Matches
Public Types |
Public Member Functions |
Static Public Member Functions |
Friends |
List of all members
Dune::Std::layout_stride::mapping< Extents > Class Template Reference
A layout mapping where the strides are user-defined. More...
#include <dune/common/std/layout_stride.hh>
Public Types | |
| using | extents_type = Extents |
| using | index_type = typename extents_type::index_type |
| using | size_type = typename extents_type::size_type |
| using | rank_type = typename extents_type::rank_type |
| using | layout_type = layout_stride |
Public Member Functions | |
| constexpr | mapping () noexcept |
| The default construction initializes the strides from layout_right. | |
| constexpr | mapping (const mapping &) noexcept=default |
| Copy constructor for the mapping. | |
| template<class OtherIndexType , std::enable_if_t< std::is_convertible_v< const OtherIndexType &, index_type >, int > = 0, std::enable_if_t< std::is_nothrow_constructible_v< index_type, const OtherIndexType & >, int > = 0> | |
| constexpr | mapping (const extents_type &e, const std::array< OtherIndexType, rank_ > &s) noexcept |
| Construct the mapping from given extents and strides. | |
| template<class OtherIndexType , std::enable_if_t< std::is_convertible_v< const OtherIndexType &, index_type >, int > = 0, std::enable_if_t< std::is_nothrow_constructible_v< index_type, const OtherIndexType & >, int > = 0> | |
| constexpr | mapping (const extents_type &e, const std::span< OtherIndexType, rank_ > &s) noexcept |
| Construct the mapping from given extents and strides. | |
| template<class M , std::enable_if_t<(M::extents_type::rank()==extents_type::rank()), int > = 0, std::enable_if_t<(M::is_always_unique()), int > = 0, std::enable_if_t<(M::is_always_strided()), int > = 0, decltype(std::declval< M >().extents(), bool{}) = true, decltype(std::declval< M >().stride(std::declval< rank_type >()), bool{}) = true> | |
| constexpr | mapping (const M &m) noexcept |
| Construct the mapping from another mapping with different extents and different strides. | |
| constexpr mapping & | operator= (const mapping &) noexcept=default |
| Copy-assignment for the mapping. | |
| constexpr const extents_type & | extents () const noexcept |
| constexpr index_type | required_span_size () const noexcept |
Return the sum 1 + (E(0)-1)*S(0) + (E(1)-1)*S(1) + ... | |
| template<class... Indices, std::enable_if_t<(sizeof...(Indices)==rank_), int > = 0, std::enable_if_t<(std::is_convertible_v< Indices, index_type > &&...), int > = 0, std::enable_if_t<(std::is_nothrow_constructible_v< index_type, Indices > &&...), int > = 0> | |
| constexpr index_type | operator() (Indices... ii) const noexcept |
| Compute the offset by folding with index-array with the strides array. | |
| constexpr index_type | operator() () const noexcept |
| The default offset for rank-0 tensors is 0. | |
| constexpr bool | is_exhaustive () const noexcept |
| constexpr const strides_type & | strides () const noexcept |
| Get the array of all strides. | |
| template<class E = extents_type, std::enable_if_t<(E::rank() > 0), int > = 0> | |
| constexpr index_type | stride (rank_type i) const noexcept |
Get the single stride i | |
Static Public Member Functions | |
| static constexpr bool | is_always_unique () noexcept |
| static constexpr bool | is_always_exhaustive () noexcept |
| static constexpr bool | is_always_strided () noexcept |
| static constexpr bool | is_unique () noexcept |
| static constexpr bool | is_strided () noexcept |
Friends | |
| template<class > | |
| class | mapping |
| template<class OtherMapping , std::enable_if_t<(OtherMapping::extents_type::rank()==extents_type::rank()), int > = 0, std::enable_if_t<(OtherMapping::is_always_strided()), int > = 0> | |
| constexpr bool | operator== (const mapping &a, const OtherMapping &b) noexcept |
Detailed Description
template<class Extents>
class Dune::Std::layout_stride::mapping< Extents >
class Dune::Std::layout_stride::mapping< Extents >
A layout mapping where the strides are user-defined.
Member Typedef Documentation
◆ extents_type
template<class Extents >
| using Dune::Std::layout_stride::mapping< Extents >::extents_type = Extents |
◆ index_type
template<class Extents >
| using Dune::Std::layout_stride::mapping< Extents >::index_type = typename extents_type::index_type |
◆ layout_type
template<class Extents >
| using Dune::Std::layout_stride::mapping< Extents >::layout_type = layout_stride |
◆ rank_type
template<class Extents >
| using Dune::Std::layout_stride::mapping< Extents >::rank_type = typename extents_type::rank_type |
◆ size_type
template<class Extents >
| using Dune::Std::layout_stride::mapping< Extents >::size_type = typename extents_type::size_type |
Constructor & Destructor Documentation
◆ mapping() [1/5]
template<class Extents >
|
inlineconstexprnoexcept |
The default construction initializes the strides from layout_right.
◆ mapping() [2/5]
template<class Extents >
|
constexprdefaultnoexcept |
Copy constructor for the mapping.
◆ mapping() [3/5]
template<class Extents >
template<class OtherIndexType , std::enable_if_t< std::is_convertible_v< const OtherIndexType &, index_type >, int > = 0, std::enable_if_t< std::is_nothrow_constructible_v< index_type, const OtherIndexType & >, int > = 0>
|
inlineconstexprnoexcept |
Construct the mapping from given extents and strides.
◆ mapping() [4/5]
template<class Extents >
template<class OtherIndexType , std::enable_if_t< std::is_convertible_v< const OtherIndexType &, index_type >, int > = 0, std::enable_if_t< std::is_nothrow_constructible_v< index_type, const OtherIndexType & >, int > = 0>
|
inlineconstexprnoexcept |
Construct the mapping from given extents and strides.
◆ mapping() [5/5]
template<class Extents >
template<class M , std::enable_if_t<(M::extents_type::rank()==extents_type::rank()), int > = 0, std::enable_if_t<(M::is_always_unique()), int > = 0, std::enable_if_t<(M::is_always_strided()), int > = 0, decltype(std::declval< M >().extents(), bool{}) = true, decltype(std::declval< M >().stride(std::declval< rank_type >()), bool{}) = true>
|
inlineconstexprnoexcept |
Construct the mapping from another mapping with different extents and different strides.
Member Function Documentation
◆ extents()
template<class Extents >
|
inlineconstexprnoexcept |
◆ is_always_exhaustive()
template<class Extents >
|
inlinestaticconstexprnoexcept |
◆ is_always_strided()
template<class Extents >
|
inlinestaticconstexprnoexcept |
◆ is_always_unique()
template<class Extents >
|
inlinestaticconstexprnoexcept |
◆ is_exhaustive()
template<class Extents >
|
inlineconstexprnoexcept |
◆ is_strided()
template<class Extents >
|
inlinestaticconstexprnoexcept |
◆ is_unique()
template<class Extents >
|
inlinestaticconstexprnoexcept |
◆ operator()() [1/2]
template<class Extents >
|
inlineconstexprnoexcept |
The default offset for rank-0 tensors is 0.
◆ operator()() [2/2]
template<class Extents >
template<class... Indices, std::enable_if_t<(sizeof...(Indices)==rank_), int > = 0, std::enable_if_t<(std::is_convertible_v< Indices, index_type > &&...), int > = 0, std::enable_if_t<(std::is_nothrow_constructible_v< index_type, Indices > &&...), int > = 0>
|
inlineconstexprnoexcept |
Compute the offset by folding with index-array with the strides array.
◆ operator=()
template<class Extents >
|
constexprdefaultnoexcept |
Copy-assignment for the mapping.
◆ required_span_size()
template<class Extents >
|
inlineconstexprnoexcept |
Return the sum 1 + (E(0)-1)*S(0) + (E(1)-1)*S(1) + ...
◆ stride()
template<class Extents >
template<class E = extents_type, std::enable_if_t<(E::rank() > 0), int > = 0>
|
inlineconstexprnoexcept |
Get the single stride i
◆ strides()
template<class Extents >
|
inlineconstexprnoexcept |
Get the array of all strides.
Friends And Related Symbol Documentation
◆ mapping
◆ operator==
template<class Extents >
template<class OtherMapping , std::enable_if_t<(OtherMapping::extents_type::rank()==extents_type::rank()), int > = 0, std::enable_if_t<(OtherMapping::is_always_strided()), int > = 0>
|
friend |
The documentation for this class was generated from the following files:
Legal Statements / Impressum | Hosted by TU Dresden & Uni Heidelberg | Generated by
1.9.8