12 namespace merge_states
14 std::shared_ptr<Grouping>
15 process(
const processing::Configuration& config,
const std::shared_ptr<const Grouping>& state1,
const std::shared_ptr<const Grouping>& state2,
bool delete_from_smaller)
17 auto new_state = std::make_shared<Grouping>(state1->netlist_abstr);
21 for (
const auto&
state : {state1, state2})
23 for (
const auto& [group_id, gates] :
state->gates_of_group)
25 u32 new_group_id = ++id_counter;
27 new_state->group_control_fingerprint_map[new_group_id] = new_state->netlist_abstr.gate_to_fingerprint.at(*gates.begin());
28 new_state->operations_on_group_allowed[new_group_id] =
state->operations_on_group_allowed.at(group_id);
30 new_state->gates_of_group[new_group_id].insert(gates.begin(), gates.end());
31 for (
const auto& sg : gates)
33 new_state->parent_group_of_gate[sg] = new_group_id;
std::shared_ptr< Grouping > process(const processing::Configuration &config, const std::shared_ptr< const Grouping > &state1, const std::shared_ptr< const Grouping > &state2, bool delete_from_smaller)
std::shared_ptr< Grouping > process(const processing::Configuration &config, const std::shared_ptr< Grouping > &state, bool delete_from_smaller)
This file contains the struct that holds all information on the netlist abstraction used for dataflow...
This file contains the class that holds all information of a dataflow analysis grouping.