API Description
KScaNN APIs are added and modified based on the open source ScaNN APIs, To achieve the optimal performance, KScaNN interfaces do not verify all input parameters. The validity of input parameters is ensured by the service that calls the interfaces. which are described in Table 1.
API |
Function |
|---|---|
set_num_threads |
Configures the number of threads enabled during search. It is a new API added to the open source algorithm. |
search_additional_params |
Extends the ScaNN search function by configuring additional search parameters. It is a new API added to the open source algorithm. |
search |
Performs single-query search, which is executed by a single thread. It is consistent with the open source algorithm API. |
search_batched |
Performs batch-query search, which is executed by a single thread. It is consistent with the open source algorithm API. |
search_batched_parallel |
Performs parallel batch-query search, which is concurrently executed by multiple threads. It adds a new parameter batch_size to the open source algorithm API. |
builder |
Starts the build. It is consistent with the open source algorithm API. |
tree |
Adds parameters related to the inverted file (IVF) index partition. It is consistent with the open source algorithm API. |
score_ah |
Adds parameters related to partitioned product quantization (PQ). It is consistent with the open source algorithm API. |
reorder |
Adds parameters related to reordering. It is consistent with the open source algorithm API. |
build |
Builds indexes. It is consistent with the open source algorithm API. |