add
API definition |
void add(idx_t n, const float *x) override; |
|---|---|
Function |
Creates an AscendIndex database and adds new feature vectors into the database. When this API is used to add a feature, its ID is in the range of [0, ntotal). |
Input |
idx_t n: number of feature vectors to be added to the database. const float *x: feature vectors to be added to the database. |
Output |
N/A |
Return value |
N/A |
Restrictions |
The length of x must be dims × n. Otherwise, an out-of-bounds read/write error may occur, causing program breakdown. Range of n: 0 < n < 1e9. NOTE:
|
API definition |
void add(idx_t n, const uint16_t *x); |
|---|---|
Function |
Creates an AscendIndex database and adds new feature vectors into the database. When this API is used to add a feature, its ID is in the range of [0, ntotal). |
Input |
idx_t n: number of feature vectors to be added to the database. const uint16_t *x: feature vectors to be added to the database. |
Output |
N/A |
Return value |
N/A |
Restrictions |
The length of x must be dims × n. Otherwise, an out-of-bounds read/write error may occur, causing program breakdown. Range of n: 0 < n < 1e9. |