AddFeatures

API definition

virtual APP_ERROR AddFeatures(int n, const float16_t *features, const idx_t *indices) = 0;

Function

Inserts n feature vectors with specified indexes into the feature database and modifies a feature vector if it already exists at an index.

Input

int n: number of feature vectors to be inserted.

const float16_t *features: feature vectors. The length is n × dim (vector dimension).

const idx_t *indices: index corresponding to a feature vector. The length is n.

Output

N/A

Return value

APP_ERROR: return status. For details, see Return Code Reference.

Restrictions

  • The input parameters must meet the requirements of the implementation class of this class.
  • features and indices must be non-null pointers and their lengths must meet the requirements. Otherwise, an out-of-bounds read/write error may occur, causing program breakdown.