|
dune-common 2.12-git
|
A left layout mapping with optional padding of the stride of dimension 1. More...
#include <dune/common/std/layout_left_padded.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_left_padded< PaddingValue > |
Public Member Functions | |
| constexpr | mapping () noexcept=default |
| constexpr | mapping (const mapping &) noexcept=default |
| constexpr | mapping (const extents_type &e) noexcept |
| template<class OtherIndexType , std::enable_if_t< std::is_convertible_v< OtherIndexType, index_type >, int > = 0, std::enable_if_t< std::is_nothrow_constructible_v< index_type, OtherIndexType >, int > = 0> | |
| constexpr | mapping (const extents_type &e, OtherIndexType padding) noexcept |
| template<class OtherExtents , std::enable_if_t< std::is_constructible_v< extents_type, OtherExtents >, int > = 0> | |
| constexpr | mapping (const layout_left::mapping< OtherExtents > &m) noexcept |
| 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_right::mapping< OtherExtents > &m) noexcept |
| template<class OtherExtents , std::enable_if_t< std::is_constructible_v< extents_type, OtherExtents >, int > = 0> | |
| constexpr | mapping (const layout_stride::mapping< OtherExtents > &m) noexcept |
| template<class OtherMapping , std::enable_if_t< Impl::is_layout_left_padded_v< typename OtherMapping::layout_type >, int > = 0, std::enable_if_t< std::is_constructible_v< extents_type, typename OtherMapping::extents_type >, int > = 0> | |
| constexpr | mapping (const OtherMapping &m) noexcept |
| constexpr mapping & | operator= (const mapping &) noexcept=default |
| 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::rank()), int > = 0, std::enable_if_t<(... &&std::is_convertible_v< Indices, index_type >), int > = 0> | |
| constexpr index_type | operator() (Indices... indices) const noexcept |
| constexpr index_type | operator() () const noexcept |
| constexpr bool | is_unique () const noexcept |
| constexpr bool | is_strided () const noexcept |
| constexpr bool | is_exhaustive () const noexcept |
| template<class E = extents_type, std::enable_if_t<(E::rank() > 0), int > = 0> | |
| constexpr index_type | stride (rank_type r) const noexcept |
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 Public Attributes | |
| static constexpr std::size_t | padding_value = PaddingValue |
Friends | |
| template<class OtherMapping , std::enable_if_t<(OtherMapping::extents_type::rank()==Extents::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_left_padded< PaddingValue >::mapping< Extents >
A left layout mapping with optional padding of the stride of dimension 1.
This layout follows the layout_left_padded mapping from P2642R0 and the C++ standard working draft [mdspan.layout.leftpad]. It is useful when the leftmost dimension should remain contiguous but the leading stride of the remaining dimensions should be supplied explicitly, for example to satisfy alignment, cache-line, SIMD, or accelerator memory-coalescing requirements.
For rank two, stride(0) == 1 and stride(1) is either extent(0) or a padded value. The padding can leave unused memory between columns while still providing a regular strided mdspan mapping.
Member Typedef Documentation
◆ extents_type
| using Dune::Std::layout_left_padded< PaddingValue >::mapping< Extents >::extents_type = Extents |
◆ index_type
| using Dune::Std::layout_left_padded< PaddingValue >::mapping< Extents >::index_type = typename extents_type::index_type |
◆ layout_type
| using Dune::Std::layout_left_padded< PaddingValue >::mapping< Extents >::layout_type = layout_left_padded<PaddingValue> |
◆ rank_type
| using Dune::Std::layout_left_padded< PaddingValue >::mapping< Extents >::rank_type = typename extents_type::rank_type |
◆ size_type
| using Dune::Std::layout_left_padded< PaddingValue >::mapping< Extents >::size_type = typename extents_type::size_type |
Constructor & Destructor Documentation
◆ mapping() [1/8]
|
constexprdefaultnoexcept |
◆ mapping() [2/8]
|
constexprdefaultnoexcept |
◆ mapping() [3/8]
|
inlineconstexprnoexcept |
◆ mapping() [4/8]
|
inlineconstexprnoexcept |
◆ mapping() [5/8]
|
inlineconstexprnoexcept |
◆ mapping() [6/8]
|
inlineconstexprnoexcept |
◆ mapping() [7/8]
|
inlineconstexprnoexcept |
◆ mapping() [8/8]
|
inlineconstexprnoexcept |
Member Function Documentation
◆ extents()
|
inlineconstexprnoexcept |
◆ is_always_exhaustive()
|
inlinestaticconstexprnoexcept |
◆ is_always_strided()
|
inlinestaticconstexprnoexcept |
◆ is_always_unique()
|
inlinestaticconstexprnoexcept |
◆ is_exhaustive()
|
inlineconstexprnoexcept |
◆ is_strided()
|
inlineconstexprnoexcept |
◆ is_unique()
|
inlineconstexprnoexcept |
◆ operator()() [1/2]
|
inlineconstexprnoexcept |
◆ operator()() [2/2]
|
inlineconstexprnoexcept |
◆ operator=()
|
constexprdefaultnoexcept |
◆ required_span_size()
|
inlineconstexprnoexcept |
◆ stride()
|
inlineconstexprnoexcept |
Friends And Related Symbol Documentation
◆ operator==
|
friend |
Member Data Documentation
◆ padding_value
|
staticconstexpr |
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