Skip to content

Commit

Permalink
Getting a start on the docs
Browse files Browse the repository at this point in the history
  • Loading branch information
cjnolet committed Mar 7, 2024
1 parent b94c1b5 commit e851903
Show file tree
Hide file tree
Showing 15 changed files with 60 additions and 44 deletions.
1 change: 1 addition & 0 deletions cpp/doxygen/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -864,6 +864,7 @@ INPUT_ENCODING = UTF-8
# *.vhdl, *.ucf, *.qsf and *.ice.

FILE_PATTERNS = *.hpp \
*.h \
*.cuh

# The RECURSIVE tag can be used to specify whether or not subdirectories should
Expand Down
14 changes: 7 additions & 7 deletions cpp/include/cuvs/core/c_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,18 @@

#pragma once

#include <cuda_runtime.h>
#include <stdint.h>

#include <cuda_runtime.h>
#ifdef __cplusplus
extern "C" {
#endif

/**
* @defgroup c_api C API Core Types and Functions
* @{
*/

#ifdef __cplusplus
extern "C" {
#endif

/**
* @brief An opaque C handle for C++ type `raft::resources`
*
Expand Down Expand Up @@ -77,8 +76,9 @@ const char* cuvsGetLastErrorText();
* clears any previously seen error message.
*/
void cuvsSetLastErrorText(const char* error);

/** @} */

#ifdef __cplusplus
}
#endif

/** @} */
18 changes: 9 additions & 9 deletions cpp/include/cuvs/neighbors/cagra.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@
#include <dlpack/dlpack.h>
#include <stdint.h>

#ifdef __cplusplus
extern "C" {
#endif

/**
* @defgroup cagra_c C API for CUDA ANN Graph-based nearest neighbor search
* @{
*/

#ifdef __cplusplus
extern "C" {
#endif

/**
* @brief Enum to denote which ANN algorithm is used to build CAGRA graph
*
Expand Down Expand Up @@ -71,7 +71,7 @@ cuvsError_t cuvsCagraIndexParamsCreate(cuvsCagraIndexParams_t* params);
* @param[in] params
* @return cuvsError_t
*/
cuvsError_t cuvsCagraIndexParamsDestroy(cuvsCagraIndexParams_t index);
cuvsError_t cuvsCagraIndexParamsDestroy(cuvsCagraIndexParams_t params);

/**
* @brief Enum to denote algorithm used to search CAGRA Index
Expand Down Expand Up @@ -281,10 +281,10 @@ cuvsError_t cuvsCagraSearch(cuvsResources_t res,
DLManagedTensor* neighbors,
DLManagedTensor* distances);

#ifdef __cplusplus
}
#endif

/**
* @}
*/

#ifdef __cplusplus
}
#endif
11 changes: 11 additions & 0 deletions docs/source/api_docs.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
API Documentation
=================

.. toctree::
:maxdepth: 1
:caption: Contents:

c_api.rst
cpp_api.rst
python_api.rst
rust_api.rst
6 changes: 3 additions & 3 deletions docs/source/c_api.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
~~~~~
C API
~~~~~
~~~~~~~~~~~~~~~~~~~
C API Documentation
~~~~~~~~~~~~~~~~~~~

.. _api:

Expand Down
9 changes: 5 additions & 4 deletions docs/source/c_api/core_c_api.rst
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
C-API
=====
Core Routines
=============



.. role:: py(code)
:language: c
:class: highlight


``#include <cuvs/core/c_api.h>``

.. doxygengroup:: c_api
:project: RAFT
:project: cuvs
:members:
:content-only:
9 changes: 5 additions & 4 deletions docs/source/c_api/neighbors_cagra_c.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
CAGRA C-API
===========
CAGRA
=====

CAGRA is a graph-based nearest neighbors algorithm that was built from the ground up for GPU acceleration. CAGRA demonstrates state-of-the art index build and query performance for both small- and large-batch sized search.

CAGRA is a graph-based nearest neighbors implementation with state-of-the art query performance for both small- and large-batch sized search.

.. role:: py(code)
:language: c
Expand All @@ -10,6 +11,6 @@ CAGRA is a graph-based nearest neighbors implementation with state-of-the art qu
``#include <raft/neighbors/cagra.h>``

.. doxygengroup:: cagra_c
:project: RAFT
:project: cuvs
:members:
:content-only:
6 changes: 3 additions & 3 deletions docs/source/cpp_api.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
~~~~~~~
C++ API
~~~~~~~
~~~~~~~~~~~~~~~~~~~~~
C++ API Documentation
~~~~~~~~~~~~~~~~~~~~~

.. _api:

Expand Down
1 change: 0 additions & 1 deletion docs/source/cpp_api/core_interop.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ Interop
:language: c++
:class: highlight


``#include <cuvs/core/interop.hpp>``

namespace *cuvs::core*
Expand Down
6 changes: 2 additions & 4 deletions docs/source/cpp_api/neighbors.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
Neighbors
=========

This page provides C++ class references for the publicly-exposed elements of the neighbors package.
Nearest Neighbors
=================

.. role:: py(code)
:language: c++
Expand Down
4 changes: 1 addition & 3 deletions docs/source/cpp_api/neighbors_cagra.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
CAGRA
=====

CAGRA is a graph-based nearest neighbors implementation with state-of-the art query performance for both small- and large-batch sized search.

Please note that the CAGRA implementation is currently experimental and the API is subject to change from release to release. We are currently working on promoting CAGRA to a top-level stable API within RAFT.
CAGRA is a graph-based nearest neighbors algorithm that was built from the ground up for GPU acceleration. CAGRA demonstrates state-of-the art index build and query performance for both small- and large-batch sized search.

.. role:: py(code)
:language: c++
Expand Down
3 changes: 1 addition & 2 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ cuVS is a library for vector search and clustering on the GPU.

quick_start.md
build.md
cpp_api.rst
python_api.rst
api_docs.rst
developer_guide.md
contributing.md

Expand Down
6 changes: 3 additions & 3 deletions docs/source/python_api.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
~~~~~~~~~~
Python API
~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~
Python API Documentation
~~~~~~~~~~~~~~~~~~~~~~~~

.. _api:

Expand Down
8 changes: 8 additions & 0 deletions docs/source/rust_api.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
~~~~~~~~~~~~~~~~~~~~~~
Rust API Documentation
~~~~~~~~~~~~~~~~~~~~~~

.. _api:

.. toctree::
:maxdepth: 4
2 changes: 1 addition & 1 deletion docs/source/sphinxext/github_link.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def _linkcode_resolve(domain, info, package, url_fmt, revision):
# fn is expected to be the absolute path.
fn = os.path.relpath(source_file, start=package)
print("{}:{}".format(
os.path.abspath(os.path.join("..", "python", "cuml", fn)),
os.path.abspath(os.path.join("..", "python", "cuvs", fn)),
lineno))
else:
return
Expand Down

0 comments on commit e851903

Please sign in to comment.