• 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 format.h
29  *
30  * @brief Declares tensor data formats.
31  *
32  * @since 9
33  */
34 #ifndef MINDSPORE_INCLUDE_C_API_FORMAT_C_H
35 #define MINDSPORE_INCLUDE_C_API_FORMAT_C_H
36 
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
40 /**
41  * @brief Declares data formats supported by MSTensor.
42  *
43  * @since 9
44  */
45 typedef enum OH_AI_Format {
46   /** NCHW format */
47   OH_AI_FORMAT_NCHW = 0,
48   /** NHWC format */
49   OH_AI_FORMAT_NHWC = 1,
50   /** NHWC4 format */
51   OH_AI_FORMAT_NHWC4 = 2,
52   /** HWKC format */
53   OH_AI_FORMAT_HWKC = 3,
54   /** HWCK format */
55   OH_AI_FORMAT_HWCK = 4,
56   /** KCHW format */
57   OH_AI_FORMAT_KCHW = 5,
58   /** CKHW format */
59   OH_AI_FORMAT_CKHW = 6,
60   /** KHWC format */
61   OH_AI_FORMAT_KHWC = 7,
62   /** CHWK format */
63   OH_AI_FORMAT_CHWK = 8,
64   /** HW format */
65   OH_AI_FORMAT_HW = 9,
66   /** HW4 format */
67   OH_AI_FORMAT_HW4 = 10,
68   /** NC format */
69   OH_AI_FORMAT_NC = 11,
70   /** NC4 format */
71   OH_AI_FORMAT_NC4 = 12,
72   /** NC4HW4 format */
73   OH_AI_FORMAT_NC4HW4 = 13,
74   /** NCDHW format */
75   OH_AI_FORMAT_NCDHW = 15,
76   /** NWC format */
77   OH_AI_FORMAT_NWC = 16,
78   /** NCW format */
79   OH_AI_FORMAT_NCW = 17
80 } OH_AI_Format;
81 
82 #ifdef __cplusplus
83 }
84 #endif
85 
86 /** @} */
87 #endif // MINDSPORE_INCLUDE_C_API_FORMAT_C_H
88