AscendIndexInt8Flat
API definition |
AscendIndexInt8Flat(int dims, faiss::MetricType metric = faiss::METRIC_L2, AscendIndexInt8FlatConfig config = AscendIndexInt8FlatConfig()); |
|---|---|
Function |
Constructor of AscendIndexInt8Flat, which is used to generate an AscendIndexInt8 whose dimension is dims. The device resources are configured based on the value configured 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 AscendIndexInt8. faiss::MetricType metric: distance measurement type used by AscendIndex when it retrieves feature vector similarity. AscendIndexInt8FlatConfig config: resource configuration on the device. |
Output |
N/A |
Return value |
N/A |
Restrictions |
|
API definition |
AscendIndexInt8Flat(const faiss::IndexScalarQuantizer *index, AscendIndexInt8FlatConfig config = AscendIndexInt8FlatConfig()); |
|---|---|
Function |
Constructor of AscendIndexInt8Flat, which is used to create a retrieval index on the Ascend based on an existing index. |
Input |
const faiss::IndexScalarQuantizer* index: index resources on the CPU. AscendIndexInt8FlatConfig config: resource configuration on the device. |
Output |
N/A |
Return value |
N/A |
Restrictions |
index must be a valid CPU Index pointer, that is, the faiss::IndexScalarQuantizer pointer generated by AscendIndexInt8Flat when copyTo is called. |
API definition |
AscendIndexInt8Flat(const faiss::IndexIDMap*index, AscendIndexInt8FlatConfig config = AscendIndexInt8FlatConfig()); |
|---|---|
Function |
Constructor of AscendIndexInt8Flat, which is used to create a retrieval index on the Ascend based on an existing index. |
Input |
const faiss::IndexIDMap *index: index resources on the CPU. AscendIndexInt8FlatConfig config: resource configuration on the device. |
Output |
N/A |
Return value |
N/A |
Restrictions |
index must be a valid CPU Index pointer, that is, the faiss::IndexIDMap pointer generated by AscendIndexInt8Flat when copyTo is called. |
API definition |
AscendIndexInt8Flat(const AscendIndexInt8Flat&) = delete; |
|---|---|
Function |
Declares that the copy constructor of this Index class is void, that is, it cannot be copied. |
Input |
const AscendIndexInt8Flat&: constant AscendIndexInt8Flat |
Output |
N/A |
Return value |
N/A |
Restrictions |
N/A |
API definition |
virtual ~AscendIndexInt8Flat(); |
|---|---|
Function |
Destructor of AscendIndexInt8Flat, which is used to destroy the AscendIndexInt8Flat object and resources. |
Input |
N/A |
Output |
N/A |
Return value |
N/A |
Restrictions |
N/A |