aclfvRepoAdd

Applicable Products

Product

Supported

Ascend 950PR&950DT products

×

Atlas A3 products

×

Atlas A2 products

×

Atlas 200I/500 A2 inference products

×

Atlas inference products

√

Atlas training products

×

Description

Adds a repository, or adds features to an existing repository. In this section, 1:N indicates one search request mapped against N features in the repository, whereas N:M is used to compare the similarity between two repositories.

Atlas inference accelerator modules do not support this API.

Prototype

1
aclError aclfvRepoAdd(aclfvSearchType type, aclfvFeatureInfo *featureInfo)

Parameters

Parameter

Input/Output

Description

type

Input

Search type. For the type definition, see aclfvSearchType.

featureInfo

Input

Pointer to the feature description. For the type definition, see aclfvFeatureInfo.

The aclfvCreateFeatureInfo API must be called to create data of the aclfvFeatureInfo type before this API is called.

Return Value

0 on success; else, failure. For details, see aclError.

Constraints

  • In 1:N mode, ensure that the offsets in the aclfvFeatureInfo structure are consecutive for each repository. In N:M mode, if offset is not 0, an error is reported.
  • As this module is not thread-safe, multiple threads are not allowed to concurrently perform feature addition, search, or deletion in N:M mode.
  • This API call automatically creates an internal stream for synchronous execution of tasks, and this stream resource is automatically released once the execution is complete.

    Due to hardware limitations, the total number of streams is limited. For details, see aclrtCreateStream in Runtime API .