diff --git a/cpp/include/raft/neighbors/cagra.cuh b/cpp/include/raft/neighbors/cagra.cuh index 2446a95ea7..b7e362f704 100644 --- a/cpp/include/raft/neighbors/cagra.cuh +++ b/cpp/include/raft/neighbors/cagra.cuh @@ -346,33 +346,8 @@ void search_with_filtering(raft::resources const& res, auto distances_internal = raft::make_device_matrix_view( distances.data_handle(), distances.extent(0), distances.extent(1)); - // n_rows has the same type as the dataset index (the array extents type) - using ds_idx_type = decltype(idx.dataset().n_rows()); - // Dispatch search parameters based on the dataset kind. - if (auto* strided_dset = dynamic_cast*>(&idx.dataset()); - strided_dset != nullptr) { - // Search using a plain (strided) row-major dataset - return cagra::detail::search_main( - res, params, idx, queries_internal, neighbors_internal, distances_internal, sample_filter); - } else if (auto* vpq_dset = - dynamic_cast*>(&idx.dataset()); - vpq_dset != nullptr) { - // Search using a compressed dataset - RAFT_FAIL("FP32 VPQ dataset support is coming soon"); - } else if (auto* vpq_dset = - dynamic_cast*>(&idx.dataset()); - vpq_dset != nullptr) { - // Search using a compressed dataset - RAFT_FAIL("FP16 VPQ dataset support is coming soon"); - } else if (auto* empty_dset = dynamic_cast*>(&idx.dataset()); - empty_dset != nullptr) { - // Forgot to add a dataset. - RAFT_FAIL( - "Attempted to search without a dataset. Please call index.update_dataset(...) first."); - } else { - // This is a logic error. - RAFT_FAIL("Unrecognized dataset format"); - } + return cagra::detail::search_main( + res, params, idx, queries_internal, neighbors_internal, distances_internal, sample_filter); } /**