1 /*
2  * Copyright (c) 2021 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 /**
17  * @addtogroup ai_datatype
18  * @{
19  *
20  * @brief Defines the basic array structure, including the array type and size.
21  *
22  * @since 2.2
23  * @version 1.0
24  */
25 
26 /**
27  * @file ai_datatype.h
28  *
29  * @brief Declares the basic array structure, including the array type and size.
30  *
31  * @since 2.2
32  * @version 1.0
33  */
34 
35 #ifndef AI_DATATYPE_H
36 #define AI_DATATYPE_H
37 
38 #include <cstddef>
39 #include <cstdint>
40 
41 namespace OHOS {
42 namespace AI {
43 /**
44  * @brief Defines the basic array structure, which is used to represent various data in the AI subsystem.
45  *
46  * @since 2.2
47  * @version 1.0
48  */
49 template<typename T>
50 struct Array {
51     /* Pointer to the start address of the array */
52     T *data;
53     /* Array size */
54     size_t size;
55 };
56 }  // namespace AI
57 }  // namespace OHOS
58 #endif // AI_DATATYPE_H
59 /** @} */