Updated on 2022-03-13 GMT+08:00

Macro: HIAI_REGISTER_TEMPLATE_DATA_TYPE

Provides automatic serialization and deserialization mechanisms for various data types of a user-defined template. This macro is defined in data_type_reg.h.

This API needs to be registered on both the host side and the device side.

Syntax

HIAI_REGISTER_TEMPLATE_DATA_TYPE (name, type, basictype1, basictype2, ...)

Parameter Description

Parameter

Description

Value Range

name

Name of the user-defined data type. (The name must be unique for each data type.)

-

type

Data type of a user-defined template

-

basicType1

User-defined data type

-

basicType2

User-defined data type

-

...

...

-

Return Value

For details about the returned error codes, see "Error Codes."

Error Codes

No.

Error Code

Description

1

HIAI_OK

The running is OK.

2

HIAI_ENGINE_FUNCTOR_NULL

The HiAI Engine function is null.

3

HIAI_ENGINE_FUNCTOR_EXIST

The HiAI Engine function exists.