AscendIndexInt8Flat

API definition

AscendIndexInt8Flat(int dims, faiss::MetricType metric = faiss::METRIC_L2, AscendIndexInt8FlatConfig config = AscendIndexInt8FlatConfig())

Function

Constructor of AscendIndexInt8Flat, which is used to generate an AscendIndexInt8 whose dimension is dim. The NPU resources are configured based on the value configured in config. Note that the dimension of a group of vectors managed by a single index is unique.

Input

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

faiss::MetricType metric: distance measurement type used by AscendIndex when it retrieves feature vector similarity.

AscendIndexFlatConfig config: resource configuration on the NPU.

Output

N/A

Return value

N/A

Restrictions

  • dims ∈ {64, 128, 256, 384, 512, 1024}.
  • metric ∈ {faiss::MetricType::METRIC_L2, faiss::MetricType::METRIC_INNER_PRODUCT}.