AscendIndexBinaryFlat
API definition |
AscendIndexBinaryFlat(int dims, AscendIndexBinaryFlatConfig config = AscendIndexBinaryFlatConfig(), bool usedFloat = false); |
|---|---|
Function |
Constructor of AscendIndexBinaryFlat, which is used to generate AscendIndexBinaryFlat whose dimension is dims and set resources on the device based on the value configured in config. |
Input |
int dims: dimensions of a group of feature vectors managed by AscendIndexBinaryFlat. AscendIndexBinaryFlatConfig config: resource configuration on the device. bool usedFloat: used to improve the performance of the search mode (search) for binary features and retrieval features of the float type. The default value is false. The value true means to improve performance. |
Output |
N/A |
Return value |
N/A |
Restrictions |
dims∈ {256, 512, 1024} |
API definition |
AscendIndexBinaryFlat(const faiss::IndexBinaryFlat *index, AscendIndexBinaryFlatConfig config = AscendIndexBinaryFlatConfig(), bool usedFloat = false); |
|---|---|
Function |
Constructor of AscendIndexBinaryFlat, which is used to create a retrieval index on the Ascend based on an existing index. |
Input |
const faiss::IndexBinaryFlat *index: index resources on the CPU. AscendIndexBinaryFlatConfig config: resource configuration on the device. bool usedFloat: used to improve the performance of the search mode (search) for binary features and retrieval features of the float type. The default value is false. The value true means to improve performance. |
Output |
N/A |
Return value |
N/A |
Restrictions |
index must be a valid CPU index pointer. index->d ∈ {256, 512, 1024}. index->ntotal is the smaller value between the actual memory capacity of the chip and 1e9. |
API definition |
AscendIndexBinaryFlat(const faiss::IndexBinaryIDMap *index, AscendIndexBinaryFlatConfig config = AscendIndexBinaryFlatConfig(), bool usedFloat = false); |
|---|---|
Function |
Constructor of AscendIndexBinaryFlat, which is used to create a retrieval index on the Ascend based on an existing index. |
Input |
const faiss::IndexBinaryIDMap *index: index resources on the CPU. AscendIndexBinaryFlatConfig config: resource configuration on the device. bool usedFloat: used to improve the performance of the search mode (search) for binary features and retrieval features of the float type. The default value is false. The value true means to improve performance. |
Output |
N/A |
Return value |
N/A |
Restrictions |
index must be a valid faiss::IndexBinaryIDMap pointer. index->index must be a valid IndexBinaryFlat pointer. index->index->d ∈ {256, 512, 1024}. index->index->ntotal is the smaller value between the actual memory capacity of the chip and 1e9. |
API definition |
AscendIndexBinaryFlat(const AscendIndexBinaryFlat &) = delete; |
|---|---|
Function |
Declares that the copy constructor of AscendIndexBinaryFlat is void, that is, AscendIndexBinaryFlat cannot be copied. |
Input |
const AscendIndexBinaryFlat &: constant AscendIndexBinaryFlat. |
Output |
N/A |
Return value |
N/A |
Restrictions |
N/A |