OTB  9.0.0
Orfeo Toolbox
Public Types | Public Member Functions | Static Public Member Functions | Private Types | Static Private Member Functions | Private Attributes | List of all members
otb::extents< StaticExtents > Class Template Reference

#include <otbExtents.h>

+ Collaboration diagram for otb::extents< StaticExtents >:

Public Types

using index_type = std::ptrdiff_t
 

Public Member Functions

template<std::ptrdiff_t... StaticExtentsR>
constexpr bool contains (extents< StaticExtentsR... > const &rhs) const noexcept
 
constexpr index_type extent (vcl_size_t k) const noexcept
 
constexpr extents () noexcept
 
template<class IndexType >
constexpr extents (const std::array< IndexType, details::rank_dynamic< StaticExtents... >()> &dynamic) noexcept
 
constexpr extents (extents &&) noexcept=default
 
constexpr extents (extents const &) noexcept=default
 
template<class... IndexType>
constexpr extents (index_type dn, IndexType... dynamic) noexcept
 
constexpr extentsoperator= (extents &&) noexcept=default
 
constexpr extentsoperator= (extents const &) noexcept=default
 
 ~extents ()=default
 

Static Public Member Functions

static constexpr vcl_size_t rank () noexcept
 
static constexpr std::vcl_size_t rank_dynamic () noexcept
 
static constexpr index_type static_extent (vcl_size_t k) noexcept
 

Private Types

using dynamic_extents_t = std::array< index_type, details::rank_dynamic< StaticExtents... >()>
 

Static Private Member Functions

static constexpr vcl_size_t dynamic_rank (vcl_size_t i) noexcept
 

Private Attributes

dynamic_extents_t dynamic_extents_
 

Detailed Description

template<std::ptrdiff_t... StaticExtents>
class otb::extents< StaticExtents >

mdspan.extents type as proposed by C++ p0009r9 proposal draft.

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

Definition at line 61 of file otbExtents.h.

Member Typedef Documentation

◆ dynamic_extents_t

template<std::ptrdiff_t... StaticExtents>
using otb::extents< StaticExtents >::dynamic_extents_t = std::array<index_type, details::rank_dynamic<StaticExtents...>()>
private

Definition at line 68 of file otbExtents.h.

◆ index_type

template<std::ptrdiff_t... StaticExtents>
using otb::extents< StaticExtents >::index_type = std::ptrdiff_t

Definition at line 65 of file otbExtents.h.

Constructor & Destructor Documentation

◆ extents() [1/5]

template<std::ptrdiff_t... StaticExtents>
constexpr otb::extents< StaticExtents >::extents ( )
inlineconstexprnoexcept

Definition at line 81 of file otbExtents.h.

◆ extents() [2/5]

template<std::ptrdiff_t... StaticExtents>
constexpr otb::extents< StaticExtents >::extents ( extents< StaticExtents > const &  )
constexprdefaultnoexcept

◆ extents() [3/5]

template<std::ptrdiff_t... StaticExtents>
constexpr otb::extents< StaticExtents >::extents ( extents< StaticExtents > &&  )
constexprdefaultnoexcept

◆ extents() [4/5]

template<std::ptrdiff_t... StaticExtents>
template<class... IndexType>
constexpr otb::extents< StaticExtents >::extents ( index_type  dn,
IndexType...  dynamic 
)
inlineexplicitconstexprnoexcept

Definition at line 86 of file otbExtents.h.

◆ extents() [5/5]

template<std::ptrdiff_t... StaticExtents>
template<class IndexType >
constexpr otb::extents< StaticExtents >::extents ( const std::array< IndexType, details::rank_dynamic< StaticExtents... >()> &  dynamic)
inlineconstexprnoexcept

Definition at line 91 of file otbExtents.h.

◆ ~extents()

template<std::ptrdiff_t... StaticExtents>
otb::extents< StaticExtents >::~extents ( )
default

Member Function Documentation

◆ contains()

template<std::ptrdiff_t... StaticExtents>
template<std::ptrdiff_t... StaticExtentsR>
constexpr bool otb::extents< StaticExtents >::contains ( extents< StaticExtentsR... > const &  rhs) const
inlineconstexprnoexcept

Definition at line 136 of file otbExtents.h.

◆ dynamic_rank()

template<std::ptrdiff_t... StaticExtents>
static constexpr vcl_size_t otb::extents< StaticExtents >::dynamic_rank ( vcl_size_t  i)
inlinestaticconstexprprivatenoexcept

◆ extent()

template<std::ptrdiff_t... StaticExtents>
constexpr index_type otb::extents< StaticExtents >::extent ( vcl_size_t  k) const
inlineconstexprnoexcept

◆ operator=() [1/2]

template<std::ptrdiff_t... StaticExtents>
constexpr extents& otb::extents< StaticExtents >::operator= ( extents< StaticExtents > &&  )
constexprdefaultnoexcept

◆ operator=() [2/2]

template<std::ptrdiff_t... StaticExtents>
constexpr extents& otb::extents< StaticExtents >::operator= ( extents< StaticExtents > const &  )
constexprdefaultnoexcept

◆ rank()

template<std::ptrdiff_t... StaticExtents>
static constexpr vcl_size_t otb::extents< StaticExtents >::rank ( )
inlinestaticconstexprnoexcept

◆ rank_dynamic()

template<std::ptrdiff_t... StaticExtents>
static constexpr std::vcl_size_t otb::extents< StaticExtents >::rank_dynamic ( )
inlinestaticconstexprnoexcept

Definition at line 113 of file otbExtents.h.

References otb::details::rank_dynamic().

◆ static_extent()

template<std::ptrdiff_t... StaticExtents>
static constexpr index_type otb::extents< StaticExtents >::static_extent ( vcl_size_t  k)
inlinestaticconstexprnoexcept

Definition at line 116 of file otbExtents.h.

References otb::extents< StaticExtents >::rank().

Member Data Documentation

◆ dynamic_extents_

template<std::ptrdiff_t... StaticExtents>
dynamic_extents_t otb::extents< StaticExtents >::dynamic_extents_
private

Definition at line 69 of file otbExtents.h.

Referenced by otb::extents< StaticExtents >::extent().


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