FleCSI User API Version: 2.3.0
 
Loading...
Searching...
No Matches
mdspan< T, D > Struct Template Reference

A small, approximate subset of mdspan as proposed for C++23. More...

Public Member Functions

template<class T , class U , std::size_t D>
 mdspan (T *, std::array< U, D >) -> mdspan< T, D >
 Deduction guide.
 
constexpr decltype(auto) operator[] (size_type i) const noexcept
 Select a subset of the view.
 
- Public Member Functions inherited from mdbase< T, D >
constexpr size_type length (Dimension i) const noexcept
 Get one size of the view.
 
template<typename U = size_type, typename = std::enable_if_t<std::is_convertible_v<U, size_type>>>
constexpr mdbase (T *p, std::array< U, D > sz) noexcept
 Construct a view of a one-dimensional array.
 

Detailed Description

template<class T, unsigned short D>
struct flecsi::util::mdspan< T, D >

A small, approximate subset of mdspan as proposed for C++23.

This class is supported for GPU execution.

Template Parameters
Ddimension

Constructor & Destructor Documentation

◆ mdspan()

template<class T , class U , std::size_t D>
mdspan ( T *  ,
std::array< U, D >   
) -> mdspan< T, D >

Deduction guide.

Member Function Documentation

◆ operator[]()

template<class T , unsigned short D>
constexpr decltype(auto) operator[] ( size_type  i) const
constexprnoexcept

Select a subset of the view.

Parameters
iindex (must be smaller than length(D-1))
Returns
mdspan<T,D-1> or T& if D is 1