![]() |
Arene Base
Fundamental Utilities For Safety Critical C++
|
The mdspan sub-package provides a set of classes and functions for manipulating multidimensional arrays.
The public header is
The Bazel target is
This package provides the following classes and functions for describing and viewing multidimensional array data, as backports of the corresponding facilities from C++23.
arene::base::extentsarene::base::dextentsarene::base::layout_stride::mappingarene::base::layout_left::mappingarene::base::layout_right::mappingarene::base::default_accessorarene::base::mdspanThis package provides the following type traits as extensions on the C++23 facilities.
arene::base::is_accessor_policy_varene::base::is_layout_mapping_varene::base::is_layout_mapping_policy_varene::base::axis_view<Axis> takes an mdspan and returns a range over its slices along axis Axis. The i-th element of that range is the slice obtained by fixing axis Axis at i while keeping every other axis in full, so each slice has a rank one less than the source.
The slices are views of the source rather than copies, so no elements are copied. For the rank-2 case, arene::base::linalg::row_view and arene::base::linalg::column_view name the same operation in matrix terms.