Poplar and PopLibs
replication_factor.hpp
1// Copyright (c) 2019 Graphcore Ltd. All rights reserved.
2
3#ifndef poplar_replication_factor_hpp
4#define poplar_replication_factor_hpp
5
6namespace poplar {
7struct replication_factor {
8 unsigned value;
9 explicit constexpr replication_factor(unsigned v) : value(v) {}
10
11 replication_factor &operator++() {
12 ++value;
13 return *this;
14 }
15
16 bool operator==(const replication_factor other) const {
17 return value == other.value;
18 }
19 bool operator!=(const replication_factor other) const {
20 return value != other.value;
21 }
22 bool operator<(const replication_factor other) const {
23 return value < other.value;
24 }
25};
26
27} // End namespace poplar.
28
29#endif // poplar_replication_factor_hpp
Poplar classes and functions.
Definition: ArrayRef.hpp:14