copyFrom
API definition |
void copyFrom(const faiss::IndexIDMap* index); |
|---|---|
Function |
Copies AscendIndexInt8Flat to the Ascend based on an existing index 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. The value range of the member index dimension d of this index is {64, 128, 256, 384, 512, 768, 1024}. The value range of 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::IndexScalarQuantizer* index); |
|---|---|
Function |
Copies AscendIndexInt8Flat to the Ascend based on an existing index and retains the resource configuration on the device of the original AscendIndex. |
Input |
const faiss::IndexScalarQuantizer* 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 dimension d of the index is {64, 128, 256, 384, 512, 768, 1024}. 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. |