copyFrom
API definition |
void copyFrom(const faiss::IndexFlat *index); |
|---|---|
Function |
Copies AscendIndexFlat to the Ascend based on an existing index, clears the current AscendIndexFlat database, and retains the resource configuration on the device of the original AscendIndex. |
Input |
const faiss::IndexFlat *index: index resources on the CPU. |
Output |
N/A |
Return value |
N/A |
Restrictions |
index must be a valid CPU Index pointer. The value range of the dimension d of this index is {32, 64, 128, 256, 384, 512, 768, 1024, 1408, 1536, 2048, 3072, 3584, 4096}. The value range of the total number of vectors is 0 ≤ n < 1e9. The value of metric_type can be faiss::MetricType::METRIC_L2 or faiss::MetricType::METRIC_INNER_PRODUCT. |
API definition |
void copyFrom(const faiss::IndexIDMap*index); |
|---|---|
Function |
Copies AscendIndexFlat to the Ascend based on an existing index, clears the current AscendIndexFlat database, and retains the resource configuration on the device of the original AscendIndex. |
Input |
const faiss::IndexIDMap *index: index resources on the CPU. |
Output |
N/A |
Return value |
N/A |
Restrictions |
index must be a valid IndexIDMap pointer. Otherwise, the program may crash or the function may be unavailable. The value range of the member index dimension d of this index is {32, 64, 128, 256, 384, 512, 768, 1024, 1408, 1536, 2048, 3072, 3584, 4096}. The value range of the total number of vectors is 0 ≤ n < 1e9. The value of metric_type can be faiss::MetricType::METRIC_L2 or faiss::MetricType::METRIC_INNER_PRODUCT. |