|
CkPttn 1.2.4
|
K-Way Fiduccia-Mattheyses Gain Manager. More...
#include <FMKWayGainMgr.hpp>


Public Types | |
| using | Base = FMGainMgr< Gnl, FMKWayGainCalc< Gnl >, FMKWayGainMgr< Gnl > > |
| using | GainCalc_ = FMKWayGainCalc< Gnl > |
| using | node_t = typename Gnl::node_t |
Public Member Functions | |
| FMKWayGainMgr (const Gnl &hyprgraph, std::uint8_t num_parts) | |
| Constructs a new FMKWayGainMgr object. | |
| auto | init (std::span< const std::uint8_t > part) -> int |
| Initializes the gain manager with the given partition information. | |
| auto | modify_key (const node_t &w, std::uint8_t part_w, std::span< const int > keys) -> void |
| Modifies the key for the given vertex in the gain buckets for all partitions except the given one. | |
| auto | update_move_v (const MoveInfoV< node_t > &move_info_v, int gain) -> void |
| Updates the move information for a vertex. | |
| auto | lock (uint8_t whichPart, const node_t &v) -> void |
| Locks the vertex link for the given partition and vertex. | |
| auto | lock_all (uint8_t, const node_t &v) -> void |
| Locks the vertex link for the given vertex in all partitions. | |
Public Member Functions inherited from FMGainMgr< Gnl, FMKWayGainCalc< Gnl >, FMKWayGainMgr< Gnl > > | |
| FMGainMgr (const Gnl &hyprgraph, std::uint8_t num_parts) | |
| Constructs a new FMGainMgr object. | |
| auto | init (std::span< const std::uint8_t > part) -> int |
| Initializes the FMGainMgr with the given partition information. | |
| auto | is_empty_togo (uint8_t to_part) const -> bool |
| Checks if the gain bucket for the given partition is empty. | |
| auto | is_empty () const -> bool |
| Checks if all the gain buckets are empty. | |
| auto | select (std::span< const std::uint8_t > part) -> std::pair< MoveInfoV< node_t >, int > |
| Selects a vertex to move and computes the associated gain. | |
| auto | select_togo (uint8_t to_part) -> std::pair< node_t, int > |
| Selects a node to move to the given partition. | |
| auto | update_move (std::span< const std::uint8_t > part, const MoveInfoV< node_t > &move_info_v) -> void |
| Updates the gain information for the given set of moves. | |
Additional Inherited Members | |
Public Attributes inherited from FMGainMgr< Gnl, FMKWayGainCalc< Gnl >, FMKWayGainMgr< Gnl > > | |
| FMKWayGainCalc< Gnl > | gain_calc |
| Gain calculator instance. | |
Protected Attributes inherited from FMGainMgr< Gnl, FMKWayGainCalc< Gnl >, FMKWayGainMgr< Gnl > > | |
| Dllist< std::pair< node_t, uint32_t > > | waiting_list |
| Waiting list for vertices awaiting movement. | |
| const Gnl & | hyprgraph |
| Reference to the hypergraph being partitioned. | |
| std::vector< BPQueue< node_t > > | gain_bucket |
| Gain buckets for each partition (used in bucket-based gain management) | |
| std::uint8_t | num_parts |
| Number of partitions. | |
K-Way Fiduccia-Mattheyses Gain Manager.
The FMKWayGainMgr class is a gain manager specialized for k-way partitioning. It uses the FM (Fiduccia-Mattheyses) algorithm to compute and manage gains for moving vertices among multiple partitions.
| Gnl | The hypergraph type (Generalized Netlist) |
| using FMKWayGainMgr< Gnl >::Base = FMGainMgr<Gnl, FMKWayGainCalc<Gnl>, FMKWayGainMgr<Gnl> > |
| using FMKWayGainMgr< Gnl >::GainCalc_ = FMKWayGainCalc<Gnl> |
| using FMKWayGainMgr< Gnl >::node_t = typename Gnl::node_t |
|
inline |
Constructs a new FMKWayGainMgr object.
| [in] | hyprgraph | The hypergraph to use. |
| [in] | num_parts | The number of partitions. |
| auto FMKWayGainMgr< Gnl >::init | ( | std::span< const std::uint8_t > | part | ) | -> int |
Initializes the gain manager with the given partition information.
| [in] | part | The partition information to initialize the gain manager with. |
|
inline |
Locks the vertex link for the given partition and vertex.
| [in] | whichPart | The partition to lock the vertex link for. |
| [in] | v | The vertex to lock the link for. |
|
inline |
Locks the vertex link for the given vertex in all partitions.
| [in] | v | The vertex to lock the link for. |
|
inline |
Modifies the key for the given vertex in the gain buckets for all partitions except the given one.
| [in] | w | The vertex to modify the key for. |
| [in] | part_w | The partition that the vertex belongs to. |
| [in] | keys | The new keys to set for the vertex in each partition. |
| auto FMKWayGainMgr< Gnl >::update_move_v | ( | const MoveInfoV< node_t > & | move_info_v, |
| int | gain | ||
| ) | -> void |
Updates the move information for a vertex.
| [in] | move_info_v | The move information for the vertex. |
| [in] | gain | The gain associated with the move. |