Skip to content

Commit

Permalink
Fix resource_ref init
Browse files Browse the repository at this point in the history
  • Loading branch information
harrism committed Sep 10, 2024
1 parent dfa661e commit 44d9b11
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions cpp/bench/prims/neighbors/knn.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,9 @@ inline auto operator<<(std::ostream& os, const Scope& s) -> std::ostream&
struct device_resource {
public:
explicit device_resource(bool managed)
: managed_(managed ? std::make_shared<rmm::mr::managed_memory_resource>() : nullptr)
: managed_(managed ? std::make_shared<rmm::mr::managed_memory_resource>() : nullptr),
res_(managed ? managed.get() : raft::resource::get_current_device_resource_ref())
{
if (managed) {
res_ = managed.get();
} else {
res_ = raft::resource::get_current_device_resource_ref();
}
}

~device_resource() {}
Expand Down

0 comments on commit 44d9b11

Please sign in to comment.