di
0.1.0
Loading...
Searching...
No Matches
md_layout.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
di/meta/compare.h
"
4
#include "
di/meta/core.h
"
5
#include "
di/meta/operations.h
"
6
#include "
di/vocab/md/concepts/extents.h
"
7
8
namespace
di::concepts
{
9
namespace
detail {
10
template
<
typename
Layout,
typename
Mapping>
11
concept
IsMappingOf = SameAs<typename Layout::template Mapping<typename Mapping::ExtentsType>, Mapping>;
12
}
13
14
template
<
typename
M>
15
concept
MDLayoutMapping
=
Copyable<M>
&&
EqualityComparable<M>
&&
requires
(M
const
m) {
16
typename
M::ExtentsType;
17
typename
M::SizeType;
18
typename
M::RankType;
19
typename
M::LayoutType;
20
21
{ m.extents() } ->
SameAs<typename M::ExtentsType const&>
;
22
{ m.required_span_size() } ->
SameAs<typename M::SizeType>
;
23
{ m.is_unique() } ->
SameAs<bool>
;
24
{ m.is_exhaustive() } ->
SameAs<bool>
;
25
{ m.is_strided() } ->
SameAs<bool>
;
26
27
{ M::is_always_unique() } ->
SameAs<bool>
;
28
{ M::is_always_exhaustive() } ->
SameAs<bool>
;
29
{ M::is_always_strided() } ->
SameAs<bool>
;
30
};
31
32
template
<
typename
T,
typename
Extents>
33
concept
MDLayout
=
concepts::Extents<Extents>
&&
requires
{
typename
T::template Mapping<Extents>; } &&
34
MDLayoutMapping<typename T::template Mapping<Extents>
>;
35
}
di::concepts::Copyable
Definition
operations.h:40
di::concepts::EqualityComparable
Definition
compare.h:82
di::concepts::Extents
Definition
extents.h:17
di::concepts::MDLayoutMapping
Definition
md_layout.h:15
di::concepts::MDLayout
Definition
md_layout.h:33
di::concepts::SameAs
Definition
core.h:114
extents.h
core.h
compare.h
di::concepts
Definition
any_storable.h:9
operations.h
di
vocab
md
concepts
md_layout.h
Generated by
1.13.2