• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /**
2  * Copyright 2021 Huawei Technologies Co., Ltd
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 /**
18  * @addtogroup MindSpore
19  * @{
20  *
21  * @brief Provides APIs related to MindSpore Lite model inference.
22  *
23  * @Syscap SystemCapability.Ai.MindSpore
24  * @since 9
25  */
26 
27 /**
28  * @file data_type.h
29  * @kit MindSporeLiteKit
30  * @brief Declares tensor data types.
31  *
32  * @library libmindspore_lite_ndk.so
33  * @since 9
34  */
35 #ifndef MINDSPORE_INCLUDE_C_API_DATA_TYPE_C_H
36 #define MINDSPORE_INCLUDE_C_API_DATA_TYPE_C_H
37 
38 #include <stdint.h>
39 
40 #ifdef __cplusplus
41 extern "C" {
42 #endif
43 
44 typedef enum OH_AI_DataType {
45   OH_AI_DATATYPE_UNKNOWN = 0,
46   OH_AI_DATATYPE_OBJECTTYPE_STRING = 12,
47   OH_AI_DATATYPE_OBJECTTYPE_LIST = 13,
48   OH_AI_DATATYPE_OBJECTTYPE_TUPLE = 14,
49   OH_AI_DATATYPE_OBJECTTYPE_TENSOR = 17,
50   OH_AI_DATATYPE_NUMBERTYPE_BEGIN = 29,
51   OH_AI_DATATYPE_NUMBERTYPE_BOOL = 30,
52   OH_AI_DATATYPE_NUMBERTYPE_INT8 = 32,
53   OH_AI_DATATYPE_NUMBERTYPE_INT16 = 33,
54   OH_AI_DATATYPE_NUMBERTYPE_INT32 = 34,
55   OH_AI_DATATYPE_NUMBERTYPE_INT64 = 35,
56   OH_AI_DATATYPE_NUMBERTYPE_UINT8 = 37,
57   OH_AI_DATATYPE_NUMBERTYPE_UINT16 = 38,
58   OH_AI_DATATYPE_NUMBERTYPE_UINT32 = 39,
59   OH_AI_DATATYPE_NUMBERTYPE_UINT64 = 40,
60   OH_AI_DATATYPE_NUMBERTYPE_FLOAT16 = 42,
61   OH_AI_DATATYPE_NUMBERTYPE_FLOAT32 = 43,
62   OH_AI_DATATYPE_NUMBERTYPE_FLOAT64 = 44,
63   OH_AI_DATATYPE_NUMBERTYPE_END = 46,
64   // add new enum here
65   OH_AI_DataTypeInvalid = INT32_MAX,
66 } OH_AI_DataType;
67 
68 #ifdef __cplusplus
69 }
70 #endif
71 #endif  // MINDSPORE_INCLUDE_C_API_DATA_TYPE_C_H
72