Skip to content

Commit

Permalink
Don't store the source data in the CAGRA index file
Browse files Browse the repository at this point in the history
  • Loading branch information
achirkin committed Jul 12, 2024
1 parent 80ba46e commit 73ca412
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cpp/bench/ann/src/cuvs/cuvs_cagra_wrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,11 @@ void cuvs_cagra<T, IdxT>::set_search_dataset(const T* dataset, size_t nrow)
template <typename T, typename IdxT>
void cuvs_cagra<T, IdxT>::save(const std::string& file) const
{
cuvs::neighbors::cagra::serialize(handle_, file, *index_);
using ds_idx_type = decltype(index_->data().n_rows());
bool is_vpq =
dynamic_cast<const cuvs::neighbors::vpq_dataset<half, ds_idx_type>*>(&index_->data()) ||
dynamic_cast<const cuvs::neighbors::vpq_dataset<float, ds_idx_type>*>(&index_->data());
cuvs::neighbors::cagra::serialize(handle_, file, *index_, is_vpq);
}

template <typename T, typename IdxT>
Expand Down

0 comments on commit 73ca412

Please sign in to comment.