---
title: aclfvCreateSearchResult
description: "| 产品 | 是否支持 |"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/others/fvsearch/aclcppdevg_03_1602.html
sourcePath: /source/zh/canncommercial/900/others/fvsearch/aclcppdevg_03_1602.html
indexId: 9d7abee23e9d03b49e0ad1e537ca151890cbaa7466eb864eb71e78a4d853ab1369
---
# aclfvCreateSearchResult

#### 产品支持情况

| 产品 | 是否支持 |
| --- | --- |
| Atlas 350 加速卡 | ☓ |
| Atlas A3 训练系列产品 / Atlas A3 推理系列产品 | ☓ |
| Atlas A2 训练系列产品 / Atlas A2 推理系列产品 | ☓ |
| Atlas 200I/500 A2 推理产品 | ☓ |
| Atlas 推理系列产品 | √ |
| Atlas 训练系列产品 | ☓ |


#### 功能说明

创建aclfvSearchResult类型的数据，表示创建检索结果信息。如需销毁aclfvSearchResult类型的数据，请参见aclfvDestroySearchResult。

Atlas 推理系列加速模块产品 不支持本接口。


#### 函数原型

```
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)
```


#### 参数说明

| 参数名 | 输入/输出 | 说明 |
| --- | --- | --- |
| queryCnt | 输入 | 检索请求个数，1:N场景为1。 |
| resultNum | 输入 | 结果个数的指针。 每个检索请求的结果个数。 |
| resultNumDataLen | 输入 | resultNum的内存总长度。 |
| id0 | 输入 | 一级库id的指针，总个数为topK\*queryCnt。 |
| id1 | 输入 | 二级库id的指针，总个数为topK\*queryCnt。 |
| resultOffset | 输入 | 偏移指针。 表示每个检索请求的检索结果对应底库的偏移，总个数为topK\*queryCnt。 |
| resultDistance | 输入 | 每个检索结果与检索请求间的距离的指针。 总个数为topK\*queryCnt。 |
| dataLen | 输入 | 申请的内存大小，计算公式为：topK\*queryCnt\*4Byte。 |


#### 返回值说明

- 返回aclfvSearchResult类型的指针，表示成功。
- 返回nullptr，表示失败。
