SearchBatchedParallel
API Definition
Status ScannInterface::SearchBatchedParallel(const DenseDataset<float>& queries, MutableSpan<NNResultsVector> res, int final_nn, int pre_reorder_nn, int leaves, int batch_size) const;
Function
Parallel batch query search (multi-thread behavior consistent with the open source algorithm).
Parameters
Parameter |
Description |
Data Type |
Value Range |
|---|---|---|---|
queries |
Queries in a batch. |
const DatapointPtr<float>& |
The value cannot be null. |
res |
Stores final results (labels and distances) with length final_nn for each entry representing the number of returned results. |
MutableSpan<NNResultsVector> |
The value cannot be null. The length is the number of query vectors. |
final_nn |
Number of returned results. |
int |
≥ 1. The value must match the build parameters. |
pre_reorder_nn |
Number of results saved before reordering. |
int |
≥ final_nn, where final_nn indicates the number of results returned. |
leaves |
Number of subspaces to be searched. |
int |
[1, n_leaves], where n_leaves indicates the total number of subspaces in the IVF index partition. |
Return Value
Data Type |
Description |
|---|---|
Status |
Execution status of the method. You can determine whether the method is successfully executed by calling status.ok(). |