aclfvCreateSearchResult

Applicability

Product

Supported

Atlas 350 Accelerator Card

Atlas A3 training product/Atlas A3 inference product

Atlas A2 training product/Atlas A2 inference product

Atlas 200I/500 A2 inference product

Atlas inference product

Atlas training product

Function

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

Atlas inference accelerator module does not support this API.

Prototype

1
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

Shift pointer

Offset of the repository corresponding to the search results of each search request. The number of elements equals topK * 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