Commit 0fa3e92a authored by Julien Jerphanion's avatar Julien Jerphanion

[DEBUG] Execution of query is ignored

 → python debug.py
 TypeError: 'consume' operand is not isolated
 Exception ignored in: 'KDTree.query'
 Traceback (most recent call last):
   File "/home/jjerphan/dev/kdtree/debug.py", line 18, in <module>
       tree.query(Y, knn_indices, knn_distances)
       TypeError: 'consume' operand is not isolated
parent 00be98d2
......@@ -516,7 +516,7 @@ cdef cypclass Node activable:
)
cdef cypclass QueryActor:
cdef cypclass QueryActor activable:
I_t idx_worker
I_t idx_start
......@@ -550,7 +550,8 @@ cdef cypclass QueryActor:
for idx_pt in range(idx_start, idx_end):
query_point = self.query_points + idx_pt * self.tree._n_features
reduced_dist_LB = self.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(self.tree, 0, self.query_points,
idx_pt, self.heaps, reduced_dist_LB)
int _query_single_depthfirst(self,
KDTree tree,
......@@ -739,10 +740,10 @@ cdef cypclass KDTree:
# This Counter is used as a way to implement a barrier for
# the asynchronous construction of the tree.
active Counter counter = consume Counter()
QueryActor query_actor
active QueryActor query_actor
for idx_worker in range(n_workers):
query_actor = QueryActor(
query_actor = consume QueryActor(
_query_points,
self,
heaps,
......@@ -750,7 +751,7 @@ cdef cypclass KDTree:
n_points_worker * idx_worker,
min(n_points_worker * (idx_worker + 1), n_query),
)
query_actor.query()
query_actor.query(NULL)
heaps.sort()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment