Commit 78f15ca
Add Kd-Tree for closest cluster lookup
Summary:
This Diff accelerates closest visibility cluster lookup via a KdTree implementation found in `axel`, an internal spatial acceleration data structure library.
The lookup changes the current (linear) search from O(N) average time to O(logN) average time. Given that we want to experiment with a higher number of clusters, performing the lookup quickly will become valuable.
As the tree class does not have a default constructor (or move construction), we manage it via a `unique_ptr`.
I also fixed a few minor issues in the surrounding IO code.
Differential Revision: D88263684
fbshipit-source-id: 7054e3b8320f99dd5c437fd7a52f1af9ac9e73961 parent f14bb9b commit 78f15ca
1 file changed
+10
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
16 | 24 | | |
17 | 25 | | |
18 | 26 | | |
| |||
71 | 79 | | |
72 | 80 | | |
73 | 81 | | |
74 | | - | |
| 82 | + | |
| 83 | + | |
75 | 84 | | |
76 | 85 | | |
77 | 86 | | |
| |||
0 commit comments