?? hgraph.hpp
字號:
#ifndef HGRAPH_HPP#define HGRAPH_HPP#ifndef NULL#define NULL 0#endif#define other(num) ((num)?0:1)#define LOCKED -10000#include "ll.hpp"extern int SEED; // random seed for initial partitioningextern double RATIO; // ratio of balance between partitionstypedef LL *ll; // ptr to a linked liststruct net; // predefine netstruct cell{int number; // index # of cell in cells arrayLL first; // ll of nets on cellnode *gainbucket; // ptr to cell in the bucket listsint block; // which block (partition) the cell is inint gain; // gain of cellint gainfromlock; // gain from moving and locking cellcell(int num,int side); // constructorcell() {} // default constructor};struct net{int number; // number of cells on netLL first; // ll of cells on netint unlock[2]; // # of unlocked cells in each blockint lock[2]; // # of locked cells in each blocknet(int num); // constructor, assigns num to numbernet() {} // default constructor};class parthgraph{private:int numcells; // number of cells in hgraphint numnets; // number of nets in hgraphdouble ratio; // ratio of balance between the blocksint minsize[2]; //cell *cells; // array of cells in hgraphnet *nets; // array of nets in hgraphint pmax; // max number of pins per cellll buckets[2]; // buckets for gain updatesLL free; // ll of free cellsint maxgain[2]; // max gain of any cell in each blockint balance[2];int passes; // number of passespublic:parthgraph(void){} // constructorvoid getgraph(char* filename); // loads hgraph filename from diskvoid part(void); // performs partitioningvoid initgains(void); // initializes gains and bucketsvoid swapall(void);void getprefix(int& prenum);void reinit(int prenum);cell* gethighest(void);void fixgain(LL &first,int operation,int single=0,int sameside=0);int cutset(void);void print(char *str);// debug functionsvoid printCells(); // printout cell infovoid printBucket(); // printout top buckets};#endif
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -