Class Refine

Inheritance Relationships

Derived Types

Class Documentation

class Refine

FM 类策略的公共基类,封装共享的评估/执行上下文构造。

Subclassed by DSFM_M_Refine, DSFM_S_Refine, FMRefine, GreedyRefine, OldRefine, PMRefine

Public Functions

inline Refine(int max_hop, int large_net_threshold, double penalty, vector<vector<int>> &cut_weights, const fpga &fpgas, const TimingRefineConfig &timing_cfg)

Protected Functions

inline GainEvaluatorContext makeGainEvalContext() const
inline MoveApplierContext makeMoveApplierContext()
Gain pickMove(PerPartBucketSet &buckets, const graph &finest, const vector<VectorXi> &occupied_resources)

从多分区桶集合中选取最佳可行移动。

template<typename PickFn, typename AcceptFn, typename UpdateFn, typename ClearFn>
inline double runFMLoop(int max_move, int max_neg_move, const graph &finest, vector<int> &parts, vector<VectorXi> &occupied_resources, vector<bool> &visited_vertices_flag, vector<NetPartition> &partition, PickFn pickFn, AcceptFn acceptFn, UpdateFn updateFn, ClearFn clearFn)

增益桶驱动的通用主循环模板。

所有基于收益桶的启发式搜索(PM、FM、DSFM 等)共用此循环。 容忍短暂的负收益移动,当无法继续改进时回滚到历史最优状态。

Protected Attributes

int max_hop

最大跳步约束。

int large_net_threshold

大超边过滤阈值。

double penalty

TDM 或拥塞惩罚权重。

vector<vector<int>> &cut_weights

割边权重矩阵。

const fpga &fpgas

FPGA 平台约束。

TimingRefineConfig timing_cfg

时序细化配置。