Skip to content
Snippets Groups Projects
Commit fd626b3f authored by Matt Wala's avatar Matt Wala
Browse files

Fix off-by-one error.

parent 19ac24a3
No related branches found
No related tags found
No related merge requests found
...@@ -611,14 +611,15 @@ class LeavesToBallsLookupBuilder(object): ...@@ -611,14 +611,15 @@ class LeavesToBallsLookupBuilder(object):
logger.info("leaves-to-balls lookup: expand starts") logger.info("leaves-to-balls lookup: expand starts")
nkeys = len(area_query.leaves_near_ball_lists) nkeys = len(area_query.leaves_near_ball_lists)
nballs = len(area_query.leaves_near_ball_starts) nballs_p_1 = len(area_query.leaves_near_ball_starts)
assert nballs_p_1 == len(ball_radii) + 1
starts_expander_knl = self.get_starts_expander_kernel(tree.box_id_dtype) starts_expander_knl = self.get_starts_expander_kernel(tree.box_id_dtype)
expanded_starts = cl.array.empty(queue, nkeys, tree.box_id_dtype) expanded_starts = cl.array.empty(queue, nkeys, tree.box_id_dtype)
evt = starts_expander_knl( evt = starts_expander_knl(
expanded_starts, expanded_starts,
area_query.leaves_near_ball_starts.with_queue(queue), area_query.leaves_near_ball_starts.with_queue(queue),
nballs + 1) nballs_p_1)
wait_for = [evt] wait_for = [evt]
logger.info("leaves-to-balls lookup: key-value sort") logger.info("leaves-to-balls lookup: key-value sort")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment