更新时间:2021-03-18 GMT+08:00
分享

Graph::UpdateEngineConfig

通过HiAI接口更新指定Engine的参数。该接口在graph.h中定义。

使用场景:

通过该接口,更新流程运行过程中指定的运行参数。

例如:视频抓拍图场景,需要根据白天黑夜的变化更新运行流程,则需要通过UpdataEngineConfig函数将白天/黑夜的数值更新入Engine。

函数格式

static HIAI_StatusT Graph::UpdateEngineConfig(const uint32_t& graphId, const uint32_t& engineId, const AIConfig& aiConfig, const bool& syncFlag = false)

参数说明

参数

说明

取值范围

graphId

Graph ID

-

engineId

engine ID

-

aiConfig

配置参数

-

syncFlag

同步/异步执行,同步则等待返回结果

true/false

返回值

返回的部分错误码请参见“错误码示例”中的“错误码”列。

错误码示例

序号

错误码

错误码描述

1

HIAI_OK

running ok

2

HIAI_GRAPH_NOT_EXIST

graph not exist

3

HIAI_GRAPH_MEMORY_POOL_NOT_EXISTED

memory pool is not existed

4

HIAI_GRAPH_MALLOC_LARGER

failed to malloc buffer due to the size larger than 256M

5

HIAI_MEMORY_POOL_UPDATE_FAILED

failed to update memory pool

6

HIAI_GRAPH_SENDMSG_FAILED

hdc send msg failed

7

HIAI_GRAPH_MEMORY_POOL_INITED

memory pool has inited

8

HIAI_GRAPH_NO_MEMORY

no memory

分享:

    相关文档

    相关产品