|
CkPttn 1.2.4
|
Binary Fiduccia-Mattheyses Gain Calculator. More...
#include <FMBiGainCalc.hpp>
Public Types | |
| using | node_t = typename Gnl::node_t |
| using | Item = Dllink< std::pair< node_t, uint32_t > > |
Public Member Functions | |
| const auto & | get_init_gain_list () const |
| Expose initial gain list for read-only use. | |
| FMBiGainCalc (const Gnl &hyprgraph, std::uint8_t) | |
| Constructs a new FMBiGainCalc object. | |
| auto | init (std::span< const std::uint8_t > part) -> int |
| Initializes the FMBiGainCalc object. | |
| auto | update_move_init () -> void |
| This function does nothing in 2-way partitioning. | |
| void | init_idx_vec (const node_t &module, const node_t &net) |
| Initializes the index vector for a given vertex and net. | |
| auto | update_move_2pin_net (std::span< const std::uint8_t > part, const MoveInfo< node_t > &move_info) -> node_t |
| Update a 2-pin net during a move operation. | |
| auto | update_move_3pin_net (std::span< const std::uint8_t > part, const MoveInfo< node_t > &move_info) -> std::vector< int > |
| Update the gain values for a 3-pin net during a move operation. | |
| auto | update_move_general_net (std::span< const std::uint8_t > part, const MoveInfo< node_t > &move_info) -> std::vector< int > |
| Update the gain values for a general net during a move operation. | |
Public Attributes | |
| int | delta_gain_w {} |
| Delta gain for the winning partition. | |
| FMPmr::vector< node_t > | idx_vec |
| Index vector for net vertex enumeration. | |
| bool | special_handle_2pin_nets {true} |
| Whether to use special handling for 2-pin nets (optimization) | |
Friends | |
| class | FMBiGainMgr< Gnl > |
Binary Fiduccia-Mattheyses Gain Calculator.
The FMBiGainCalc class computes gain values for 2-way partitioning. It tracks gain values for each vertex based on the number of nets that would become internal (gain) or external (loss) when moving a vertex between partitions.
| Gnl | The hypergraph type |
| using FMBiGainCalc< Gnl >::Item = Dllink<std::pair<node_t, uint32_t> > |
| using FMBiGainCalc< Gnl >::node_t = typename Gnl::node_t |
|
inlineexplicit |
Constructs a new FMBiGainCalc object.
| [in] | hyprgraph | The hypergraph to use for the FMBiGainCalc object. |
|
inline |
Expose initial gain list for read-only use.
|
inline |
Initializes the FMBiGainCalc object.
This function initializes the FMBiGainCalc object by resetting the total cost, vertex list, and initial gain list. It then calls the _init_gain function for each net in the hypergraph to initialize the gain values.
| [in] | part | The partition information. |
| void FMBiGainCalc< Gnl >::init_idx_vec | ( | const node_t & | module, |
| const node_t & | net | ||
| ) |
Initializes the index vector for a given vertex and net.
This function is used to initialize the index vector for a given vertex and net in the FMBiGainCalc object.
| [in] | module | The vertex to initialize the index vector for. |
| [in] | net | The net to initialize the index vector for. |
| auto FMBiGainCalc< Gnl >::update_move_2pin_net | ( | std::span< const std::uint8_t > | part, |
| const MoveInfo< node_t > & | move_info | ||
| ) | -> node_t |
Update a 2-pin net during a move operation.
This function updates the gain values for a 2-pin net when a vertex is moved during a partitioning operation.
| [in] | part | The current partition information. |
| [in] | move_info | The information about the move being performed. |
| auto FMBiGainCalc< Gnl >::update_move_3pin_net | ( | std::span< const std::uint8_t > | part, |
| const MoveInfo< node_t > & | move_info | ||
| ) | -> std::vector< int > |
Update the gain values for a 3-pin net during a move operation.
This function updates the gain values for a 3-pin net when a vertex is moved during a partitioning operation.
| [in] | part | The current partition information. |
| [in] | move_info | The information about the move being performed. |
| auto FMBiGainCalc< Gnl >::update_move_general_net | ( | std::span< const std::uint8_t > | part, |
| const MoveInfo< node_t > & | move_info | ||
| ) | -> std::vector< int > |
Update the gain values for a general net during a move operation.
This function updates the gain values for a general net (with more than 3 pins) when a vertex is moved during a partitioning operation.
| [in] | part | The current partition information. |
| [in] | move_info | The information about the move being performed. |
|
inline |
This function does nothing in 2-way partitioning.
|
friend |
| int FMBiGainCalc< Gnl >::delta_gain_w {} |
Delta gain for the winning partition.
| FMPmr::vector<node_t> FMBiGainCalc< Gnl >::idx_vec |
Index vector for net vertex enumeration.
| bool FMBiGainCalc< Gnl >::special_handle_2pin_nets {true} |
Whether to use special handling for 2-pin nets (optimization)