diff --git a/cpp/src/metrics/pairwise_distance.cu b/cpp/src/metrics/pairwise_distance.cu index 8412024de6..5850122b9a 100644 --- a/cpp/src/metrics/pairwise_distance.cu +++ b/cpp/src/metrics/pairwise_distance.cu @@ -58,7 +58,7 @@ void pairwiseDistance_sparse(const raft::handle_t &handle, value_t *x, raft::distance::DistanceType metric, float metric_arg) { raft::sparse::distance::distances_config_t dist_config( - const_cast(handle)); + handle); dist_config.b_nrows = x_nrows; dist_config.b_ncols = n_cols; diff --git a/cpp/src/tsne/distances.cuh b/cpp/src/tsne/distances.cuh index b89fbddc20..46c59d5eb8 100644 --- a/cpp/src/tsne/distances.cuh +++ b/cpp/src/tsne/distances.cuh @@ -94,9 +94,9 @@ void get_distances(const raft::handle_t &handle, raft::sparse::selection::brute_force_knn( input.indptr, input.indices, input.data, input.nnz, input.n, input.d, input.indptr, input.indices, input.data, input.nnz, input.n, input.d, - k_graph.knn_indices, k_graph.knn_dists, k_graph.n_neighbors, - const_cast(handle), ML::Sparse::DEFAULT_BATCH_SIZE, - ML::Sparse::DEFAULT_BATCH_SIZE, DEFAULT_DISTANCE_METRIC); + k_graph.knn_indices, k_graph.knn_dists, k_graph.n_neighbors, handle, + ML::Sparse::DEFAULT_BATCH_SIZE, ML::Sparse::DEFAULT_BATCH_SIZE, + DEFAULT_DISTANCE_METRIC); } // sparse, int64 diff --git a/cpp/src/umap/knn_graph/algo.cuh b/cpp/src/umap/knn_graph/algo.cuh index 9248d0e1c9..982630fb86 100644 --- a/cpp/src/umap/knn_graph/algo.cuh +++ b/cpp/src/umap/knn_graph/algo.cuh @@ -91,9 +91,9 @@ void launcher(const raft::handle_t &handle, raft::sparse::selection::brute_force_knn( inputsA.indptr, inputsA.indices, inputsA.data, inputsA.nnz, inputsA.n, inputsA.d, inputsB.indptr, inputsB.indices, inputsB.data, inputsB.nnz, - inputsB.n, inputsB.d, out.knn_indices, out.knn_dists, n_neighbors, - const_cast(handle), ML::Sparse::DEFAULT_BATCH_SIZE, - ML::Sparse::DEFAULT_BATCH_SIZE, raft::distance::DistanceType::L2Expanded); + inputsB.n, inputsB.d, out.knn_indices, out.knn_dists, n_neighbors, handle, + ML::Sparse::DEFAULT_BATCH_SIZE, ML::Sparse::DEFAULT_BATCH_SIZE, + raft::distance::DistanceType::L2Expanded); } template <>