Brute Force
Source header: cuvs/neighbors/brute_force.hpp
Bruteforce index
neighbors::brute_force::index
Brute Force index.
The index stores the dataset and norms for the dataset in device memory.
neighbors::brute_force::index::index
Construct an empty index.
Constructs an empty index. This index will either need to be trained with build or loaded from a saved copy with deserialize
Parameters
Returns
void
Additional overload: neighbors::brute_force::index::index
Construct a brute force index from dataset
Constructs a brute force index from a dataset. This lets us precompute norms for the dataset, providing a speed benefit over doing this at query time. This index will copy the host dataset onto the device, and take ownership of any precaculated norms.
Parameters
Returns
void
Additional overload: neighbors::brute_force::index::index
Construct a brute force index from dataset
Constructs a brute force index from a dataset. This lets us precompute norms for the dataset, providing a speed benefit over doing this at query time. This index will store a non-owning reference to the dataset, but will move any norms supplied.
Parameters
Returns
void
Additional overload: neighbors::brute_force::index::index
Construct a brute force index from dataset
This class stores a non-owning reference to the dataset and norms. Having precomputed norms gives us a performance advantage at query time.
Parameters
Returns
void
Additional overload: neighbors::brute_force::index::index
Construct a brute force index from dataset
Constructs a brute force index from a dataset. This lets us precompute norms for the dataset, providing a speed benefit over doing this at query time. This index will store a non-owning reference to the dataset, but will move any norms supplied.
Parameters
Returns
void
Additional overload: neighbors::brute_force::index::index
Construct a brute force index from dataset
This class stores a non-owning reference to the dataset and norms, with the dataset being supplied on device in a col_major format
Parameters
Returns
void
neighbors::brute_force::index::update_dataset
Replace the dataset with a new dataset.
Parameters
Returns
void
Additional overload: neighbors::brute_force::index::update_dataset
Replace the dataset with a new dataset.
We create a copy of the dataset on the device. The index manages the lifetime of this copy.
Parameters
Returns
void
neighbors::brute_force::index::metric
Distance metric used for retrieval
Returns
neighbors::brute_force::index::metric_arg
Metric argument
Returns
DistT
neighbors::brute_force::index::size
Total length of the index (number of vectors).
Returns
size_t
neighbors::brute_force::index::dim
Dimensionality of the data.
Returns
size_t
neighbors::brute_force::index::dataset
Dataset [size, dim]
Returns
raft::device_matrix_view<const T, int64_t, raft::row_major>
neighbors::brute_force::index::norms
Dataset norms
Returns
raft::device_vector_view<const DistT, int64_t, raft::row_major>
neighbors::brute_force::index::has_norms
Whether ot not this index has dataset norms
Returns
inline bool
Bruteforce index build
neighbors::brute_force::build
Build the index from the dataset for efficient search.
Usage example:
Parameters
Returns
cuvs::neighbors::brute_force::index<float, float>
Additional overload: neighbors::brute_force::build
Build the index from the dataset for efficient search.
Parameters
Returns
cuvs::neighbors::brute_force::index<float, float>
Additional overload: neighbors::brute_force::build
Build the index from the dataset for efficient search.
Usage example:
Parameters
Returns
cuvs::neighbors::brute_force::index<half, float>
Additional overload: neighbors::brute_force::build
Build the index from the dataset for efficient search.
Parameters
Returns
cuvs::neighbors::brute_force::index<half, float>
Additional overload: neighbors::brute_force::build
Build the index from the dataset for efficient search.
Usage example:
Parameters
Returns
cuvs::neighbors::brute_force::index<float, float>
Additional overload: neighbors::brute_force::build
Build the index from the dataset for efficient search.
Usage example:
Parameters
Returns
cuvs::neighbors::brute_force::index<half, float>
Sparse Brute Force index
neighbors::brute_force::sparse_index
Sparse Brute Force index.
neighbors::brute_force::sparse_index::sparse_index
Construct a sparse brute force sparse_index from dataset
Parameters
Returns
void
neighbors::brute_force::sparse_index::metric
Distance metric used for retrieval
Returns
neighbors::brute_force::sparse_index::metric_arg
Metric argument
Returns
T
Sparse Brute Force index search
neighbors::brute_force::sparse_search_params
Sparse Brute Force index search
Bruteforce index serialize functions
neighbors::brute_force::serialize
Save the index to file.
The serialization format can be subject to changes, therefore loading an index saved with a previous version of cuvs is not guaranteed to work.
output
Template Parameters
Parameters
Returns
void
Additional overload: neighbors::brute_force::serialize
Save the index to file.
The serialization format can be subject to changes, therefore loading an index saved with a previous version of cuvs is not guaranteed to work.
output
Template Parameters
Parameters
Returns
void
Additional overload: neighbors::brute_force::serialize
Write the index to an output stream
The serialization format can be subject to changes, therefore loading an index saved with a previous version of cuvs is not guaranteed to work.
Parameters
Returns
void
Additional overload: neighbors::brute_force::serialize
Write the index to an output stream
The serialization format can be subject to changes, therefore loading an index saved with a previous version of cuvs is not guaranteed to work.
Parameters
Returns
void
neighbors::brute_force::deserialize
Load index from file.
The serialization format can be subject to changes, therefore loading an index saved with a previous version of cuvs is not guaranteed to work.
Parameters
Returns
void
Additional overload: neighbors::brute_force::deserialize
Load index from file.
The serialization format can be subject to changes, therefore loading an index saved with a previous version of cuvs is not guaranteed to work.
Parameters
Returns
void
Additional overload: neighbors::brute_force::deserialize
Load index from input stream
The serialization format can be subject to changes, therefore loading an index saved with a previous version of cuvs is not guaranteed to work.
Parameters
Returns
void
Additional overload: neighbors::brute_force::deserialize
Load index from input stream
The serialization format can be subject to changes, therefore loading an index saved with a previous version of cuvs is not guaranteed to work.
Parameters
Returns
void