#[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)]
pub struct RegisterBlock {
pub budget: usize,
pub split_edge: bool,
pub component_fanout: bool,
pub partials: bool,
}
impl RegisterBlock {
pub const fn new(budget: usize) -> Self {
Self {
budget,
split_edge: false,
component_fanout: false,
partials: false,
}
}
pub const fn split_edge(self) -> Self {
Self {
split_edge: true,
..self
}
}
pub const fn component_fanout(self) -> Self {
Self {
component_fanout: true,
..self
}
}
pub const fn partials(self) -> Self {
Self {
partials: true,
..self
}
}
}