Creates data of the aclfvSearchResult type as a search result. This API is synchronous.
To destroy data of the aclfvSearchResult type, call aclfvDestroySearchResult.
The Ascend 310 AI Processor does not support this API.
The Ascend 910 AI Processor does not support this API.
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)
Parameter |
Input/Output |
Description |
|---|---|---|
queryCnt |
Input |
Number of search requests, fixed at 1 in 1:N mode |
resultNum |
Input |
Pointer to the number of results. Number of results per search request. |
resultNumDataLen |
Input |
Total memory size of resultNum |
id0 |
Input |
Pointer to the repository 0 ID. The number of elements equals topK * queryCnt. |
id1 |
Input |
Pointer to the repository 1 ID. The number of elements equals topK * queryCnt. |
resultOffset |
Input |
Offset 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 number of elements equals topK * queryCnt. |
dataLen |
Input |
Requested memory size: topK * queryCnt * 4 bytes |