atlas
ArrayViewDefs.h
1 /*
2  * (C) Copyright 2013 ECMWF.
3  *
4  * This software is licensed under the terms of the Apache Licence Version 2.0
5  * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
6  * In applying this licence, ECMWF does not waive the privileges and immunities
7  * granted to it by virtue of its status as an intergovernmental organisation
8  * nor does it submit to any jurisdiction.
9  */
10 
11 #pragma once
12 
13 #include <utility>
14 
15 namespace atlas {
16 namespace array {
17 
18 #ifndef DOXYGEN_SHOULD_SKIP_THIS
19 template <int cDim>
20 struct Dim {
21  static constexpr int cdim = cDim;
22 };
23 
24 struct LastDim {};
25 struct FirstDim {};
26 
27 template <typename T>
28 struct is_dim_policy : std::false_type {};
29 template <int cDim>
30 struct is_dim_policy<Dim<cDim>> : std::true_type {};
31 
32 template <>
33 struct is_dim_policy<LastDim> : std::true_type {};
34 template <>
35 struct is_dim_policy<FirstDim> : std::true_type {};
36 #endif
37 } // namespace array
38 } // namespace atlas
Definition: ArrayViewDefs.h:24
Definition: ArrayViewDefs.h:28
Definition: ArrayViewDefs.h:25
Contains all atlas classes and methods.
Definition: atlas-grids.cc:33
Definition: ArrayViewDefs.h:20