AscendIndexFlat

API Definition

AscendIndexFlat(const faiss::IndexIDMap *index, AscendIndexFlatConfig config = AscendIndexFlatConfig())

Function

Constructor of AscendIndexFlat, which is used to create a retrieval index on the Ascend based on an existing index.

Input

const faiss::IndexIDMap *index: index resources on the CPU.

AscendIndexFlatConfig config: resource configuration on the NPU.

Output

N/A

Return Value

N/A

Restrictions

The index must be a valid IndexIDMap pointer. The value range of index dimension (the value of the d parameter) is {64, 128, 256, 384, 512, 1024}. The number of base libraries cannot exceed 1e9. The value range of metric_type is {faiss::MetricType::METRIC_L2, faiss::MetricType::METRIC_INNER_PRODUCT}.