Skip to content

Commit

Permalink
Eliminate literals passed to device_uvector::set_element_async (#367)
Browse files Browse the repository at this point in the history
After rapidsai/rmm#725 is merged, this PR updates cuspatial to eliminate passing literal values to `device_uvector::set_element_async`.

Authors:
  - Mark Harris (@harrism)

Approvers:
  - Paul Taylor (@trxcllnt)
  - Christopher Harris (@cwharris)

URL: #367
  • Loading branch information
harrism authored Mar 18, 2021
1 parent d5535a9 commit d43f506
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion cpp/src/join/detail/traversal.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ descend_quadtree(LengthsIter counts,
thrust::inclusive_scan(
rmm::exec_policy(stream), parent_counts, parent_counts + num_quads, parent_offsets.begin() + 1);

parent_offsets.set_element_async(0, 0, stream);
uint32_t init{0};
parent_offsets.set_element_async(0, init, stream);

auto num_children = parent_offsets.back_element(stream); // synchronizes stream

Expand Down
3 changes: 2 additions & 1 deletion cpp/src/join/quadtree_point_in_polygon.cu
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,8 @@ struct compute_quadtree_point_in_polygon {
local_point_offsets.begin() + 1);

// Ensure local point offsets starts at 0
local_point_offsets.set_element_async(0, 0, stream);
uint32_t init{0};
local_point_offsets.set_element_async(0, init, stream);

// The last element is the total number of points to test against any polygon.
auto num_total_points = local_point_offsets.back_element(stream);
Expand Down

0 comments on commit d43f506

Please sign in to comment.