-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.cc
74 lines (63 loc) · 1.75 KB
/
main.cc
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#include <unistd.h>
#include <algorithm>
#include <cassert>
#include <cstdlib>
#include <fstream>
#include <iostream>
#include <string>
#include <vector>
#include "include/align.h"
#include "include/debug.h"
using namespace std;
int main(int argc, char **argv) {
int match = 2, mis = 2, gap = 3;
int n_devices = 1, grid_size = 68, block_size = 128, n_threads = 1;
int mode = 1;
string gname, rname;
int opt;
while ((opt = getopt(argc, argv, "g:r:m:n:o:d:b:t:c:x:")) != -1) {
switch (opt) {
case 'g':
gname = optarg;
break;
case 'r':
rname = optarg;
break;
case 'm':
match = atoi(optarg);
break;
case 'n':
mis = atoi(optarg);
break;
case 'o':
gap = atoi(optarg);
break;
case 'd':
n_devices = atoi(optarg);
break;
case 'b':
grid_size = atoi(optarg);
break;
case 't':
block_size = atoi(optarg);
break;
case 'c':
n_threads = atoi(optarg);
break;
case 'x':
mode = atoi(optarg);
break;
default:
abort();
}
}
assert(!gname.empty());
assert(!rname.empty());
Align aln(match, mis, gap, n_devices, grid_size, block_size, n_threads, mode);
debug(gname, rname, aln.match, aln.mis, aln.gap);
debug(aln.n_devices, aln.grid_size, aln.block_size, aln.n_threads, aln.mode);
aln.input_graph(gname);
aln.input_reads(rname);
graph_align(aln);
return 0;
}