.. _program_listing_file_src_partition_refine_engine_GainEvaluator.h: Program Listing for File GainEvaluator.h ======================================== |exhale_lsh| :ref:`Return to documentation for file ` (``src/partition/refine/engine/GainEvaluator.h``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp #ifndef PARTITION_REFINE_ENGINE_GAINEVALUATOR_H_ #define PARTITION_REFINE_ENGINE_GAINEVALUATOR_H_ #include "refine/core/RefineTypes.h" struct GainEvaluatorContext { int max_hop; int large_net_threshold; double penalty; vector> &cut_weights; const fpga &fpgas; const TimingRefineConfig &timing_cfg; }; struct CutMatrixResultCore { double cut_origin = 0.0; double cut_after = 0.0; vector cuts_origin_flat; vector cuts_after_flat; }; struct GainComponents { CutMatrixResultCore cm; int topo_gain = 0; double io_gain = 0.0; double cut_gain = 0.0; }; class GainEvaluatorCore { public: static void buildCutMatrices(const GainEvaluatorContext &ctx, int v, int from, int to, const vector &partition, const graph &hgraph, const vector &parts, CutMatrixResultCore &result); static bool computeGainComponents(const GainEvaluatorContext &ctx, int v, int from, int to, const vector &partition, const graph &hgraph, const vector &parts, GainComponents &out); static Gain evaluate(const GainEvaluatorContext &ctx, int v, int from, int to, const vector &partition, const graph &hgraph, vector &parts); static Gain evaluateParallel(const GainEvaluatorContext &ctx, int v, int from, int to, const vector &partition, const graph &hgraph, vector &parts, HSFullTiming::HSTimingDelta *delta); }; #endif