-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathIMCScheduler.cpp
36 lines (36 loc) · 1.05 KB
/
IMCScheduler.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include "Scheduler.h"
int main()
{
ifstream fin;
fin.open("benchmarks.txt", ios::in);
std::ofstream ofCSV;
string strResultName = "result.csv";
ofCSV.open(strResultName.c_str(), std::ofstream::out, _SH_DENYWR);
string strBench, strLine;
int nBound;
istringstream sstream;
while (getline(fin, strLine))
{
nBound = -1;
sstream.clear();
sstream.str(strLine);
sstream >> strBench >> nBound;
Scheduler MyScheduler;
MyScheduler.m_netlist.m_strBench = strBench;
MyScheduler.m_netlist.ReadFromFile(strBench); //XMG netlist (.v / .bliff / .aig)
//MyScheduler.m_netlist.ConfigForNOR(strBench); //NOR netlist (.v)
if (nBound == -1)
MyScheduler.m_nBound = MyScheduler.m_netlist.m_vecNode.size();
else
MyScheduler.m_nBound = nBound;
MyScheduler.ThreadIterPartScheduler();
MyScheduler.m_netlist.ConfigMF();
ofCSV << MyScheduler.m_netlist.m_strBench << "," << MyScheduler.m_netlist.m_nSize
<< "," << MyScheduler.m_netlist.m_nMF << "\n";
ofCSV.flush();
}
getchar();
fin.close();
ofCSV.close();
return 0;
}