-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmake_prev.cpp
More file actions
35 lines (26 loc) · 974 Bytes
/
Copy pathmake_prev.cpp
File metadata and controls
35 lines (26 loc) · 974 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
28
29
30
31
32
33
34
35
#include <chrono>
#include <iostream>
#include <boss.hpp>
int main(int argc, char const *argv[]){
std::cout << "command: $ ";
for (int i = 0; i < argc; ++i) {
std::cout << argv[i] << " ";
}
std::cout << std::endl;
std::string file = argv[1]; // it can also be a fasta
std::string out = argv[2];
size_t kmer_size = 30;
size_t num_thread = 16;
std::chrono::system_clock::time_point start, end;
double elapsed = 0;
start = std::chrono::system_clock::now();
sdsl::memory_monitor::start();
dbg_boss dbg_index(file, kmer_size, num_thread);
store_to_file(dbg_index, out);
end = std::chrono::system_clock::now();
elapsed = std::chrono::duration_cast < std::chrono::milliseconds > (end - start).count();
std::cout << "Finish. " << elapsed << "ms (" << elapsed / 60000 << "min)" << '\n';
sdsl::memory_monitor::stop();
std::cout << "Peak memory by SDSL: " << sdsl::memory_monitor::peak() / 1024 << " KB" << std::endl;
return 0;
}