2014-01-17 11:53:50 +08:00
|
|
|
//#define DEBUG 1
|
|
|
|
|
//#define DEBUG0_1 1
|
|
|
|
|
//#define DEBUG3 1
|
2014-01-19 03:07:23 +08:00
|
|
|
#include "headers.h"
|
2014-01-17 11:53:50 +08:00
|
|
|
#include "template.h"
|
2014-01-19 03:07:23 +08:00
|
|
|
#include "utils.h"
|
2014-01-23 02:52:41 +08:00
|
|
|
#include "LoadTimeInitializer.h"
|
2014-01-15 09:26:55 +08:00
|
|
|
|
2014-01-17 11:53:50 +08:00
|
|
|
using namespace std;
|
2014-01-23 02:52:41 +08:00
|
|
|
|
2014-01-17 11:53:50 +08:00
|
|
|
int main(int argc, char** argv)
|
2014-01-15 09:26:55 +08:00
|
|
|
{
|
2014-01-17 11:53:50 +08:00
|
|
|
if(argc < 2)
|
|
|
|
|
{
|
|
|
|
|
cerr << "Needs path to input file as argument\n";
|
|
|
|
|
exit(0);
|
|
|
|
|
}
|
|
|
|
|
bool use_old_read_testcase = false;
|
|
|
|
|
if(argc >= 3 && string(argv[2]) == "1")
|
|
|
|
|
use_old_read_testcase = true;
|
2014-02-07 03:01:33 +08:00
|
|
|
unsigned chunk_size = 10000;
|
2014-01-21 00:51:53 +08:00
|
|
|
if(argc >= 4)
|
|
|
|
|
chunk_size = strtol(argv[3],0,10);
|
|
|
|
|
|
2014-02-07 03:01:33 +08:00
|
|
|
do_compute(argv[1], use_old_read_testcase, chunk_size);
|
2014-01-17 11:53:50 +08:00
|
|
|
|
|
|
|
|
return 0;
|
2014-01-15 09:26:55 +08:00
|
|
|
}
|
|
|
|
|
|