3#ifndef poplar_GlobalExchangeConstraints_hpp
4#define poplar_GlobalExchangeConstraints_hpp
12struct GlobalExchangeFlow {
15 GlobalExchangeFlow(
unsigned src,
unsigned dst) : src(src), dst(dst) {}
17 bool operator==(
const GlobalExchangeFlow &other)
const;
19 bool operator<(
const GlobalExchangeFlow &other)
const;
22struct GlobalExchangeConstraint {
26 std::vector<GlobalExchangeFlow> flows;
28 GlobalExchangeConstraint(
double bandwidth, ArrayRef<GlobalExchangeFlow> flows)
29 : bandwidth(bandwidth), flows(flows.begin(), flows.end()) {}
31 bool operator==(
const GlobalExchangeConstraint &other)
const;
33 bool operator<(
const GlobalExchangeConstraint &other)
const;
40template <>
struct hash<
poplar::GlobalExchangeFlow> {
41 size_t operator()(
const poplar::GlobalExchangeFlow &value)
const;
44template <>
struct hash<
poplar::GlobalExchangeConstraint> {
45 size_t operator()(
const poplar::GlobalExchangeConstraint &value)
const;
Poplar classes and functions.
Definition: ArrayRef.hpp:14