Finite Volume Solver  prototype
A framework to build finite volume solvers for the AG Klein at the Freie Universität Berlin.
Classes | Namespaces | Typedefs | Functions | Variables
mdspan.hpp File Reference
#include "fub/core/assert.hpp"
#include "fub/core/dynamic_extent.hpp"
#include "fub/core/span.hpp"
#include "fub/core/type_traits.hpp"
#include <array>
#include <type_traits>
#include <boost/mp11/tuple.hpp>

Go to the source code of this file.

Classes

class  fub::ExtentsStorage_< Rank, 0, StaticExtents... >
 This is the class template specialisation if all extents are statically known. More...
 
class  fub::ExtentsStorage_< Rank, Rank, StaticExtents... >
 
class  fub::ExtentsStorage_< Rank, RankDynamic, StaticExtents >
 This is the storage type for the extents class and only takes storage for dynamic extents. More...
 
class  fub::extents< StaticExtents >
 An extents object defines a multidimensional index space which is the Cartesian product of integers extents [0..N0) * [0..N1) * ... More...
 
struct  fub::is_extents< E >
 This is true std::true_type iff E is extents<Es...> for some std::ptrdiff_t... More...
 
struct  fub::is_extents< extents< StaticExtents... > >
 
struct  fub::layout_left
 This layout creates mappings which do row first indexing (as in Fortran). More...
 
class  fub::layout_left::mapping< Extents >
 This mapping does row first indexing (as in Fortran). More...
 
struct  fub::layout_right
 
class  fub::layout_right::mapping< Extents >
 
struct  fub::layout_stride
 
class  fub::layout_stride::mapping< Extents >
 
struct  fub::accessor_basic< ElementType >
 
class  fub::basic_mdspan< ElementType, Extents, LayoutPolicy, AccessorPolicy >
 
struct  fub::dynamic_extents_< integer_sequence< I, Is... > >
 
struct  fub::all_type
 
struct  fub::mdspan_subspan< ElementType, Extents, LayoutPolicy, AccessorPolicy, SliceSpecifiers >
 
struct  fub::is_mdspan< typename >
 
struct  fub::is_mdspan< basic_mdspan< T, E, L, A > >
 

Namespaces

 fub
 The fub namespace.
 

Typedefs

template<typename T , ptrdiff_t... Extents>
using fub::static_mdspan = basic_mdspan< T, extents< Extents... > >
 
template<std::size_t Rank>
using fub::dynamic_extents = typename dynamic_extents_< make_index_sequence< Rank > >::type
 
template<typename T , std::size_t Rank, typename Layout = layout_left>
using fub::mdspan = basic_mdspan< T, dynamic_extents< Rank >, Layout >
 
template<typename T , typename E , typename A = accessor_basic<T>>
using fub::strided_mdspan = basic_mdspan< T, E, layout_stride, A >
 
template<class ElementType , class Extents , class LayoutPolicy , class AccessorPolicy , class... SliceSpecifiers>
using fub::mdspan_subspan_t = typename mdspan_subspan< ElementType, Extents, LayoutPolicy, AccessorPolicy, SliceSpecifiers... >::type
 

Functions

template<typename... IndexType>
constexpr std::size_t fub::count_dynamic_extents (IndexType... extent) noexcept
 
template<std::ptrdiff_t... StaticExtentsL, std::ptrdiff_t... StaticExtentsR>
constexpr bool fub::operator== (const extents< StaticExtentsL... > &lhs, const extents< StaticExtentsR... > &rhs) noexcept
 Returns: true if lhs.rank() == rhs.rank() and lhs.extents(r) == rhs.extents(r) for all r in the range [0, lhs.rank()), or false otherwise. More...
 
template<std::ptrdiff_t... StaticExtentsL, std::ptrdiff_t... StaticExtentsR>
constexpr bool fub::operator!= (const extents< StaticExtentsL... > &left, const extents< StaticExtentsR... > &right) noexcept
 
template<std::ptrdiff_t... StaticExtents>
constexpr std::ptrdiff_t fub::Size_ (const extents< StaticExtents... > e) noexcept
 
constexpr std::ptrdiff_t fub::SliceExtent_ (const std::pair< std::ptrdiff_t, std::ptrdiff_t > &p)
 
template<class ElementType , class Extents , class LayoutPolicy , class AccessorPolicy , class... SliceSpecifiers>
mdspan_subspan_t< ElementType, Extents, LayoutPolicy, AccessorPolicy, SliceSpecifiers... > fub::subspan (const basic_mdspan< ElementType, Extents, LayoutPolicy, AccessorPolicy > &src, SliceSpecifiers... slices) noexcept
 

Variables

static constexpr all_type fub::all
 
template<typename T >
static constexpr bool fub::is_mdspan_v
 
template<typename E >
static constexpr bool fub::is_extents_v