dune-common 2.10
|
A layout mapping where the rightmost extent has stride 1. More...
#include <dune/common/std/layout_right.hh>
Public Types | |
using | extents_type = Extents |
using | size_type = typename extents_type::size_type |
using | rank_type = typename extents_type::rank_type |
using | index_type = typename extents_type::index_type |
using | layout_type = layout_right |
Public Member Functions | |
constexpr | mapping () noexcept=default |
The default construction is possible for default constructible extents. | |
constexpr | mapping (const mapping &) noexcept=default |
Copy constructor for the mapping. | |
constexpr | mapping (const extents_type &e) noexcept |
Construct the mapping with from given extents. | |
template<class OtherExtents , std::enable_if_t< std::is_constructible_v< extents_type, OtherExtents >, int > = 0> | |
constexpr | mapping (const mapping< OtherExtents > &m) noexcept |
Construct the mapping from another mapping with a different extents type. | |
template<class OtherExtents , class E = extents_type, std::enable_if_t<(E::rank()<=1), int > = 0, std::enable_if_t< std::is_constructible_v< extents_type, OtherExtents >, int > = 0> | |
constexpr | mapping (const layout_left::mapping< OtherExtents > &m) noexcept |
Construct the mapping from a layout_left. | |
template<class OtherExtents , std::enable_if_t< std::is_constructible_v< extents_type, OtherExtents >, int > = 0> | |
constexpr | mapping (const layout_stride::mapping< OtherExtents > &m) |
Construct the mapping from a layout_stride. | |
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 |
template<class... Indices, std::enable_if_t<(sizeof...(Indices)==extents_type::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< Indices, index_type > &&...), int > = 0> | |
constexpr index_type | operator() (Indices... ii) const noexcept |
Compute the offset i3 + E(3)*(i2 + E(2)*(i1 + E(1)*i0)) | |
constexpr index_type | operator() () const noexcept |
The default offset for rank-0 tensors is 0. | |
template<class E = extents_type, std::enable_if_t<(E::rank() > 0), int > = 0> | |
constexpr index_type | stride (rank_type i) const noexcept |
The stride is the product of the extents E(n)*E(n-1)*...*E(i+1) | |
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_exhaustive () noexcept |
static constexpr bool | is_strided () noexcept |
A layout mapping where the rightmost extent has stride 1.
using Dune::Std::layout_right::mapping< Extents >::extents_type = Extents |
using Dune::Std::layout_right::mapping< Extents >::index_type = typename extents_type::index_type |
using Dune::Std::layout_right::mapping< Extents >::layout_type = layout_right |
using Dune::Std::layout_right::mapping< Extents >::rank_type = typename extents_type::rank_type |
using Dune::Std::layout_right::mapping< Extents >::size_type = typename extents_type::size_type |
|
constexprdefaultnoexcept |
The default construction is possible for default constructible extents.
|
constexprdefaultnoexcept |
Copy constructor for the mapping.
|
inlineconstexprnoexcept |
Construct the mapping with from given extents.
|
inlineconstexprnoexcept |
Construct the mapping from another mapping with a different extents type.
|
inlineconstexprnoexcept |
Construct the mapping from a layout_left.
|
inlineconstexpr |
Construct the mapping from a layout_stride.
|
inlineconstexprnoexcept |
|
inlinestaticconstexprnoexcept |
|
inlinestaticconstexprnoexcept |
|
inlinestaticconstexprnoexcept |
|
inlinestaticconstexprnoexcept |
|
inlinestaticconstexprnoexcept |
|
inlinestaticconstexprnoexcept |
|
inlineconstexprnoexcept |
The default offset for rank-0 tensors is 0.
|
inlineconstexprnoexcept |
Compute the offset i3 + E(3)*(i2 + E(2)*(i1 + E(1)*i0))
|
constexprdefaultnoexcept |
Copy-assignment for the mapping.
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
The stride is the product of the extents E(n)*E(n-1)*...*E(i+1)