dune-common 2.12-git
Loading...
Searching...
No Matches
submdspan_slices.hh
Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2// vi: set et ts=4 sw=2 sts=2:
3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
5#ifndef DUNE_COMMON_STD_SUBMDSPAN_SLICES_HH
6#define DUNE_COMMON_STD_SUBMDSPAN_SLICES_HH
7
8#include <cstddef>
9#include <type_traits>
10
12
13namespace Dune::Std {
14
27{
28 explicit full_extent_t () = default;
29};
30
33inline constexpr full_extent_t full_extent{};
34
42template <class OffsetType, class ExtentType, class StrideType>
53
54template <class OffsetType, class ExtentType, class StrideType>
55extent_slice(OffsetType, ExtentType, StrideType)
57
65template <class FirstType, class LastType,
77
78template <class FirstType, class LastType>
79range_slice(FirstType, LastType)
81
82template <class FirstType, class LastType, class StrideType>
83range_slice(FirstType, LastType, StrideType)
85
90template <class OffsetType, class ExtentType, class StrideType>
92
100template <class LayoutMapping>
102{
104 typename LayoutMapping::index_type offset{};
105};
106
107} // end namespace Dune::Std
108
109#endif // DUNE_COMMON_STD_SUBMDSPAN_SLICES_HH
#define DUNE_NO_UNIQUE_ADDRESS
Definition no_unique_address.hh:24
constexpr full_extent_t full_extent
Slice specifier selecting the full extent in one mdspan dimension.
Definition submdspan_slices.hh:33
Namespace for features backported from new C++ standards.
Definition algorithm.hh:19
Slice specifier selecting the full extent in one mdspan dimension.
Definition submdspan_slices.hh:27
Slice specifier selecting extent entries starting at offset with a stride.
Definition submdspan_slices.hh:44
DUNE_NO_UNIQUE_ADDRESS extent_type extent
Definition submdspan_slices.hh:50
DUNE_NO_UNIQUE_ADDRESS stride_type stride
Definition submdspan_slices.hh:51
DUNE_NO_UNIQUE_ADDRESS offset_type offset
Definition submdspan_slices.hh:49
ExtentType extent_type
Definition submdspan_slices.hh:46
StrideType stride_type
Definition submdspan_slices.hh:47
OffsetType offset_type
Definition submdspan_slices.hh:45
Slice specifier selecting the half-open range [first,last) with a stride.
Definition submdspan_slices.hh:68
StrideType stride_type
Definition submdspan_slices.hh:71
DUNE_NO_UNIQUE_ADDRESS stride_type stride
Definition submdspan_slices.hh:75
DUNE_NO_UNIQUE_ADDRESS last_type last
Definition submdspan_slices.hh:74
DUNE_NO_UNIQUE_ADDRESS first_type first
Definition submdspan_slices.hh:73
FirstType first_type
Definition submdspan_slices.hh:69
LastType last_type
Definition submdspan_slices.hh:70
Result type returned by submdspan_mapping.
Definition submdspan_slices.hh:102
LayoutMapping::index_type offset
Definition submdspan_slices.hh:104
DUNE_NO_UNIQUE_ADDRESS LayoutMapping mapping
Definition submdspan_slices.hh:103