8#ifndef AIE_DIALECT_AIE_TRANSFORMS_AIEPACKETIDSPACE_H
9#define AIE_DIALECT_AIE_TRANSFORMS_AIEPACKETIDSPACE_H
13#include "llvm/ADT/DenseSet.h"
29 explicit PacketIdSpace(DeviceOp device,
bool reserveControllerIds =
false);
32 int maxId()
const {
return max; }
34 bool isTaken(
int id)
const {
return taken.contains(
id); }
35 void take(
int id) { taken.insert(
id); }
42 llvm::SmallDenseSet<int> taken;
std::optional< int > takeLowestFrom(int from=0)
Takes and returns the lowest free id at or above from, or nothing when the field is exhausted.
int maxId() const
The largest id the target's header field holds.
PacketIdSpace(DeviceOp device, bool reserveControllerIds=false)
Controller ids are taken when the device carries aie.reserve_controller_packet_ids or reserveControll...
bool isTaken(int id) const