Debian Codegraph @

src/atlas/grid/detail/partitioner/EqualBandsPartitioner.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 <vector>
14
15 #include "atlas/grid/detail/partitioner/BandsPartitioner.h"
16
17 namespace atlas {
18 namespace grid {
19 namespace detail {
20 namespace partitioner {
21
22 class EqualBandsPartitioner : public BandsPartitioner {
23 public:
24 EqualBandsPartitioner();
25 EqualBandsPartitioner(const eckit::Parametrisation& config): BandsPartitioner(extract_nb_partitions(config), config) {}
26 EqualBandsPartitioner(int N, const eckit::Parametrisation& config = util::NoConfig()): BandsPartitioner(N, 1, config) {}
27 std::string type() const override { return static_type(); }
28 static std::string static_type() { return "equal_bands"; }
29 };
30
31 } // namespace partitioner
32 } // namespace detail
33 } // namespace grid
34 } // namespace atlas