AscendIndexIVFFlat

API definition

AscendIndexIVFFlat(int dims, faiss::MetricType metric, int nlist, AscendIndexIVFFlatConfig config)

Function

Constructor of AscendIndexIVFFlat, which creates a retrieval index on Ascend.

Input

int dims: dimension of the vector for retrieval.

faiss::MetricType metric: distance type. Currently, only faiss::METRIC_INNER_PRODUCT is supported.

int nlist: number of IVF buckets.

AscendIndexIVFFlatConfig config: resource configuration on the device.

Output

N/A

Return value

N/A

Restrictions

  • dims = 128
  • nlist ∈ {1024, 2048, 4096, 8192, 16384, 32768}

API definition

AscendIndexIVFFlat& operator=(const AscendIndexIVFFlat&) = delete;

Function

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

Input

const AscendIndexIVFFlat&: constant AscendIndexIVFFlat.

Output

N/A

Return value

N/A

Restrictions

N/A