AscendIndexIVF

API definition

AscendIndexIVF(int dims, faiss::MetricType metric, int nlist, AscendIndexIVFConfig config = AscendIndexIVFConfig());

Function

Constructor of AscendIndexIVF, which generates AscendIndexIVF. The device resources are set based on the value configured in config.

Input

int dims: dimensions of a group of feature vectors managed by AscendIndexIVF.

faiss::MetricType metric: distance measurement type used by AscendIndex when it retrieves feature vector similarity. Currently, faiss::MetricType::METRIC_L2 and faiss::MetricType::METRIC_INNER_PRODUCT are supported.

int nlist: number of cluster centroids, which corresponds to coarse_centroid_num in the operator generation script.

AscendIndexIVFConfig config: resource configuration on the device.

Output

N/A

Return value

N/A

Restrictions

nlist ∈ {1024, 2048, 4096, 8192, 16384, 32768}

API definition

AscendIndexIVF(const AscendIndexIVF&) = delete;

Function

Declares that the copy constructor of this Index class is void, that is, it cannot be copied.

Input

const AscendIndexIVF&: constant AscendIndexIVF

Output

N/A

Return value

N/A

Restrictions

N/A