-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmain_parallel.cpp
More file actions
27 lines (18 loc) · 913 Bytes
/
main_parallel.cpp
File metadata and controls
27 lines (18 loc) · 913 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
// Copyright (c) 2021-2023 Institute of Computing Technology, Chinese Academy of Sciences
// DIM3 is licensed under Mulan PSL v2.
#include"dim3_parallel.hpp"
// Input table R(x,y), S(z,y)
myvector<pair<int, int>> R, S;
// R join S on <y>, then project and deduplicate on <x,z>
// Output table result(x,z)
myvector<pair<int, int>> result;
int main(int argc, char* argv[]) {
gen_rand_data(R,S);
result.clear();
chrono::high_resolution_clock::time_point startTime = chrono::high_resolution_clock::now();
DIM3_parallel<int, int, int, myHasher, myHasher, myHasher, myHasher, uint32_t>::doJoinProject_parallel(R, S, result);
chrono::high_resolution_clock::time_point endTime = chrono::high_resolution_clock::now();
printf("It takes %f seconds.\n", chrono::duration<double, std::ratio<1, 1>>(endTime - startTime).count());
printf("|Result|=%u\n", result.size());
return 0;
}