Files
hisi_SS524V100_SDK/mpp/include/ot_runtime_api.h
T

96 lines
4.7 KiB
C

/*
Copyright (c), 2001-2022, Shenshu Tech. Co., Ltd.
*/
#ifndef __OT_RUNTIME_API__
#define __OT_RUNTIME_API__
#include "ot_type.h"
#include "ot_common_runtime.h"
#ifdef __cplusplus
#if __cplusplus
extern "C" {
#endif
#endif /* __cplusplus */
/*****************************************************************************
* Prototype : OT_RTInit
* Description : Environment Init
* Parameters : td_char *globalSetting GlobalSetting for runtime
if NULL, use default
OT_RTMemCtrl *memCtrl Memory Controll by alloc,flush,and free
if NULL, use mmz
* Return Value : TD_SUCCESS: Success; Error codes: Failure.
*****************************************************************************/
td_s32 OT_RTInit(IN const td_char *globalSetting, IN const OT_RTMemCtrl *memCtrl);
/*****************************************************************************
* Prototype : OT_RTLoadModelGroup
* Description : Load model
* Parameters : td_char* modelGroupConfig Input Group Config
OT_RTGroupInfo* modelGroupAttr Group Info, such as wk,cop,connector
OT_RTGroupHandle* groupHandle output Group Handle
* Return Value : TD_SUCCESS: Success; Error codes: Failure.
*****************************************************************************/
td_s32 OT_RTLoadModelGroup(IN const td_char *modelGroupConfig,
IN OT_RTGroupInfo *modelGroupAttr,
OUT OT_RTGroupHandle *groupHandle);
/*****************************************************************************
* Prototype : OT_RTForwardGroupSync
* Description : Perform prediction on input sample(s), and output responses for corresponding sample(s), Sync Fuction
* Parameters : OT_RTGroupHandle groupHandle Group Handle generated by OT_RTLoadModelGroup
* OT_RTGroupSrcBlobArrayPtr src Input Blobs
* OT_RTGroupDstBlobArrayPtr dst Output Blobs.
td_u64 srcId the number of src
* Return Value: TD_SUCCESS: Success; Error codes: Failure.
*****************************************************************************/
td_s32 OT_RTForwardGroupSync(IN const OT_RTGroupHandle groupHandle,
IN const OT_RTGroupSrcBlobArrayPtr src,
OUT OT_RTGroupDstBlobArrayPtr dst,
IN td_u64 srcId);
/*****************************************************************************
* Prototype : OT_RTForwardGroupAsync
* Description : Perform prediction on input sample(s), and output responses for corresponding sample(s),
* ASync Function
* Parameters : OT_RTGroupHandle groupHandle Group Handle generated by OT_RTLoadModelGroup
* can't be NULL
* OT_RTGroupSrcBlobArrayPtr src Input Blobs
* OT_RTGroupDstBlobArrayPtr dst Output Blobs.
* td_u64 srcId Frame id set by user, can be duplicate number
* OT_RTForwardCallback cbFun Callback for ForwardGroup,
* can't be null
* Return Value: TD_SUCCESS: Success; Error codes: Failure.
*****************************************************************************/
td_s32 OT_RTForwardGroupAsync(IN const OT_RTGroupHandle groupHandle,
IN const OT_RTGroupSrcBlobArrayPtr src,
OUT OT_RTGroupDstBlobArrayPtr dst,
IN td_u64 srcId, IN OT_RTForwardCallback callbackFunc);
/*****************************************************************************
* Prototype : OT_RTUnloadModelGroup
* Description : Unload model
* Parameters : OT_RTGroupHandle groupHandle Group Handle generated by OT_RTLoadModelGroup
* can not be NULL
*
* Return Value : TD_SUCCESS: Success; Error codes: Failure.
*****************************************************************************/
td_s32 OT_RTUnloadModelGroup(IN const OT_RTGroupHandle groupHandle);
/*****************************************************************************
* Prototype : OT_RTDeInit
* Description : Environment DeInit
* Return Value : TD_SUCCESS: Success; Error codes: Failure.
*****************************************************************************/
td_s32 OT_RTDeInit();
#ifdef __cplusplus
#if __cplusplus
}
#endif
#endif /* __cplusplus */
#endif /* __OT_RUNTIME_API__ */