copyFrom
API Definition |
void copyFrom(const faiss::IndexIDMap *index) |
|---|---|
Function |
Copies AscendIndexFlat to the Ascend based on an existing index, clears the current AscendIndexFlat base library, and retains the resource configuration on the NPU of the original AscendIndex. |
Input |
const faiss::IndexIDMap *index: index resources on the CPU. |
Output |
N/A |
Return Value |
N/A |
Restrictions |
The index must be a valid IndexIDMap pointer. Otherwise, the program may break down or the function may be unavailable. The value range of the member index dimension (the value range of the d parameter) is {64, 128, 256, 384, 512, 1024}. The number of base libraries cannot exceed 1e9. The value range of metric_type is {faiss::MetricType::METRIC_L2, faiss::MetricType::METRIC_INNER_PRODUCT}. |