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