copyFrom
| API定义 | void copyFrom(faiss::IndexFlat *index); | 
|---|---|
| 功能描述 | AscendIndexFlat基于一个已有的“index”拷贝到Ascend,清空当前的AscendIndexFlatL2底库,并保持原有的AscendIndex的Device侧资源配置。 | 
| 输入 | const faiss::IndexFlat *index:CPU侧Index资源。 | 
| 输出 | 无 | 
| 返回值 | 无 | 
| 约束说明 | “index”需要为合法有效的CPUindex指针,该Index的维度d参数取值范围为{64, 128, 256, 384, 512, 1024, 2048},底库向量总数的取值范围:0 <= n < 1e9,metric_type参数取值为 faiss::MetricType::METRIC_L2。 | 
父主题: AscendIndexFlatL2