forked from CGCL-codes/Frog
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgraphread.cpp
More file actions
49 lines (36 loc) · 1 KB
/
Copy pathgraphread.cpp
File metadata and controls
49 lines (36 loc) · 1 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
#include <stdio.h>
#include <stdio.h>
#include <string>
#include "../preprocessing/PreProcessing.hpp"
//#include "InitGPUDevice.h"
#include "../gpuengine/initGPU.h"
using namespace std;
int main(int argc, char *argv[])
{
if(argc < 3)
{
std::cout << "main input error." << std::endl;
exit(-1);
}
std::string file_name = argv[1];
int chunk = atoi(argv[2]);
PreProcessing pre;
pre.get_partition(file_name, chunk);
pre.debug_print_vertex(chunk);
//pre.get_chunk_vv(file_name, chunk-1, chunk);
//pre.debug_print_chunk(chunk-1);
pre.get_all_edges(file_name);
//std::cout << "The total number of edges is " << pre.ev.get_edge_num();
/*
int i = 0, total = 0;
while(i < chunk)
{
std::cout << "processing chunk num is " << i << std::endl;
total += pre.get_chunk_edges(i++, file_name);
}
std::cout << "Total edge num is " << total <<std::endl;
*/
std::cout << "......Preprossing Complete !" << std::endl;
std::cout << "Init GPU Device..." << std::endl;
int device_num = get_device_count();
}