• 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 提供MindSpore Lite的模型推理相关接口。
22  *
23  * @Syscap SystemCapability.Ai.MindSpore
24  * @since 9
25  */
26 
27 /**
28  * @file format.h
29  *
30  * @brief 提供张量数据的排列格式。
31  *
32  * @library libmindspore_lite_ndk.so
33  * @since 9
34  */
35 #ifndef MINDSPORE_INCLUDE_C_API_FORMAT_C_H
36 #define MINDSPORE_INCLUDE_C_API_FORMAT_C_H
37 
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
41 
42 typedef enum OH_AI_Format {
43   OH_AI_FORMAT_NCHW = 0,
44   OH_AI_FORMAT_NHWC = 1,
45   OH_AI_FORMAT_NHWC4 = 2,
46   OH_AI_FORMAT_HWKC = 3,
47   OH_AI_FORMAT_HWCK = 4,
48   OH_AI_FORMAT_KCHW = 5,
49   OH_AI_FORMAT_CKHW = 6,
50   OH_AI_FORMAT_KHWC = 7,
51   OH_AI_FORMAT_CHWK = 8,
52   OH_AI_FORMAT_HW = 9,
53   OH_AI_FORMAT_HW4 = 10,
54   OH_AI_FORMAT_NC = 11,
55   OH_AI_FORMAT_NC4 = 12,
56   OH_AI_FORMAT_NC4HW4 = 13,
57   OH_AI_FORMAT_NCDHW = 15,
58   OH_AI_FORMAT_NWC = 16,
59   OH_AI_FORMAT_NCW = 17
60 } OH_AI_Format;
61 
62 #ifdef __cplusplus
63 }
64 #endif
65 #endif  // MINDSPORE_INCLUDE_C_API_FORMAT_C_H
66