AscendIndex
API definition |
AscendIndex(int dims, faiss::MetricType metric, AscendIndexConfig config) |
|---|---|
Function |
Constructor of AscendIndex, which is used to generate an AscendIndex whose dimension is dims. The device resources are configured based on the value set in config. Note that the dimension of a group of vectors managed by a single index is unique. |
Input |
int dims: dimensions of a group of feature vectors managed by AscendIndex. faiss::MetricType metric: distance measurement type used by AscendIndex when it retrieves feature vector similarity. Currently, faiss::MetricType::METRIC_L2 and faiss::MetricType::METRIC_INNER_PRODUCT are supported. AscendIndexConfig config: resource configuration on the device. |
Output |
N/A |
Return value |
N/A |
Restrictions |
dims is an integer in (0, 4096] and can be exactly divided by 16. |
API definition |
AscendIndex(const AscendIndex&) = delete; |
|---|---|
Function |
Declares that the copy constructor of AscendIndex is void, that is, AscendIndex cannot be copied. |
Input |
const AscendIndex&: constant AscendIndex |
Output |
N/A |
Return value |
N/A |
Restrictions |
N/A |
API definition |
virtual ~AscendIndex(); |
|---|---|
Function |
Destructor of AscendIndex, which is used to destroy the AscendIndex object and resources. |
Input |
N/A |
Output |
N/A |
Return value |
N/A |
Restrictions |
N/A |