copyFrom
API definition |
void copyFrom(const faiss::IndexScalarQuantizer* index); |
|---|---|
Function |
Copies AscendIndexSQ to the Ascend based on an existing index, clears the current AscendIndexSQ database, and retains the resource configuration on the device of the original AscendIndexSQ. |
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 this index is {64, 128, 256, 384, 512, 768}. The value range of the total number of vectors is 0 ≤ n < 1e9. The value of metric_type is faiss::MetricType::METRIC_L2 or faiss::MetricType::METRIC_INNER_PRODUCT. And sq.qtype supports only ScalarQuantizer::QuantizerType::QT_8bit. |
API definition |
void copyFrom(const faiss::IndexIDMap* index); |
|---|---|
Function |
Copies AscendIndexSQ to the Ascend based on an existing index, clears the current AscendIndexSQ database, and retains the resource configuration on the device of the original AscendIndexSQ. |
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}. The value range of the total number of vectors is 0 ≤ n < 1e9. The value of metric_type is faiss::MetricType::METRIC_L2 or faiss::MetricType::METRIC_INNER_PRODUCT. And sq.qtype supports only ScalarQuantizer::QuantizerType::QT_8bit. |