Debian Codegraph @

src/atlas/grid/detail/pl/classic_gaussian/N.cc

raw
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 /// @author Willem Deconinck
12 /// @date Mar 2016
13
14 #include "N.h"
15
16 #include "atlas/runtime/Exception.h"
17
18 namespace atlas {
19 namespace grid {
20 namespace detail {
21 namespace pl {
22 namespace classic_gaussian {
23
24 void PointsPerLatitude::assign(long nlon[], const size_t size) const {
25 ATLAS_ASSERT(size >= nlon_.size());
26 for (size_t jlat = 0; jlat < nlon_.size(); ++jlat) {
27 nlon[jlat] = nlon_[jlat];
28 }
29 }
30
31 void PointsPerLatitude::assign(int nlon[], const size_t size) const {
32 ATLAS_ASSERT(size >= nlon_.size());
33 for (size_t jlat = 0; jlat < nlon_.size(); ++jlat) {
34 nlon[jlat] = nlon_[jlat];
35 }
36 }
37
38 void PointsPerLatitude::assign(std::vector<long>& nlon) const {
39 nlon = nlon_;
40 }
41
42 void PointsPerLatitude::assign(std::vector<int>& nlon) const {
43 nlon.assign(nlon_.begin(), nlon_.end());
44 }
45
46 template <typename CONCRETE>
47 void load() {
48 PointsPerLatitudeBuilder<CONCRETE>();
49 }
50
51 void regist() {
52 load<N16>();
53 load<N24>();
54 load<N32>();
55 load<N48>();
56 load<N64>();
57 load<N80>();
58 load<N96>();
59 load<N128>();
60 load<N160>();
61 load<N200>();
62 load<N256>();
63 load<N320>();
64 load<N400>();
65 load<N512>();
66 load<N576>();
67 load<N640>();
68 load<N800>();
69 load<N1024>();
70 load<N1280>();
71 load<N1600>();
72 load<N2000>();
73 load<N4000>();
74 load<N8000>();
75 }
76
77 } // namespace classic_gaussian
78 } // namespace pl
79 } // namespace detail
80 } // namespace grid
81 } // namespace atlas