64 assert(MachineType_base_level((MachineType)(machine + 1)) -
65 MachineType_base_level(machine) == 1);
66 m_bits[MachineType_base_level(machine)] =
set;
95 for (MachineType machine = MachineType_FIRST;
96 machine < MachineType_NUM; ++machine) {
104 for (
NodeID i = 0;
i < MachineType_base_count(machineType);
i++) {
116 for (
int i = 0;
i <
m_bits.size();
i++) {
117 for (
int j = 0; j <
m_bits[
i].getSize(); j++) {
119 int id = MachineType_base_number((MachineType)
i) + j;
120 dest.push_back((
NodeID)
id);
131 for (
int i = 0;
i <
m_bits.size();
i++) {
147 for (
int i = 0;
i <
m_bits.size();
i++) {
150 MachineID mach = {MachineType_from_base_level(
i), j};
155 panic(
"No smallest element of an empty set.");
161 int size =
m_bits[MachineType_base_level(machine)].getSize();
162 for (
NodeID j = 0; j < size; j++) {
169 panic(
"No smallest element of given MachineType.");
176 for (
int i = 0;
i <
m_bits.size();
i++) {
188 for (
int i = 0;
i <
m_bits.size();
i++) {
202 for (
int i = 0;
i <
m_bits.size();
i++) {
214 for (
int i = 0;
i <
m_bits.size();
i++) {
225 for (
int i = 0;
i <
m_bits.size();
i++) {
238 for (
int i = 0;
i <
m_bits.size();
i++) {
255 m_bits.resize(MachineType_base_level(MachineType_NUM));
256 assert(
m_bits.size() == MachineType_NUM);
258 for (
int i = 0;
i <
m_bits.size();
i++) {
259 m_bits[
i].setSize(MachineType_base_count((MachineType)
i));
266 out <<
"[NetDest (" <<
m_bits.size() <<
") ";
268 for (
int i = 0;
i <
m_bits.size();
i++) {
269 for (
int j = 0; j <
m_bits[
i].getSize(); j++) {
280 assert(
m_bits.size() ==
n.m_bits.size());
281 for (
unsigned int i = 0;
i <
m_bits.size(); ++
i) {
void add(MachineID newElement)
void remove(MachineID oldElement)
std::vector< NodeID > getAllDest()
NetDest AND(const NetDest &andNetDest) const
NetDest OR(const NetDest &orNetDest) const
bool isElement(MachineID element) const
bool isEqual(const NetDest &netDest) const
std::vector< Set > m_bits
void removeNetDest(const NetDest &netDest)
NodeID elementAt(MachineID index)
void addNetDest(const NetDest &netDest)
void setNetDest(MachineType machine, const Set &set)
MachineID smallestElement() const
bool intersectionIsNotEmpty(const NetDest &other_netDest) const
bool intersectionIsEmpty(const NetDest &other_netDest) const
int vecIndex(MachineID m) const
bool isSuperset(const NetDest &test) const
void print(std::ostream &out) const
NodeID bitIndex(NodeID index) const
#define panic(...)
This implements a cprintf based panic() function.
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
NodeID num
range: 0 ... number of this machine's components in system - 1