Multidimensional array views and associated utilities#
#include <heyoka/mdspan.hpp>
In order to interact with and represent multidimensional array views,
heyoka includes a reference implementation
of the mdspan
class from C++23/C++26, plus some of the associated utilities. The implementation in heyoka
follows the standard API and, as an extension, it also supports indexing via the
function call operator. Note that the classes and functions listed below are distinct from
those in the std namespace, even if the compiler provides them.
Please refer to the documentation page on cppreference for the full API documentation.
-
template<typename T, typename Extents, typename LayoutPolicy = layout_right, typename AccessorPolicy = default_accessor<T>>
using mdspan#
-
template<typename IndexType, std::size_t... Extents>
using extents#
-
template<typename IndexType, std::size_t Rank>
using dextents#
-
template<typename ElementType>
using default_accessor#
-
inline constexpr auto full_extent#
-
template<typename T, typename Extents, typename LayoutPolicy, typename AccessorPolicy, typename ...SliceSpecifiers>
constexpr auto submdspan(const mdspan<T, Extents, LayoutPolicy, AccessorPolicy> &x, SliceSpecifiers... slices)#