Skip to content

Commit bb563a0

Browse files
authored
Clean raft::neighbors comments (rapidsai#1665)
Rename outdated `raft::neighbors`, `raft::spatial`, `raft::sparse::distance` comments. Authors: - Anupam (https://github.com/aamijar) Approvers: - Corey J. Nolet (https://github.com/cjnolet) - Tarang Jain (https://github.com/tarang-jain) URL: rapidsai#1665
1 parent 4fbcc7f commit bb563a0

File tree

9 files changed

+29
-29
lines changed

9 files changed

+29
-29
lines changed

cpp/include/cuvs/distance/distance.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ void pairwise_distance(
389389
*
390390
* auto out = raft::make_device_matrix<float>(handle, x_nrows, y_nrows);
391391
* auto metric = cuvs::distance::DistanceType::L2Expanded;
392-
* raft::sparse::distance::pairwise_distance(handle, x.view(), y.view(), out, metric);
392+
* cuvs::pairwise_distance(handle, x.view(), y.view(), out, metric);
393393
* @endcode
394394
*
395395
* @param[in] handle raft::resources
@@ -429,7 +429,7 @@ void pairwise_distance(raft::resources const& handle,
429429
*
430430
* auto out = raft::make_device_matrix<double>(handle, x_nrows, y_nrows);
431431
* auto metric = cuvs::distance::DistanceType::L2Expanded;
432-
* raft::sparse::distance::pairwise_distance(handle, x.view(), y.view(), out, metric);
432+
* cuvs::distance::pairwise_distance(handle, x.view(), y.view(), out, metric);
433433
* @endcode
434434
*
435435
* @param[in] handle raft::resources

cpp/include/cuvs/neighbors/cagra.hpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ struct index : cuvs::neighbors::index {
484484
*
485485
* - Cagra index is normally created by the cagra::build
486486
* @code{.cpp}
487-
* using namespace raft::neighbors::experimental;
487+
* using namespace cuvs::neighbors;
488488
* auto dataset = raft::make_host_matrix<float, int64_t>(n_rows, n_cols);
489489
* load_dataset(dataset.view());
490490
* // use default index parameters
@@ -504,7 +504,7 @@ struct index : cuvs::neighbors::index {
504504
*
505505
* - Constructing index using existing knn-graph
506506
* @code{.cpp}
507-
* using namespace raft::neighbors::experimental;
507+
* using namespace cuvs::neighbors;
508508
*
509509
* auto dataset = raft::make_device_matrix<float, int64_t>(res, n_rows, n_cols);
510510
* auto knn_graph = raft::make_device_matrix<uint32_t, int64_t>(res, n_rows, graph_degree);
@@ -1166,7 +1166,7 @@ auto build(raft::resources const& res,
11661166
*
11671167
* Usage example:
11681168
* @code{.cpp}
1169-
* using namespace raft::neighbors;
1169+
* using namespace cuvs::neighbors;
11701170
* auto additional_dataset = raft::make_device_matrix<float, int64_t>(handle,add_size,dim);
11711171
* // set_additional_dataset(additional_dataset.view());
11721172
*
@@ -1204,7 +1204,7 @@ void extend(
12041204
*
12051205
* Usage example:
12061206
* @code{.cpp}
1207-
* using namespace raft::neighbors;
1207+
* using namespace cuvs::neighbors;
12081208
* auto additional_dataset = raft::make_host_matrix<float, int64_t>(handle,add_size,dim);
12091209
* // set_additional_dataset(additional_dataset.view());
12101210
*
@@ -1242,7 +1242,7 @@ void extend(
12421242
*
12431243
* Usage example:
12441244
* @code{.cpp}
1245-
* using namespace raft::neighbors;
1245+
* using namespace cuvs::neighbors;
12461246
* auto additional_dataset = raft::make_device_matrix<int8_t, int64_t>(handle,add_size,dim);
12471247
* // set_additional_dataset(additional_dataset.view());
12481248
*
@@ -1280,7 +1280,7 @@ void extend(
12801280
*
12811281
* Usage example:
12821282
* @code{.cpp}
1283-
* using namespace raft::neighbors;
1283+
* using namespace cuvs::neighbors;
12841284
* auto additional_dataset = raft::make_host_matrix<int8_t, int64_t>(handle,add_size,dim);
12851285
* // set_additional_dataset(additional_dataset.view());
12861286
*
@@ -1318,7 +1318,7 @@ void extend(
13181318
*
13191319
* Usage example:
13201320
* @code{.cpp}
1321-
* using namespace raft::neighbors;
1321+
* using namespace cuvs::neighbors;
13221322
* auto additional_dataset = raft::make_host_matrix<uint8_t, int64_t>(handle,add_size,dim);
13231323
* // set_additional_dataset(additional_dataset.view());
13241324
*
@@ -1356,7 +1356,7 @@ void extend(
13561356
*
13571357
* Usage example:
13581358
* @code{.cpp}
1359-
* using namespace raft::neighbors;
1359+
* using namespace cuvs::neighbors;
13601360
* auto additional_dataset = raft::make_host_matrix<uint8_t, int64_t>(handle,add_size,dim);
13611361
* // set_additional_dataset(additional_dataset.view());
13621362
*
@@ -2317,7 +2317,7 @@ void serialize_to_hnswlib(
23172317
*
23182318
* Usage example:
23192319
* @code{.cpp}
2320-
* using namespace raft::neighbors;
2320+
* using namespace cuvs::neighbors;
23212321
* auto dataset0 = raft::make_host_matrix<float, int64_t>(handle, size0, dim);
23222322
* auto dataset1 = raft::make_host_matrix<float, int64_t>(handle, size1, dim);
23232323
*
@@ -2352,7 +2352,7 @@ auto merge(raft::resources const& res,
23522352
*
23532353
* Usage example:
23542354
* @code{.cpp}
2355-
* using namespace raft::neighbors;
2355+
* using namespace cuvs::neighbors;
23562356
* auto dataset0 = raft::make_host_matrix<half, int64_t>(handle, size0, dim);
23572357
* auto dataset1 = raft::make_host_matrix<half, int64_t>(handle, size1, dim);
23582358
*
@@ -2387,7 +2387,7 @@ auto merge(raft::resources const& res,
23872387
*
23882388
* Usage example:
23892389
* @code{.cpp}
2390-
* using namespace raft::neighbors;
2390+
* using namespace cuvs::neighbors;
23912391
* auto dataset0 = raft::make_host_matrix<int8_t, int64_t>(handle, size0, dim);
23922392
* auto dataset1 = raft::make_host_matrix<int8_t, int64_t>(handle, size1, dim);
23932393
*
@@ -2422,7 +2422,7 @@ auto merge(raft::resources const& res,
24222422
*
24232423
* Usage example:
24242424
* @code{.cpp}
2425-
* using namespace raft::neighbors;
2425+
* using namespace cuvs::neighbors;
24262426
* auto dataset0 = raft::make_host_matrix<uint8_t, int64_t>(handle, size0, dim);
24272427
* auto dataset1 = raft::make_host_matrix<uint8_t, int64_t>(handle, size1, dim);
24282428
*

cpp/include/cuvs/neighbors/hnsw.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ struct extend_params {
185185
* Usage example:
186186
* @code{.cpp}
187187
* // Build a CAGRA index
188-
* using namespace raft::neighbors;
188+
* using namespace cuvs::neighbors;
189189
* // use default index parameters
190190
* cagra::index_params index_params;
191191
* // create and fill the index from a [N, D] dataset
@@ -221,7 +221,7 @@ std::unique_ptr<index<float>> from_cagra(
221221
* Usage example:
222222
* @code{.cpp}
223223
* // Build a CAGRA index
224-
* using namespace raft::neighbors;
224+
* using namespace cuvs::neighbors;
225225
* // use default index parameters
226226
* cagra::index_params index_params;
227227
* // create and fill the index from a [N, D] dataset
@@ -257,7 +257,7 @@ std::unique_ptr<index<half>> from_cagra(
257257
* Usage example:
258258
* @code{.cpp}
259259
* // Build a CAGRA index
260-
* using namespace raft::neighbors;
260+
* using namespace cuvs::neighbors;
261261
* // use default index parameters
262262
* cagra::index_params index_params;
263263
* // create and fill the index from a [N, D] dataset
@@ -293,7 +293,7 @@ std::unique_ptr<index<uint8_t>> from_cagra(
293293
* Usage example:
294294
* @code{.cpp}
295295
* // Build a CAGRA index
296-
* using namespace raft::neighbors;
296+
* using namespace cuvs::neighbors;
297297
* // use default index parameters
298298
* cagra::index_params index_params;
299299
* // create and fill the index from a [N, D] dataset

cpp/include/cuvs/neighbors/ivf_pq.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2846,7 +2846,7 @@ void make_rotation_matrix(raft::resources const& res,
28462846

28472847
/**
28482848
* @brief Public helper API for externally modifying the index's IVF centroids.
2849-
* NB: The index must be reset before this. Use raft::neighbors::ivf_pq::extend to construct IVF
2849+
* NB: The index must be reset before this. Use cuvs::neighbors::ivf_pq::extend to construct IVF
28502850
lists according to new centroids.
28512851
*
28522852
* Usage example:

cpp/src/neighbors/ball_cover.cuh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ void all_knn_query(raft::resources const& handle,
130130
* #include <raft/core/resources.hpp>
131131
* #include <cuvs/neighbors/ball_cover.hpp>
132132
* #include <cuvs/distance/distance.hpp>
133-
* using namespace raft::neighbors;
133+
* using namespace cuvs::neighbors;
134134
*
135135
* raft::resources handle;
136136
* ...

cpp/src/neighbors/ivf_flat/ivf_flat_build.cuh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ RAFT_KERNEL build_index_kernel(const LabelT* labels,
162162
}
163163
}
164164

165-
/** See raft::neighbors::ivf_flat::extend docs */
165+
/** See cuvs::neighbors::ivf_flat::extend docs */
166166
template <typename T, typename IdxT>
167167
void extend(raft::resources const& handle,
168168
index<T, IdxT>* index,
@@ -361,7 +361,7 @@ void extend(raft::resources const& handle,
361361
}
362362
}
363363

364-
/** See raft::neighbors::ivf_flat::extend docs */
364+
/** See cuvs::neighbors::ivf_flat::extend docs */
365365
template <typename T, typename IdxT>
366366
auto extend(raft::resources const& handle,
367367
const index<T, IdxT>& orig_index,
@@ -374,7 +374,7 @@ auto extend(raft::resources const& handle,
374374
return ext_index;
375375
}
376376

377-
/** See raft::neighbors::ivf_flat::build docs */
377+
/** See cuvs::neighbors::ivf_flat::build docs */
378378
template <typename T, typename IdxT>
379379
inline auto build(raft::resources const& handle,
380380
const index_params& params,
@@ -435,7 +435,7 @@ inline auto build(raft::resources const& handle,
435435
/**
436436
* Build an index that can be used in refinement operation.
437437
*
438-
* See raft::neighbors::refine for details on the refinement operation.
438+
* See cuvs::neighbors::refine for details on the refinement operation.
439439
*
440440
* The returned index cannot be used for a regular ivf_flat::search. The index misses information
441441
* about coarse clusters. Instead, the neighbor candidates are assumed to form clusters, one for

cpp/src/neighbors/ivf_flat/ivf_flat_search.cuh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#include "../ivf_common.cuh" // cuvs::neighbors::detail::ivf
1111
#include "ivf_flat_interleaved_scan_ext.cuh" // interleaved_scan
1212
#include <cuvs/neighbors/common.hpp> // none_sample_filter
13-
#include <cuvs/neighbors/ivf_flat.hpp> // raft::neighbors::ivf_flat::index
13+
#include <cuvs/neighbors/ivf_flat.hpp> // cuvs::neighbors::ivf_flat::index
1414

1515
#include "../detail/ann_utils.cuh" // utils::mapping
1616
#include <cuvs/distance/distance.hpp> // is_min_close, DistanceType
@@ -296,7 +296,7 @@ void search_impl(raft::resources const& handle,
296296
stream);
297297
}
298298

299-
/** See raft::neighbors::ivf_flat::search docs */
299+
/** See cuvs::neighbors::ivf_flat::search docs */
300300
template <typename T,
301301
typename IdxT,
302302
typename IvfSampleFilterT = cuvs::neighbors::filtering::none_sample_filter>

cpp/src/neighbors/ivf_pq/ivf_pq_build.cuh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -906,7 +906,7 @@ auto clone(const raft::resources& res, const index<IdxT>& source) -> index<IdxT>
906906

907907
/**
908908
* Extend the index in-place.
909-
* See raft::spatial::knn::ivf_pq::extend docs.
909+
* See cuvs::spatial::knn::ivf_pq::extend docs.
910910
*/
911911
template <typename T, typename IdxT>
912912
void extend(raft::resources const& handle,
@@ -1108,7 +1108,7 @@ void extend(raft::resources const& handle,
11081108

11091109
/**
11101110
* Create a new index that contains more data.
1111-
* See raft::spatial::knn::ivf_pq::extend docs.
1111+
* See cuvs::spatial::knn::ivf_pq::extend docs.
11121112
*/
11131113
template <typename T, typename IdxT>
11141114
auto extend(raft::resources const& handle,

cpp/src/neighbors/ivf_pq/ivf_pq_search.cuh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -821,7 +821,7 @@ inline auto get_centers(const raft::resources& res, const index<IdxT>& index)
821821
if constexpr (std::is_same_v<T, int8_t>) { return index.centers_int8(res); }
822822
}
823823

824-
/** See raft::spatial::knn::ivf_pq::search docs */
824+
/** See cuvs::spatial::knn::ivf_pq::search docs */
825825
template <typename T,
826826
typename IdxT,
827827
typename IvfSampleFilterT = cuvs::neighbors::filtering::none_sample_filter>

0 commit comments

Comments
 (0)