下载
中文
注册

AscendIndexFlatL2

API定义

AscendIndexFlatL2(faiss::IndexFlatL2 *index, AscendIndexFlatConfig config = AscendIndexFlatConfig());

功能描述

AscendIndexFlatL2的构造函数,基于一个已有的“index”创建Ascend上的检索Index。

输入

faiss::IndexFlatL2 *index:CPU侧Index资源。

AscendIndexFlatConfig config:Device侧资源配置。

输出

返回值

约束说明

“index”需要为合法有效的CPUindex指针,该index的维度d参数取值范围为{32, 64, 128, 256, 384, 512, 1024, 2048, 3072, 4096},底库向量总数的取值范围:0 ≤ n < 1e9,metric_type参数取值为faiss::MetricType::METRIC_L2。