loadAllData
API definition |
void loadAllData(const char *dataPath); |
|---|---|
Function |
Reads the index structure from the drive to the device, including the feature vectors after compression and dimension reduction, as well as codebook data. |
Input |
const char *dataPath: data file path. |
Output |
N/A |
Return value |
N/A |
Restrictions |
The file corresponding to dataPath must be the flushed file obtained by calling saveAllData. The program running user must have the read permission on the file. In addition, the file cannot be a soft link. This API cannot share codebooks. To share codebooks, you are advised to use the following loadAllData. |
API definition |
static std::shared_ptr<AscendIndexIVFSP> loadAllData(const AscendIndexIVFSPConfig &config, const uint8_t *data, size_t dataLen, const AscendIndexIVFSP *codeBookSharedIdx = nullptr); |
|---|---|
Function |
Restores the AscendIndexIVFSP object from the memory. |
Input |
|
Output |
N/A |
Return value |
AscendIndexIVFSP smart pointer object restored from the memory. |
Restrictions |
|