add
API definition |
void add(idx_t n, const uint8_t *x) override; |
|---|---|
Function |
Adds feature vectors to the database. |
Input |
idx_t n: number of feature vectors to be added. const uint8_t *x: feature vectors to be added. |
Output |
N/A |
Return value |
N/A |
Restrictions |
The length of the x pointer must be dims/8 × n (n > 0). Otherwise, an out-of-bounds read/write error may occur, causing program breakdown. For the add operation, ensure that the final database size (ntotal) is the smaller value between the actual memory capacity of the chip and 1e9. |
- add interface cannot be used together with add_with_ids.
- After add is used, the labels in the search result may be duplicate. If the service has requirements on labels, you are advised to use add_with_ids.
Parent topic: AscendIndexBinaryFlat