Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
K
kdtree
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cython-plus
kdtree
Commits
00be98d2
Commit
00be98d2
authored
Nov 22, 2021
by
Julien Jerphanion
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[DEBUG] Query
parent
5951d2e3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
8 deletions
+23
-8
kdtree.pyx
kdtree.pyx
+23
-8
No files found.
kdtree.pyx
View file @
00be98d2
...
@@ -518,6 +518,13 @@ cdef cypclass Node activable:
...
@@ -518,6 +518,13 @@ cdef cypclass Node activable:
cdef
cypclass
QueryActor
:
cdef
cypclass
QueryActor
:
I_t
idx_worker
I_t
idx_start
I_t
idx_end
KDTree
tree
D_t
*
query_points
NeighborsHeaps
heaps
__init__
(
__init__
(
self
,
self
,
D_t
*
query_points
,
D_t
*
query_points
,
...
@@ -527,16 +534,23 @@ cdef cypclass QueryActor:
...
@@ -527,16 +534,23 @@ cdef cypclass QueryActor:
I_t
idx_start
,
I_t
idx_start
,
I_t
idx_end
,
I_t
idx_end
,
):
):
printf
(
"QueryActor: (%d, %d, %d)
\
n
"
,
idx_worker
,
idx_start
,
idx_end
)
self
.
idx_worker
=
idx_worker
cdef
I_t
idx_pt
self
.
idx_start
=
idx_start
cdef
D_t
*
query_point
self
.
idx_end
=
idx_end
cdef
D_t
reduced_dist_LB
self
.
tree
=
tree
self
.
query_points
=
query_points
self
.
heaps
=
heaps
int
query
(
self
)
except
-
1
:
cdef
:
I_t
idx_pt
D_t
*
query_point
D_t
reduced_dist_LB
for
idx_pt
in
range
(
idx_start
,
idx_end
):
for
idx_pt
in
range
(
idx_start
,
idx_end
):
printf
(
"query %d
\
n
"
,
idx_pt
)
query_point
=
self
.
query_points
+
idx_pt
*
self
.
tree
.
_n_features
query_point
=
query_points
+
idx_pt
*
tree
.
_n_features
reduced_dist_LB
=
self
.
tree
.
min_rdist
(
0
,
query_point
)
reduced_dist_LB
=
tree
.
min_rdist
(
0
,
query_point
)
self
.
_query_single_depthfirst
(
self
.
tree
,
0
,
self
.
query_points
,
idx_pt
,
self
.
heaps
,
reduced_dist_LB
)
self
.
_query_single_depthfirst
(
tree
,
0
,
query_points
,
idx_pt
,
heaps
,
reduced_dist_LB
)
int
_query_single_depthfirst
(
self
,
int
_query_single_depthfirst
(
self
,
KDTree
tree
,
KDTree
tree
,
...
@@ -736,6 +750,7 @@ cdef cypclass KDTree:
...
@@ -736,6 +750,7 @@ cdef cypclass KDTree:
n_points_worker
*
idx_worker
,
n_points_worker
*
idx_worker
,
min
(
n_points_worker
*
(
idx_worker
+
1
),
n_query
),
min
(
n_points_worker
*
(
idx_worker
+
1
),
n_query
),
)
)
query_actor
.
query
()
heaps
.
sort
()
heaps
.
sort
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment