Commit 5161a54
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: D88371683
fbshipit-source-id: 5da6198378d5ca282db6264ef25162938fa40f3d1 parent 0e2d094 commit 5161a54
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