template<typename Gnl>
FMKWayGainCalc class

FMKWayGainCalc.

Template parameters
Gnl

Public types

using ret_info = std::vector<std::vector<int>>

Constructors, destructors, conversion operators

FMKWayGainCalc(const Gnl& hyprgraph, std::uint8_t num_parts)
Constructs a new FMKWayGainCalc object.

Public functions

auto init(gsl::span<const std::uint8_t> part) -> int -> auto
Initializes the FMKWayGainCalc object.
auto update_move_init() -> void -> auto
Resets the delta gain vector to 0.
auto update_move_2pin_net(gsl::span<const std::uint8_t> part, const MoveInfo<node_t>& move_info) -> node_t -> auto
Updates the gain for a 2-pin net after a move.
void init_idx_vec(const node_t& v, const node_t& net)
Initializes the index vector for a given vertex and net.
auto update_move_3pin_net(gsl::span<const std::uint8_t> part, const MoveInfo<node_t>& move_info) -> ret_info -> auto
Updates the gain for a 3-pin net after a move.
auto update_move_general_net(gsl::span<const std::uint8_t> part, const MoveInfo<node_t>& move_info) -> ret_info -> auto
Updates the gain for a general net after a move.

Public variables

FMPmr::vector<int> delta_gain_w
FMPmr::vector<node_t> idx_vec
bool special_handle_2pin_nets

Function documentation

template<typename Gnl>
FMKWayGainCalc<Gnl>::FMKWayGainCalc(const Gnl& hyprgraph, std::uint8_t num_parts)

Constructs a new FMKWayGainCalc object.

Parameters
hyprgraph in The netlist.
num_parts in The number of partitions.

template<typename Gnl>
auto FMKWayGainCalc<Gnl>::init(gsl::span<const std::uint8_t> part) -> int

Initializes the FMKWayGainCalc object.

Parameters
part in The partition to initialize.
Returns The total cost after initialization.

This function resets the total cost, initializes the vertex list and init gain list to 0, and then calls the _init_gain function for each net in the hypergraph.

template<typename Gnl>
auto FMKWayGainCalc<Gnl>::update_move_init() -> void

Resets the delta gain vector to 0.

This function is used to initialize the delta gain vector before updating the gains for a move.

template<typename Gnl>
auto FMKWayGainCalc<Gnl>::update_move_2pin_net(gsl::span<const std::uint8_t> part, const MoveInfo<node_t>& move_info) -> node_t

Updates the gain for a 2-pin net after a move.

Parameters
part in The current partition.
move_info in The information about the move that was performed.
Returns The updated gain for the 2-pin net.

This function updates the gain for a 2-pin net after a move has been performed. It takes the current partition and the move information as input, and returns the updated gain for the net.

template<typename Gnl>
void FMKWayGainCalc<Gnl>::init_idx_vec(const node_t& v, const node_t& net)

Initializes the index vector for a given vertex and net.

Parameters
in The vertex to initialize the index vector for.
net in The net that the vertex belongs to.

This function is used to initialize the index vector for a vertex within a net. It is likely an implementation detail of the FMKWayGainCalc class.

template<typename Gnl>
auto FMKWayGainCalc<Gnl>::update_move_3pin_net(gsl::span<const std::uint8_t> part, const MoveInfo<node_t>& move_info) -> ret_info

Updates the gain for a 3-pin net after a move.

Parameters
part in The current partition.
move_info in The information about the move that was performed.
Returns The updated gain for the 3-pin net.

This function updates the gain for a 3-pin net after a move has been performed. It takes the current partition and the move information as input, and returns the updated gain for the net.

template<typename Gnl>
auto FMKWayGainCalc<Gnl>::update_move_general_net(gsl::span<const std::uint8_t> part, const MoveInfo<node_t>& move_info) -> ret_info

Updates the gain for a general net after a move.

Parameters
part in
move_info in
Returns The updated gain for the general net.

This function updates the gain for a general net (with any number of pins) after a move has been performed. It takes the current partition and the move information as input, and returns the updated gain for the net.