tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
submdspan.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSL-1.0
2
3#ifndef TETL_MDSPAN_SUBMDSPAN_HPP
4#define TETL_MDSPAN_SUBMDSPAN_HPP
5
7
8namespace etl {
9
10// template <typename T, typename Ext, typename Layout, typename Accessor, typename...
11// SliceSpecifiers>
12// [[nodiscard]] constexpr auto submdspan(mdspan<T, Ext, Layout, Accessor> const& src,
13// SliceSpecifiers... slices)
14// {
15// auto sub_mapping = submdspan_mapping(src.mapping(), slices...);
16// auto sub_accessor = typename Accessor::offset_policy(src.accessor());
17// auto sub_data = src.accessor().offset(src.data_handle(), sub_mapping.offset);
18// return etl::mdspan(sub_data, sub_mapping.mapping, sub_accessor);
19// }
20
21} // namespace etl
22
23#endif // TETL_MDSPAN_SUBMDSPAN_HPP
Definition adjacent_find.hpp:8