aclfvCreateSearchResult

Applicability

Product

Supported

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

Description

Creates data of the aclfvSearchResult type as a search result. To destroy data of the aclfvSearchResult type, see aclfvDestroySearchResult.

The Atlas inference accelerator modules does not support this API.

Prototype

aclfvSearchResult *aclfvCreateSearchResult(uint32_t queryCnt, uint32_t *resultNum, uint32_t resultNumDataLen, uint32_t *id0, uint32_t *id1, uint32_t *resultOffset, float *resultDistance, uint32_t dataLen)

Parameters

Parameter

Input/Output

Description

queryCnt

Input

Number of search requests, fixed at 1 in the 1:N scenario

resultNum

Input

Pointer to the number of results.

Number of results in each search request.

resultNumDataLen

Input

Total memory size of resultNum

id0

Input

Pointer to the level-1 library ID. The total number of level-1 library IDs is topK x queryCnt.

id1

Input

Pointer to the level-2 library ID. The total number of level-2 library IDs is topK x queryCnt.

resultOffset

Input

Offset pointer.

Offset of the base library corresponding to the retrieval result of each retrieval request. The total number is topK x queryCnt.

resultDistance

Input

Pointer to the distance between each search result and the search request.

The total number is topK x queryCnt.

dataLen

Input

Requested memory size: topK * queryCnt * 4 bytes

Returns

  • Success: a pointer to data of the aclfvSearchResult type
  • Failure: nullptr