Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions cpp/src/traversal/od_shortest_distances_impl.cuh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: Copyright (c) 2024-2025, NVIDIA CORPORATION.
* SPDX-FileCopyrightText: Copyright (c) 2024-2026, NVIDIA CORPORATION.
* SPDX-License-Identifier: Apache-2.0
*/
#pragma once
Expand Down Expand Up @@ -912,7 +912,8 @@ rmm::device_uvector<weight_t> od_shortest_distances(
h_split_thresholds.size(),
handle.get_stream());

rmm::device_uvector<key_t> tmp_buffer = std::move(far_buffers.back());
auto tmp_buffer = rmm::device_uvector<key_t>(0, handle.get_stream());
std::swap(tmp_buffer, far_buffers.back());
std::vector<key_t*> h_buffer_ptrs(h_split_thresholds.size() + 1);
auto old_size = new_near_q_keys.size();
for (size_t j = 0; j < h_buffer_ptrs.size(); ++j) {
Expand Down Expand Up @@ -994,7 +995,8 @@ rmm::device_uvector<weight_t> od_shortest_distances(
new_near_q_keys.resize(cuda::std::distance(new_near_q_keys.begin(), last),
handle.get_stream());
} else {
far_buffers[i - num_near_q_insert_buffers] = std::move(far_buffers[i]);
std::swap(far_buffers[i - num_near_q_insert_buffers], far_buffers[i]);
far_buffers[i].resize(0, handle.get_stream());
}
}

Expand Down
Loading