Debian Codegraph @

src/atlas/grid/detail/distribution/SerialDistribution.h

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 #pragma once
12
13 #include "atlas/grid/detail/distribution/DistributionFunction.h"
14
15 namespace atlas {
16 namespace grid {
17 namespace detail {
18 namespace distribution {
19
20 class SerialDistribution : public DistributionFunctionT<SerialDistribution> {
21 public:
22 SerialDistribution(const Grid& grid);
23 SerialDistribution(const Grid& grid, int part);
24
25 ATLAS_ALWAYS_INLINE int function(gidx_t gidx) const { return part_; }
26
27 private:
28 int part_{0};
29 };
30
31 } // namespace distribution
32 } // namespace detail
33 } // namespace grid
34 } // namespace atlas