Header File Description

Table 1 Header files

File Name

Directory

Function

AscendCloner.h

${mxIndex_install_path}/mxIndex/include/faiss/ascend/

Copies the NPU-side retrieval index resources to the CPU-side Faiss. The copy process is performed in the memory. The data loaded on an index of the NPU is copied to the memory on the CPU, facilitating retrieval within the same database on the CPU.

AscendClonerOptions.h

${mxIndex_install_path}/mxIndex/include/faiss/ascend/

Provided by AscendClonerOptions.

AscendIndex.h

${mxIndex_install_path}/mxIndex/include/faiss/ascend/

As the base class of most indexes in FeatureRetrieval, AscendIndex inherits Faiss and defines APIs for other indexes in FeatureRetrieval.

AscendIndexBinaryFlat.h

${mxIndex_install_path}/mxIndex/include/faiss/ascend/

As the API class of Hamming distance, AscendIndexBinaryFlat.h defines the external APIs of Hamming distance.

AscendIndexCluster.h

${mxIndex_install_path}/mxIndex/include/faiss/ascend/

Provides external APIs of AscendIndexCluster.

AscendIndexFlat.h

${mxIndex_install_path}/mxIndex/include/faiss/ascend/

Provides external APIs of Flat-FP16.

AscendIndexIVF.h

${mxIndex_install_path}/mxIndex/include/faiss/ascend/

Base class for approximate retrieval and cannot be used directly.

AscendIndexIVFSP.h

${mxIndex_install_path}/mxIndex/include/faiss/ascend/

Provides external IVFSP APIs, including add, add_with_ids, search, and search_with_filter.

AscendIndexIVFSQ.h

${mxIndex_install_path}/mxIndex/include/faiss/ascend/

Provides IVFSQ external APIs, including train, copyto, copyfrom, and constructors.

AscendIndexInt8.h

${mxIndex_install_path}/mxIndex/include/faiss/ascend/

As the base class of indexes of the int8 type in FeatureRetrieval, AscendIndex inherits Faiss and defines APIs for IndexInt8Flat in FeatureRetrieval.

AscendIndexInt8Flat.h

${mxIndex_install_path}/mxIndex/include/faiss/ascend/

Provides external APIs of Flat-Int8.

AscendIndexSQ.h

${mxIndex_install_path}/mxIndex/include/faiss/ascend/

Provides definition of external APIs for SQ retrieval.

AscendIndexTS.h

${mxIndex_install_path}/mxIndex/include/faiss/ascend/

Provides external APIs of the spatiotemporal database, including Hamming, int8Flat, and FP16Flat algorithms.

AscendMultiIndexSearch.h

${mxIndex_install_path}/mxIndex/include/faiss/ascend/

Provides external APIs for multi-index retrieval.

AscendNNInference.h

${mxIndex_install_path}/mxIndex/include/faiss/ascend/

Provides external APIs for neural network dimension reduction.

AscendIndexIVFSQT.h

${mxIndex_install_path}/mxIndex/include/faiss/ascend/custom

Serving as an IVFSQ algorithm for three-level retrieval, it contains a dimension reduction algorithm and fuzzy clustering function. It is used for clustering. It first selects nprobe clusters based on the results of level-1 clustering and then selects l2nprobe clusters from level-2 clusters for an exact search.

IReduction.h

${mxIndex_install_path}/mxIndex/include/faiss/ascend/custom

IReduction is a unified API for dimension reduction in FeatureRetrieval. Currently, the PCAR and NN dimension reduction algorithms are supported.

Version.h

${mxIndex_install_path}/mxIndex/include/faiss/ascend/utils

Obtains version information.

ErrorCode.h

${mxIndex_install_path}/mxIndex/device/include

Contains Index SDK error code information.

IndexILFlat.h

${mxIndex_install_path}/mxIndex/device/include

Defines the external APIs of IndexILFlat.

IndexIL.h

${mxIndex_install_path}/mxIndex/device/include

Base class of IndexILFlat, which cannot be used directly.

AscendIndexGreat.h

${mxIndex_install_path}/mxIndex/include/faiss/ascend/

Provides definition of external APIs for Great retrieval.

AscendIndexVStar.h

${mxIndex_install_path}/mxIndex/include/faiss/ascend/

Provides definition of external APIs for VStar retrieval.

AscendIndexMixSearchParams.h

${mxIndex_install_path}/mxIndex/include/faiss/ascend/

External header file of the parameter structure required for Vstar and Great retrieval.

${mxIndex_install_path} indicates the installation path of Index SDK.