-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmain.cpp
More file actions
27 lines (21 loc) · 732 Bytes
/
main.cpp
File metadata and controls
27 lines (21 loc) · 732 Bytes
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
#include <iostream>
#include "Args.h"
#include "Graph.h"
int main(int argc, char* argv[]) {
EdgeList* el;
setbuf(stdout, NULL);
clock_t begin = clock();
Args* args = new Args();
args->parse_args(argc, argv);
FILE* d_file = fopen(args->address, "r");
printf("Reading edgelist from file %s\n", args->address);
Graph g = Graph(d_file, args->NT, args->topk, args->h, args->p);
clock_t io_end = clock();
g.findLhCDS();
g.output(args->ds_address);
clock_t end = clock();
double io_secs = double(io_end - begin) / CLOCKS_PER_SEC;
double elapsed_secs = double(end - begin) / CLOCKS_PER_SEC;
printf("io time: %.4f, total time: %.4f\n", io_secs, elapsed_secs);
return 0;
}