Skip to content

Commit 07e422b

Browse files
authored
Documentation Fixes (#1301)
This fixes all the warnings in the docs build, and enables warnings as errors to prevent future regressions Authors: - Ben Frederickson (https://github.com/benfred) - Corey J. Nolet (https://github.com/cjnolet) Approvers: - Corey J. Nolet (https://github.com/cjnolet) - Kyle Edwards (https://github.com/KyleFromNVIDIA) URL: #1301
1 parent 703a102 commit 07e422b

45 files changed

Lines changed: 1047 additions & 593 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ if hasArg docs; then
517517
cd "${DOXYGEN_BUILD_DIR}"
518518
doxygen Doxyfile
519519
cd "${SPHINX_BUILD_DIR}"
520-
sphinx-build -b html source _html
520+
sphinx-build -W -b html source _html
521521
cd "${REPODIR}"/rust
522522
cargo doc -p cuvs --no-deps
523523
rsync -av "${RUST_BUILD_DIR}"/doc/ "${SPHINX_BUILD_DIR}"/_html/_static/rust

cpp/doxygen/Doxyfile

Lines changed: 781 additions & 428 deletions
Large diffs are not rendered by default.

cpp/include/cuvs/neighbors/brute_force.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2024, NVIDIA CORPORATION.
2+
* Copyright (c) 2024-2025, NVIDIA CORPORATION.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -167,7 +167,7 @@ cuvsError_t cuvsBruteForceSearch(cuvsResources_t res,
167167
*/
168168

169169
/**
170-
* @defgroup bruteforce_c_serialize BRUTEFORCE C-API serialize functions
170+
* @defgroup bruteforce_c_index_serialize BRUTEFORCE C-API serialize functions
171171
* @{
172172
*/
173173
/**

cpp/include/cuvs/neighbors/cagra.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,7 @@ cuvsError_t cuvsCagraSearch(cuvsResources_t res,
605605
*/
606606

607607
/**
608-
* @defgroup cagra_c_serialize CAGRA C-API serialize functions
608+
* @defgroup cagra_c_index_serialize CAGRA C-API serialize functions
609609
* @{
610610
*/
611611
/**

cpp/include/cuvs/neighbors/cagra.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,11 +340,13 @@ struct index : cuvs::neighbors::index {
340340
}
341341

342342
// Don't allow copying the index for performance reasons (try avoiding copying data)
343+
/** \cond */
343344
index(const index&) = delete;
344345
index(index&&) = default;
345346
auto operator=(const index&) -> index& = delete;
346347
auto operator=(index&&) -> index& = default;
347348
~index() = default;
349+
/** \endcond */
348350

349351
/** Construct an empty index. */
350352
index(raft::resources const& res,

cpp/include/cuvs/neighbors/common.hpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,6 +491,7 @@ struct base_filter {
491491

492492
/* A filter that filters nothing. This is the default behavior. */
493493
struct none_sample_filter : public base_filter {
494+
/** \cond */
494495
constexpr __forceinline__ _RAFT_HOST_DEVICE bool operator()(
495496
// query index
496497
const uint32_t query_ix,
@@ -504,7 +505,7 @@ struct none_sample_filter : public base_filter {
504505
const uint32_t query_ix,
505506
// the index of the current sample
506507
const uint32_t sample_ix) const;
507-
508+
/** \endcond */
508509
FilterType get_filter_type() const override { return FilterType::None; }
509510
};
510511

@@ -523,6 +524,7 @@ struct ivf_to_sample_filter : public base_filter {
523524

524525
ivf_to_sample_filter(const index_t* const* inds_ptrs, const filter_t next_filter);
525526

527+
/** \cond */
526528
/** If the original filter takes three arguments, then don't modify the arguments.
527529
* If the original filter takes two arguments, then we are using `inds_ptr_` to obtain the sample
528530
* index.
@@ -536,6 +538,7 @@ struct ivf_to_sample_filter : public base_filter {
536538
const uint32_t sample_ix) const;
537539

538540
FilterType get_filter_type() const override { return next_filter_.get_filter_type(); }
541+
/** \endcond */
539542
};
540543

541544
/**
@@ -552,11 +555,13 @@ struct bitmap_filter : public base_filter {
552555
const view_t bitmap_view_;
553556

554557
bitmap_filter(const view_t bitmap_for_filtering);
558+
/** \cond */
555559
inline _RAFT_HOST_DEVICE bool operator()(
556560
// query index
557561
const uint32_t query_ix,
558562
// the index of the current sample
559563
const uint32_t sample_ix) const;
564+
/** \endcond */
560565

561566
FilterType get_filter_type() const override { return FilterType::Bitmap; }
562567

@@ -579,12 +584,14 @@ struct bitset_filter : public base_filter {
579584
// View of the bitset to use as a filter
580585
const view_t bitset_view_;
581586

587+
/** \cond */
582588
_RAFT_HOST_DEVICE bitset_filter(const view_t bitset_for_filtering);
583589
constexpr __forceinline__ _RAFT_HOST_DEVICE bool operator()(
584590
// query index
585591
const uint32_t query_ix,
586592
// the index of the current sample
587593
const uint32_t sample_ix) const;
594+
/** \endcond */
588595

589596
FilterType get_filter_type() const override { return FilterType::Bitset; }
590597

cpp/include/cuvs/neighbors/hnsw.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2024, NVIDIA CORPORATION.
2+
* Copyright (c) 2024-2025, NVIDIA CORPORATION.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -369,7 +369,7 @@ cuvsError_t cuvsHnswSearch(cuvsResources_t res,
369369
*/
370370

371371
/**
372-
* @defgroup hnsw_c_serialize HNSW C-API serialize functions
372+
* @defgroup hnsw_c_index_serialize HNSW C-API serialize functions
373373
* @{
374374
*/
375375

cpp/include/cuvs/neighbors/hnsw.hpp

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,9 @@ cuvs::neighbors::cagra::index_params to_cagra_params(
9797
int ef_construction,
9898
cuvs::distance::DistanceType metric = cuvs::distance::DistanceType::L2Expanded);
9999

100-
/**@}*/
100+
/**
101+
* @}
102+
*/
101103

102104
/**
103105
* @defgroup hnsw_cpp_index hnswlib index wrapper
@@ -127,7 +129,7 @@ struct index : cuvs::neighbors::index {
127129
/**
128130
@brief Get underlying index
129131
*/
130-
virtual auto get_index() const -> void const* = 0;
132+
virtual void const* get_index() const = 0;
131133

132134
auto dim() const -> int const { return dim_; }
133135

@@ -146,7 +148,9 @@ struct index : cuvs::neighbors::index {
146148
HnswHierarchy hierarchy_;
147149
};
148150

149-
/**@}*/
151+
/**
152+
* @}
153+
*/
150154

151155
/**
152156
* @defgroup hnsw_cpp_extend_params HNSW index extend parameters
@@ -308,7 +312,9 @@ std::unique_ptr<index<int8_t>> from_cagra(
308312
std::optional<raft::host_matrix_view<const int8_t, int64_t, raft::row_major>> dataset =
309313
std::nullopt);
310314

311-
/**@}*/
315+
/**
316+
* @}
317+
*/
312318

313319
/**
314320
* @defgroup hnsw_cpp_index_extend Extend HNSW index with additional vectors
@@ -342,6 +348,7 @@ std::unique_ptr<index<int8_t>> from_cagra(
342348
* auto additional_dataset = raft::make_host_matrix<float>(res, add_size, index->dim());
343349
* hnsw::extend_params extend_params;
344350
* hnsw::extend(res, extend_params, additional_dataset, *hnsw_index.get());
351+
* @endcode
345352
*/
346353
void extend(raft::resources const& res,
347354
const extend_params& params,
@@ -375,6 +382,7 @@ void extend(raft::resources const& res,
375382
* auto additional_dataset = raft::make_host_matrix<half>(res, add_size, index->dim());
376383
* hnsw::extend_params extend_params;
377384
* hnsw::extend(res, extend_params, additional_dataset, *hnsw_index.get());
385+
* @endcode
378386
*/
379387
void extend(raft::resources const& res,
380388
const extend_params& params,
@@ -408,6 +416,7 @@ void extend(raft::resources const& res,
408416
* auto additional_dataset = raft::make_host_matrix<uint8_t>(res, add_size, index->dim());
409417
* hnsw::extend_params extend_params;
410418
* hnsw::extend(res, extend_params, additional_dataset, *hnsw_index.get());
419+
* @endcode
411420
*/
412421
void extend(raft::resources const& res,
413422
const extend_params& params,
@@ -441,13 +450,16 @@ void extend(raft::resources const& res,
441450
* auto additional_dataset = raft::make_host_matrix<int8_t>(res, add_size, index->dim());
442451
* hnsw::extend_params extend_params;
443452
* hnsw::extend(res, extend_params, additional_dataset, *hnsw_index.get());
453+
* @endcode
444454
*/
445455
void extend(raft::resources const& res,
446456
const extend_params& params,
447457
raft::host_matrix_view<const int8_t, int64_t, raft::row_major> additional_dataset,
448458
index<int8_t>& idx);
449459

450-
/**@} */
460+
/**
461+
* @}
462+
*/
451463

452464
/**
453465
* @defgroup hnsw_cpp_search_params Build CAGRA index and search with hnswlib
@@ -460,7 +472,9 @@ struct search_params : cuvs::neighbors::search_params {
460472
// automatically maximizes parallelism
461473
};
462474

463-
/**@}*/
475+
/**
476+
* @}
477+
*/
464478

465479
// TODO: Filtered Search APIs: https://github.com/rapidsai/cuvs/issues/363
466480

@@ -645,7 +659,9 @@ void search(raft::resources const& res,
645659
raft::host_matrix_view<uint64_t, int64_t, raft::row_major> neighbors,
646660
raft::host_matrix_view<float, int64_t, raft::row_major> distances);
647661

648-
/**@}*/
662+
/**
663+
* @}
664+
*/
649665

650666
/**
651667
* @defgroup hnsw_cpp_index_serialize Deserialize CAGRA index as hnswlib index
@@ -940,7 +956,9 @@ void deserialize(raft::resources const& res,
940956
cuvs::distance::DistanceType metric,
941957
index<int8_t>** index);
942958

943-
/**@}*/
959+
/**
960+
* @}
961+
*/
944962

945963
} // namespace cuvs::neighbors::hnsw
946964

cpp/include/cuvs/neighbors/ivf_flat.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ cuvsError_t cuvsIvfFlatSearch(cuvsResources_t res,
300300
*/
301301

302302
/**
303-
* @defgroup ivf_flat_c_serialize IVF-Flat C-API serialize functions
303+
* @defgroup ivf_flat_c_index_serialize IVF-Flat C-API serialize functions
304304
* @{
305305
*/
306306
/**

cpp/include/cuvs/neighbors/ivf_pq.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ cuvsError_t cuvsIvfPqSearch(cuvsResources_t res,
405405
*/
406406

407407
/**
408-
* @defgroup ivf_pq_c_serialize IVF-PQ C-API serialize functions
408+
* @defgroup ivf_pq_c_index_serialize IVF-PQ C-API serialize functions
409409
* @{
410410
*/
411411
/**

0 commit comments

Comments
 (0)