saveAllData

API definition

void saveAllData(const char *dataPath);

Function

Writes the index structure from the device to the drive. The data written to the drive includes the feature vectors after compression and dimension reduction, as well as codebook data.

Input

const char *dataPath: path for storing data files.

Output

N/A

Return value

N/A

Restrictions

Ensure that the directory where dataPath is located exists and the user has the write permission on the directory. For security hardening, the directory level cannot contain soft links.

When a file corresponding to dataPath exists, it will be overwritten. In this case, the program running user should be the owner of the file.

API definition

void saveAllData(uint8_t *&data, size_t &dataLen) const;

Function

Stores the AscendIndexIVFSP object to the memory.

Input

N/A

Output

uint8_t *&data: memory pointer for storing AscendIndexIVFSP data.

size_t &dataLen: actual length of the data pointer.

Return value

N/A

Restrictions

The input data must be a null pointer. After the API returns a value, you need to delete the data to release the memory. Otherwise, memory leak occurs.