Finite Volume Solver  prototype
A framework to build finite volume solvers for the AG Klein at the Freie Universität Berlin.
Public Member Functions | Static Public Member Functions | Static Private Member Functions | Private Attributes | List of all members
fub::ExtentsStorage_< Rank, RankDynamic, StaticExtents > Class Template Reference

This is the storage type for the extents class and only takes storage for dynamic extents. More...

#include <mdspan.hpp>

Public Member Functions

 ExtentsStorage_ ()=default
 
template<typename... IndexType, typename = std::enable_if_t<conjunction< std::is_convertible<IndexType, std::ptrdiff_t>...>::value>, typename = std::enable_if_t<sizeof...(IndexType) == RankDynamic>>
constexpr ExtentsStorage_ (IndexType... extent) noexcept
 
constexpr ExtentsStorage_ (const std::array< std::ptrdiff_t, RankDynamic > &extents) noexcept
 
constexpr std::ptrdiff_t extent (size_t n) const noexcept
 Returns the N-th Extent. More...
 

Static Public Member Functions

static constexpr std::size_t rank () noexcept
 Returns sizeof...(StaticExtents) More...
 
static constexpr std::size_t rank_dynamic () noexcept
 Returns sizeof...(StaticExtents) More...
 
static constexpr std::ptrdiff_t static_extent (std::size_t n) noexcept
 Returns dynamic_extent. More...
 

Static Private Member Functions

static constexpr std::size_t find_dynamic_extent_index (std::size_t n) noexcept
 

Private Attributes

std::array< std::ptrdiff_t, RankDynamic > m_dynamic_extents
 

Detailed Description

template<std::size_t Rank, std::size_t RankDynamic, std::ptrdiff_t... StaticExtents>
class fub::ExtentsStorage_< Rank, RankDynamic, StaticExtents >

This is the storage type for the extents class and only takes storage for dynamic extents.

This class is also responsible for accessing all extents.

Constructor & Destructor Documentation

◆ ExtentsStorage_() [1/3]

template<std::size_t Rank, std::size_t RankDynamic, std::ptrdiff_t... StaticExtents>
fub::ExtentsStorage_< Rank, RankDynamic, StaticExtents >::ExtentsStorage_ ( )
default

◆ ExtentsStorage_() [2/3]

template<std::size_t Rank, std::size_t RankDynamic, std::ptrdiff_t... StaticExtents>
template<typename... IndexType, typename = std::enable_if_t<conjunction< std::is_convertible<IndexType, std::ptrdiff_t>...>::value>, typename = std::enable_if_t<sizeof...(IndexType) == RankDynamic>>
constexpr fub::ExtentsStorage_< Rank, RankDynamic, StaticExtents >::ExtentsStorage_ ( IndexType...  extent)
inlineexplicitconstexprnoexcept

◆ ExtentsStorage_() [3/3]

template<std::size_t Rank, std::size_t RankDynamic, std::ptrdiff_t... StaticExtents>
constexpr fub::ExtentsStorage_< Rank, RankDynamic, StaticExtents >::ExtentsStorage_ ( const std::array< std::ptrdiff_t, RankDynamic > &  extents)
inlineexplicitconstexprnoexcept

Member Function Documentation

◆ extent()

template<std::size_t Rank, std::size_t RankDynamic, std::ptrdiff_t... StaticExtents>
constexpr std::ptrdiff_t fub::ExtentsStorage_< Rank, RankDynamic, StaticExtents >::extent ( size_t  n) const
inlineconstexprnoexcept

Returns the N-th Extent.

◆ find_dynamic_extent_index()

template<std::size_t Rank, std::size_t RankDynamic, std::ptrdiff_t... StaticExtents>
static constexpr std::size_t fub::ExtentsStorage_< Rank, RankDynamic, StaticExtents >::find_dynamic_extent_index ( std::size_t  n)
inlinestaticconstexprprivatenoexcept

◆ rank()

template<std::size_t Rank, std::size_t RankDynamic, std::ptrdiff_t... StaticExtents>
static constexpr std::size_t fub::ExtentsStorage_< Rank, RankDynamic, StaticExtents >::rank ( )
inlinestaticconstexprnoexcept

Returns sizeof...(StaticExtents)

◆ rank_dynamic()

template<std::size_t Rank, std::size_t RankDynamic, std::ptrdiff_t... StaticExtents>
static constexpr std::size_t fub::ExtentsStorage_< Rank, RankDynamic, StaticExtents >::rank_dynamic ( )
inlinestaticconstexprnoexcept

Returns sizeof...(StaticExtents)

◆ static_extent()

template<std::size_t Rank, std::size_t RankDynamic, std::ptrdiff_t... StaticExtents>
static constexpr std::ptrdiff_t fub::ExtentsStorage_< Rank, RankDynamic, StaticExtents >::static_extent ( std::size_t  n)
inlinestaticconstexprnoexcept

Returns dynamic_extent.

Member Data Documentation

◆ m_dynamic_extents

template<std::size_t Rank, std::size_t RankDynamic, std::ptrdiff_t... StaticExtents>
std::array<std::ptrdiff_t, RankDynamic> fub::ExtentsStorage_< Rank, RankDynamic, StaticExtents >::m_dynamic_extents
private

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