我要评分
获取效率
正确性
完整性
易理解

API Description

KScaNN does not provide external interfaces but makes intrusive modifications to the open source ScaNN algorithm, including interface additions to the core ScaNN class ScannInterface. 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. The methods provided by the KScaNN-modified version of ScannInterface are shown in Table 1.

Table 1 Table Modified ScannInterface methods of KScaNN

API

Function

SetNumThreads

Configures the number of threads for search operations (KScaNN-specific addition).

SearchAdditionalParams

Extends ScaNN functionality with custom search parameters (KScaNN-specific addition).

Search

Single-query search (single-thread behavior consistent with the open source algorithm).

SearchBatched

Batch query search (single-thread behavior consistent with the open source algorithm).

SearchBatchedParallel

Parallel batch query search (multi-thread behavior consistent with the open source algorithm).

Initialize

Index construction (consistent with the open source algorithm).

SerializeToMemory

Serializes the index into memory (KScaNN-specific addition).

LoadFromMemory

Restore the index instance from memory (KScaNN-specific addition).

GetNum

Obtains the number of vectors in the base library (KScaNN-specific addition).

GetDim

Obtains the dimensions of vectors in the base library (KScaNN-specific addition).