OTB  9.0.0
Orfeo Toolbox
Public Types | Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
otb::details::policy::stride_< Extents > Struct Template Reference

#include <otbLayouts.h>

+ Inheritance diagram for otb::details::policy::stride_< Extents >:
+ Collaboration diagram for otb::details::policy::stride_< Extents >:

Public Types

using index_type = typename root_layout_mapping< Extents >::index_type
 
using stride_t = std::array< index_type, Extents::rank()>
 
- Public Types inherited from otb::details::policy::root_layout_mapping< Extents >
using index_type = typename Extents::index_type
 

Public Member Functions

constexpr bool is_contiguous () const noexcept
 
constexpr index_type stride (const vcl_size_t R) const noexcept
 
constexpr stride_ (Extents const &e, stride_t const &s) noexcept
 
- Public Member Functions inherited from otb::details::policy::root_layout_mapping< Extents >
constexpr Extents const & extents () const noexcept
 
constexpr bool is_strided () const noexcept
 
constexpr bool is_unique () const noexcept
 
constexpr root_layout_mappingoperator= (root_layout_mapping &&) noexcept=default
 
constexpr root_layout_mappingoperator= (root_layout_mapping const &) noexcept=default
 
constexpr root_layout_mapping () noexcept=default
 
constexpr root_layout_mapping (Extents const &e) noexcept
 
constexpr root_layout_mapping (root_layout_mapping &&) noexcept=default
 
constexpr root_layout_mapping (root_layout_mapping const &) noexcept=default
 
 ~root_layout_mapping ()=default
 

Static Public Member Functions

static constexpr bool is_always_contiguous () noexcept
 
- Static Public Member Functions inherited from otb::details::policy::root_layout_mapping< Extents >
static constexpr bool is_always_strided () noexcept
 
static constexpr bool is_always_unique () noexcept
 

Private Attributes

bool m_contigous
 
stride_t m_strides
 

Detailed Description

template<typename Extents>
struct otb::details::policy::stride_< Extents >

Helper policy for defining layout_stride::mapping types from C++ p0009r9 draft proposal.

Template Parameters
Extentsextents type. Provides everything but:
  • required_span_size()
  • operator()
See also
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p0009r9.html
https://github.com/ORNL/cpp-proposals-pub/blob/master/P0009/reference-implementation
Warning
this class is partially implemented. is_contiguous() isn't implemented.

Definition at line 139 of file otbLayouts.h.

Member Typedef Documentation

◆ index_type

template<typename Extents >
using otb::details::policy::stride_< Extents >::index_type = typename root_layout_mapping<Extents>::index_type

Definition at line 141 of file otbLayouts.h.

◆ stride_t

template<typename Extents >
using otb::details::policy::stride_< Extents >::stride_t = std::array<index_type, Extents::rank()>

Definition at line 142 of file otbLayouts.h.

Constructor & Destructor Documentation

◆ stride_()

template<typename Extents >
constexpr otb::details::policy::stride_< Extents >::stride_ ( Extents const &  e,
stride_t const &  s 
)
inlineconstexprnoexcept

Definition at line 147 of file otbLayouts.h.

Member Function Documentation

◆ is_always_contiguous()

template<typename Extents >
static constexpr bool otb::details::policy::stride_< Extents >::is_always_contiguous ( )
inlinestaticconstexprnoexcept

Definition at line 161 of file otbLayouts.h.

◆ is_contiguous()

template<typename Extents >
constexpr bool otb::details::policy::stride_< Extents >::is_contiguous ( ) const
inlineconstexprnoexcept

◆ stride()

template<typename Extents >
constexpr index_type otb::details::policy::stride_< Extents >::stride ( const vcl_size_t  R) const
inlineconstexprnoexcept

Member Data Documentation

◆ m_contigous

template<typename Extents >
bool otb::details::policy::stride_< Extents >::m_contigous
private

◆ m_strides

template<typename Extents >
stride_t otb::details::policy::stride_< Extents >::m_strides
private

Definition at line 165 of file otbLayouts.h.

Referenced by otb::details::policy::stride_< Extents >::stride().


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