昇腾社区首页
中文
注册
开发者
下载

AscendIndexIVFFlat接口

API定义

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

功能描述

AscendIndexIVFFlat的构造函数,创建Ascend上的检索Index。

输入

int dims:底库检索向量的维度。

faiss::MetricType metric:距离类型,当前只支持faiss::METRIC_INNER_PRODUCT。

int nlist:IVF分桶数。

AscendIndexIVFFlatConfig config:Device侧资源配置。

输出

返回值

约束说明

  • dims目前仅支持128。
  • nlist ∈ {1024, 2048, 4096, 8192, 16384, 32768}。

API定义

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

功能描述

声明此index拷贝构造函数为空,即不可拷贝类型。

输入

const AscendIndexIVFFlat&:常量AscendIndexIVFFlat。

输出

返回值

约束说明