aclfvSearch

Applicable Products

Product

Supported

Ascend 950PR / Ascend 950DT

X

Atlas A3 training products / Atlas A3 inference products

X

Atlas A2 training products / Atlas A2 inference products

X

Atlas 200I/500 A2 inference products

X

Atlas inference products

√

Atlas training products

X

Function

Performs 1:N or N:M feature search.

Atlas inference accelerator module : This API is not supported.

Prototype

aclError aclfvSearch(aclfvSearchType type, aclfvSearchInput *searchInput, aclfvSearchResult *searchRst)

Parameters

Parameter

Input/Output

Description

type

Input

Feature search scenario type. For the type definition, see aclfvSearchType.

searchInput

Input

Pointer to the search input information. For the type definition, see aclfvSearchInput.

Call aclfvCreateSearchInput to create data of the aclfvSearchInput type in advance.

searchRst

Output

Pointer to the search output result. For the type definition, see aclfvSearchResult.

Call aclfvCreateSearchResult to create data of the aclfvSearchResult type in advance. The queryCnt argument must be the same as that of searchInput.

The number of returned search results is specified by the topk argument passed to the aclfvCreateSearchInput call and is also restricted by the maximum value of topk specified by the aclfvInit call for initialization. If the topk argument passed to the aclfvCreateSearchInput call is greater than or equal to that passed to the initialization call, the maximum number set in the initialization call takes precedence; otherwise, the topk argument passed to the aclfvCreateSearchInput call applies.

Returns

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

Restrictions

  • In N:M mode, multithreaded adding, search, or deletion is not allowed.
  • In 1:N or N:M mode, if no repository is added, zero results are returned by the aclfvSearch call.
  • This API call automatically creates a stream for synchronous task execution within the API. When the tasks are complete, the stream is automatically destroyed.

    Hardware has restrictions on the total number of streams. For details, see aclrtCreateStream.