diff --git a/zh-cn/native_sdk/ai/neural_network_runtime/neural_network_core.h b/zh-cn/native_sdk/ai/neural_network_runtime/neural_network_core.h index 0c801db20d25c343d180e99ec186bd126ceaf479..5fe2e9e9627774354ba6664b80d4cd1b7cf8a92a 100644 --- a/zh-cn/native_sdk/ai/neural_network_runtime/neural_network_core.h +++ b/zh-cn/native_sdk/ai/neural_network_runtime/neural_network_core.h @@ -27,7 +27,7 @@ * @file neural_network_core.h * * @brief Neural Network Core模块接口定义,AI推理框架使用Neural Network Core提供的Native接口,完成模型编译,并在加速硬件上执行推理和计算。\n - * + * 部分接口定义从neural_network_runtime.h移动至此头文件统一呈现,对于此类接口,API version 11版本之前即支持使用,各版本均可正常使用。 * 注意:Neural Network Core的接口目前均不支持多线程并发调用。 * * @include neural_network_runtime/neural_network_core.h diff --git a/zh-cn/native_sdk/ai/neural_network_runtime/neural_network_runtime.h b/zh-cn/native_sdk/ai/neural_network_runtime/neural_network_runtime.h index 3e91b2e8120c7acdf842ff3622ce416675b49420..ab8d0e3e02e96d64f94ff364ed553f4202f8a8f0 100644 --- a/zh-cn/native_sdk/ai/neural_network_runtime/neural_network_runtime.h +++ b/zh-cn/native_sdk/ai/neural_network_runtime/neural_network_runtime.h @@ -138,7 +138,7 @@ OH_NNModel *OH_NNModel_Construct(void); * @param model 指向{@link OH_NNModel}实例的指针。 * @param tensorDesc {@link NN_TensorDesc}张量的指针,{@link NN_TensorDesc}指定了添加到模型实例中张量的属性。 * @return 函数执行的结果状态。执行成功返回OH_NN_SUCCESS;失败返回具体错误码,具体失败错误码可参考{@link OH_NN_ReturnCode}。 - * @since 9 + * @since 11 * @version 1.0 */ OH_NN_ReturnCode OH_NNModel_AddTensorToModel(OH_NNModel *model, const NN_TensorDesc *tensorDesc); diff --git a/zh-cn/native_sdk/ai/neural_network_runtime/neural_network_runtime_type.h b/zh-cn/native_sdk/ai/neural_network_runtime/neural_network_runtime_type.h index e034495a2131d591a27da69694772bd2a540cb65..6fa02c036a5abe4c945f24d15c3217ae3942619e 100644 --- a/zh-cn/native_sdk/ai/neural_network_runtime/neural_network_runtime_type.h +++ b/zh-cn/native_sdk/ai/neural_network_runtime/neural_network_runtime_type.h @@ -105,7 +105,7 @@ typedef struct NN_Tensor NN_Tensor; * @since 9 * @version 1.0 */ -typedef enum OH_NN_PerformanceMode { +typedef enum { /** 无性能模式偏好。 */ OH_NN_PERFORMANCE_NONE = 0, /** 低能耗模式。 */ @@ -124,7 +124,7 @@ typedef enum OH_NN_PerformanceMode { * @since 9 * @version 1.0 */ -typedef enum OH_NN_Priority { +typedef enum { /** 无优先级偏好。 */ OH_NN_PRIORITY_NONE = 0, /** 低优先级。 */ @@ -141,7 +141,7 @@ typedef enum OH_NN_Priority { * @since 9 * @version 2.0 */ -typedef enum OH_NN_ReturnCode { +typedef enum { /** 操作成功。 */ OH_NN_SUCCESS = 0, /** 操作失败。 */ @@ -221,7 +221,7 @@ typedef void (*NN_OnServiceDied)(void *userData); * @since 9 * @version 1.0 */ -typedef enum OH_NN_FuseType : int8_t { +typedef enum : int8_t { /** 未指定融合激活函数。 */ OH_NN_FUSED_NONE = 0, /** 融合relu激活函数。 */ @@ -236,7 +236,7 @@ typedef enum OH_NN_FuseType : int8_t { * @since 9 * @version 2.0 */ -typedef enum OH_NN_Format { +typedef enum { /** 当张量没有特定的排布类型时(如标量或矢量),使用本枚举值。 */ OH_NN_FORMAT_NONE = 0, /** 当张量按照NCHW的格式排布数据时,使用本枚举值。 */ @@ -255,7 +255,7 @@ typedef enum OH_NN_Format { * @since 9 * @version 1.0 */ -typedef enum OH_NN_DeviceType { +typedef enum { /** 不属于CPU、GPU、专用加速器的设备。 */ OH_NN_OTHERS = 0, /** CPU设备。 */ @@ -272,7 +272,7 @@ typedef enum OH_NN_DeviceType { * @since 9 * @version 1.0 */ -typedef enum OH_NN_DataType { +typedef enum { /** 张量数据类型未知。 */ OH_NN_UNKNOWN = 0, /** 张量数据类型为bool。 */ @@ -308,7 +308,7 @@ typedef enum OH_NN_DataType { * @since 9 * @version 2.0 */ -typedef enum OH_NN_OperationType { +typedef enum { /** * 返回两个输入张量对应元素相加的和的张量。\n * @@ -2472,7 +2472,7 @@ typedef enum OH_NN_OperationType { * @since 9 * @version 2.0 */ -typedef enum OH_NN_TensorType { +typedef enum { /** 当张量作为模型(或算子)的输入或输出时,使用本枚举值。 */ OH_NN_TENSOR = 0,