From bc38614aa57c0f73d33ecd2390692016d3883596 Mon Sep 17 00:00:00 2001 From: huangdongting Date: Sun, 8 Oct 2023 20:20:18 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8C=E6=AD=A5NDK=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: huangdongting --- .../neural_network_runtime.h | 1 + .../neural_network_runtime_type.h | 3 +- .../external_device_manager/usb/usb_ddk_api.h | 14 + .../graphic_2d/native_buffer/native_buffer.h | 44 +++ .../graphic_2d/native_image/native_image.h | 1 + .../native_vsync/libnative_vsync.ndk.json | 3 +- .../graphic_2d/native_vsync/native_vsync.h | 13 + .../native_window/external_window.h | 1 + resourceschedule/ffrt/ffrt.h | 30 -- security/huks/include/native_huks_param.h | 2 +- security/huks/include/native_huks_type.h | 2 +- startup/init/syscap/include/deviceinfo.h | 18 +- third_party/libuv/BUILD.gn | 324 +----------------- third_party/libuv/libuv.ndk.json | 284 --------------- third_party/mindspore/{ => kits}/BUILD.gn | 0 third_party/mindspore/{ => kits}/context.h | 21 +- third_party/mindspore/{ => kits}/data_type.h | 19 + third_party/mindspore/{ => kits}/format.h | 19 + third_party/mindspore/{ => kits}/model.h | 19 + third_party/mindspore/{ => kits}/status.h | 19 + third_party/mindspore/{ => kits}/tensor.h | 19 + third_party/mindspore/{ => kits}/types.h | 19 + third_party/musl/ndk_musl_include/aio.h | 4 - third_party/musl/ndk_musl_include/langinfo.h | 15 - third_party/musl/ndk_musl_include/malloc.h | 12 +- third_party/musl/ndk_musl_include/mqueue.h | 5 - third_party/musl/ndk_musl_include/pthread.h | 15 - .../musl/ndk_musl_include/sys/reboot.h | 15 - .../musl/ndk_script/copy_musl_sysroot.sh | 2 +- .../musl/ndk_script/copy_ndk_musl_headers.sh | 2 +- third_party/openGLES/GLES3/gl3.h | 2 +- 31 files changed, 236 insertions(+), 711 deletions(-) delete mode 100644 resourceschedule/ffrt/ffrt.h delete mode 100644 third_party/libuv/libuv.ndk.json rename third_party/mindspore/{ => kits}/BUILD.gn (100%) rename third_party/mindspore/{ => kits}/context.h (96%) rename third_party/mindspore/{ => kits}/data_type.h (85%) rename third_party/mindspore/{ => kits}/format.h (81%) rename third_party/mindspore/{ => kits}/model.h (94%) rename third_party/mindspore/{ => kits}/status.h (92%) rename third_party/mindspore/{ => kits}/tensor.h (94%) rename third_party/mindspore/{ => kits}/types.h (88%) diff --git a/ai/neural_network_runtime/neural_network_runtime.h b/ai/neural_network_runtime/neural_network_runtime.h index b5cc5e2fb..b7740e18b 100644 --- a/ai/neural_network_runtime/neural_network_runtime.h +++ b/ai/neural_network_runtime/neural_network_runtime.h @@ -31,6 +31,7 @@ * to construct and compile models and perform inference and computing on acceleration hardware. * Note: Currently, the APIs of Neural Network Runtime do not support multi-thread calling. \n * + * @library libneural_network_runtime.so * @since 9 * @version 1.0 */ diff --git a/ai/neural_network_runtime/neural_network_runtime_type.h b/ai/neural_network_runtime/neural_network_runtime_type.h index 3bbbb4c52..00aefb656 100644 --- a/ai/neural_network_runtime/neural_network_runtime_type.h +++ b/ai/neural_network_runtime/neural_network_runtime_type.h @@ -28,7 +28,8 @@ * @file neural_network_runtime_type.h * * @brief Defines the structure and enumeration for Neural Network Runtime. - * + * + * @library libneural_network_runtime.so * @since 9 * @version 1.0 */ diff --git a/drivers/external_device_manager/usb/usb_ddk_api.h b/drivers/external_device_manager/usb/usb_ddk_api.h index e7b08a575..e128a7d34 100644 --- a/drivers/external_device_manager/usb/usb_ddk_api.h +++ b/drivers/external_device_manager/usb/usb_ddk_api.h @@ -47,6 +47,7 @@ extern "C" { /** * @brief Initializes the DDK. * + * @permission ohos.permission.ACCESS_DDK_USB * @return 0 if the operation is successful; a negative value otherwise. * @since 10 * @version 1.0 @@ -56,6 +57,7 @@ int32_t OH_Usb_Init(void); /** * @brief Releases the DDK. * + * @permission ohos.permission.ACCESS_DDK_USB * @since 10 * @version 1.0 */ @@ -64,6 +66,7 @@ void OH_Usb_Release(void); /** * @brief Obtains the USB device descriptor. * + * @permission ohos.permission.ACCESS_DDK_USB * @param deviceId ID of the device whose descriptor is to be obtained. * @param desc Standard device descriptor defined in the USB protocol. * @return 0 if the operation is successful; a negative value otherwise. @@ -76,6 +79,7 @@ int32_t OH_Usb_GetDeviceDescriptor(uint64_t deviceId, struct UsbDeviceDescriptor * @brief Obtains the configuration descriptor. To avoid memory leakage, use OH_Usb_FreeConfigDescriptor\n * to release a descriptor after use. * + * @permission ohos.permission.ACCESS_DDK_USB * @param deviceId ID of the device whose configuration descriptor is to be obtained. * @param configIndex Configuration index, which corresponds to bConfigurationValue in the USB protocol. * @param config Configuration descriptor, which includes the standard configuration descriptor defined in the\n @@ -91,6 +95,7 @@ int32_t OH_Usb_GetConfigDescriptor( * @brief Releases the configuration descriptor. To avoid memory leakage, use OH_Usb_FreeConfigDescriptor\n * to release a descriptor after use. * + * @permission ohos.permission.ACCESS_DDK_USB * @param config Configuration descriptor obtained by calling OH_Usb_GetConfigDescriptor. * @since 10 * @version 1.0 @@ -100,6 +105,7 @@ void OH_Usb_FreeConfigDescriptor(struct UsbDdkConfigDescriptor * const config); /** * @brief Claims a USB interface. * + * @permission ohos.permission.ACCESS_DDK_USB * @param deviceId ID of the device to be operated. * @param interfaceIndex Interface index, which corresponds to bInterfaceNumber in the USB protocol. * @param interfaceHandle Interface operation handle. After the interface is claimed successfully, a value will be\n @@ -113,6 +119,7 @@ int32_t OH_Usb_ClaimInterface(uint64_t deviceId, uint8_t interfaceIndex, uint64_ /** * @brief Releases a USB interface. * + * @permission ohos.permission.ACCESS_DDK_USB * @param interfaceHandle Interface operation handle. * @return 0 if the operation is successful; a negative value otherwise. * @since 10 @@ -123,6 +130,7 @@ int32_t OH_Usb_ReleaseInterface(uint64_t interfaceHandle); /** * @brief Activates the alternate setting of the USB interface. * + * @permission ohos.permission.ACCESS_DDK_USB * @param interfaceHandle Interface operation handle. * @param settingIndex Index of the alternate setting, which corresponds to bAlternateSetting\n * in the USB protocol. @@ -135,6 +143,7 @@ int32_t OH_Usb_SelectInterfaceSetting(uint64_t interfaceHandle, uint8_t settingI /** * @brief Obtains the activated alternate setting of the USB interface. * + * @permission ohos.permission.ACCESS_DDK_USB * @param interfaceHandle Interface operation handle. * @param settingIndex Index of the alternate setting, which corresponds to bAlternateSetting\n * in the USB protocol. @@ -147,6 +156,7 @@ int32_t OH_Usb_GetCurrentInterfaceSetting(uint64_t interfaceHandle, uint8_t *set /** * @brief Sends a control read transfer request. This API works in a synchronous manner. * + * @permission ohos.permission.ACCESS_DDK_USB * @param interfaceHandle Interface operation handle. * @param setup Request data, which corresponds to Setup Data in the USB protocol. * @param timeout Timeout duration, in milliseconds. @@ -162,6 +172,7 @@ int32_t OH_Usb_SendControlReadRequest(uint64_t interfaceHandle, const struct Usb /** * @brief Sends a control write transfer request. This API works in a synchronous manner. * + * @permission ohos.permission.ACCESS_DDK_USB * @param interfaceHandle Interface operation handle. * @param setup Request data, which corresponds to Setup Data in the USB protocol. * @param timeout Timeout duration, in milliseconds. @@ -178,6 +189,7 @@ int32_t OH_Usb_SendControlWriteRequest(uint64_t interfaceHandle, const struct Us * @brief Sends a pipe request. This API works in a synchronous manner. This API applies to interrupt transfer\n * and bulk transfer. * + * @permission ohos.permission.ACCESS_DDK_USB * @param pipe Pipe used to transfer data. * @param devMmap Device memory map, which can be obtained by calling OH_Usb_CreateDeviceMemMap. * @return 0 if the operation is successful; a negative value otherwise. @@ -190,6 +202,7 @@ int32_t OH_Usb_SendPipeRequest(const struct UsbRequestPipe *pipe, UsbDeviceMemMa * @brief Creates a buffer. To avoid resource leakage, destroy a buffer by calling\n * OH_Usb_DestroyDeviceMemMap after use. * + * @permission ohos.permission.ACCESS_DDK_USB * @param deviceId ID of the device for which the buffer is to be created. * @param size Buffer size. * @param devMmap Data memory map, through which the created buffer is returned to the caller. @@ -202,6 +215,7 @@ int32_t OH_Usb_CreateDeviceMemMap(uint64_t deviceId, size_t size, UsbDeviceMemMa /** * @brief Destroys a buffer. To avoid resource leakage, destroy a buffer in time after use. * + * @permission ohos.permission.ACCESS_DDK_USB * @param devMmap Device memory map created by calling OH_Usb_CreateDeviceMemMap. * @since 10 * @version 1.0 diff --git a/graphic/graphic_2d/native_buffer/native_buffer.h b/graphic/graphic_2d/native_buffer/native_buffer.h index bb1cb0ddf..0099131f6 100644 --- a/graphic/graphic_2d/native_buffer/native_buffer.h +++ b/graphic/graphic_2d/native_buffer/native_buffer.h @@ -32,6 +32,7 @@ * * @brief Defines the functions for obtaining and using a native buffer. * + * @library libnative_buffer.so * @since 9 * @version 1.0 */ @@ -45,6 +46,48 @@ extern "C" { struct OH_NativeBuffer; typedef struct OH_NativeBuffer OH_NativeBuffer; +/** + * @brief Indicates the usage of a native buffer. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeBuffer + * @since 10 + * @version 1.0 + */ +enum OH_NativeBuffer_Usage { + NATIVEBUFFER_USAGE_CPU_READ = (1ULL << 0), /// < CPU read buffer */ + NATIVEBUFFER_USAGE_CPU_WRITE = (1ULL << 1), /// < CPU write memory */ + NATIVEBUFFER_USAGE_MEM_DMA = (1ULL << 3), /// < Direct memory access (DMA) buffer */ +}; + +/** + * @brief Indicates the format of a native buffer. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeBuffer + * @since 10 + * @version 1.0 + */ +enum OH_NativeBuffer_Format { + NATIVEBUFFER_PIXEL_FMT_RGB_565 = 3, /// < RGB565 format */ + NATIVEBUFFER_PIXEL_FMT_RGBA_5658, /// < RGBA5658 format */ + NATIVEBUFFER_PIXEL_FMT_RGBX_4444, /// < RGBX4444 format */ + NATIVEBUFFER_PIXEL_FMT_RGBA_4444, /// < RGBA4444 format */ + NATIVEBUFFER_PIXEL_FMT_RGB_444, /// < RGB444 format */ + NATIVEBUFFER_PIXEL_FMT_RGBX_5551, /// < RGBX5551 format */ + NATIVEBUFFER_PIXEL_FMT_RGBA_5551, /// < RGBA5551 format */ + NATIVEBUFFER_PIXEL_FMT_RGB_555, /// < RGB555 format */ + NATIVEBUFFER_PIXEL_FMT_RGBX_8888, /// < RGBX8888 format */ + NATIVEBUFFER_PIXEL_FMT_RGBA_8888, /// < RGBA8888 format */ + NATIVEBUFFER_PIXEL_FMT_RGB_888, /// < RGB888 format */ + NATIVEBUFFER_PIXEL_FMT_BGR_565, /// < BGR565 format */ + NATIVEBUFFER_PIXEL_FMT_BGRX_4444, /// < BGRX4444 format */ + NATIVEBUFFER_PIXEL_FMT_BGRA_4444, /// < BGRA4444 format */ + NATIVEBUFFER_PIXEL_FMT_BGRX_5551, /// < BGRX5551 format */ + NATIVEBUFFER_PIXEL_FMT_BGRA_5551, /// < BGRA5551 format */ + NATIVEBUFFER_PIXEL_FMT_BGRX_8888, /// < BGRX8888 format */ + NATIVEBUFFER_PIXEL_FMT_BGRA_8888, /// < BGRA8888 format */ + NATIVEBUFFER_PIXEL_FMT_BUTT = 0X7FFFFFFF /// < Invalid pixel format */ +}; + /** * @brief OH_NativeBuffer config. \n * Used to allocating new OH_NativeBuffer andquery parameters if existing ones. @@ -58,6 +101,7 @@ typedef struct { int32_t height; ///< Height in pixels int32_t format; ///< One of PixelFormat int32_t usage; ///< Combination of buffer usage + int32_t stride; ///< the stride of memory } OH_NativeBuffer_Config; /** diff --git a/graphic/graphic_2d/native_image/native_image.h b/graphic/graphic_2d/native_image/native_image.h index 6a12316d1..ada8357cb 100644 --- a/graphic/graphic_2d/native_image/native_image.h +++ b/graphic/graphic_2d/native_image/native_image.h @@ -32,6 +32,7 @@ * * @brief Defines the functions for obtaining and using a native image. * + * @library libnative_image.so * @since 9 * @version 1.0 */ diff --git a/graphic/graphic_2d/native_vsync/libnative_vsync.ndk.json b/graphic/graphic_2d/native_vsync/libnative_vsync.ndk.json index e2c78daa5..b702a1d7a 100644 --- a/graphic/graphic_2d/native_vsync/libnative_vsync.ndk.json +++ b/graphic/graphic_2d/native_vsync/libnative_vsync.ndk.json @@ -1,5 +1,6 @@ [ { "name": "OH_NativeVSync_Create" }, { "name": "OH_NativeVSync_Destroy" }, - { "name": "OH_NativeVSync_RequestFrame" } + { "name": "OH_NativeVSync_RequestFrame" }, + { "name": "OH_NativeVSync_GetPeriod" } ] \ No newline at end of file diff --git a/graphic/graphic_2d/native_vsync/native_vsync.h b/graphic/graphic_2d/native_vsync/native_vsync.h index fb2d0c0c4..2372eb139 100644 --- a/graphic/graphic_2d/native_vsync/native_vsync.h +++ b/graphic/graphic_2d/native_vsync/native_vsync.h @@ -32,6 +32,7 @@ * * @brief Defines the functions for obtaining and using a native vsync. * + * @library libnative_vsync.so * @since 9 * @version 1.0 */ @@ -80,6 +81,18 @@ void OH_NativeVSync_Destroy(OH_NativeVSync* nativeVsync); * @version 1.0 */ int OH_NativeVSync_RequestFrame(OH_NativeVSync* nativeVsync, OH_NativeVSync_FrameCallback callback, void* data); + +/** + * @brief Get vsync period. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeVsync + * @param nativeVsync Indicates the pointer to a NativeVsync. + * @param period Indicates the vsync period. + * @return Returns int32_t, return value == 0, success, otherwise, failed. + * @since 10 + * @version 1.0 + */ +int OH_NativeVSync_GetPeriod(OH_NativeVSync* nativeVsync, long long* period); #ifdef __cplusplus } #endif diff --git a/graphic/graphic_2d/native_window/external_window.h b/graphic/graphic_2d/native_window/external_window.h index 812558426..02dbbef3e 100644 --- a/graphic/graphic_2d/native_window/external_window.h +++ b/graphic/graphic_2d/native_window/external_window.h @@ -32,6 +32,7 @@ * * @brief Defines the functions for obtaining and using a native window. * + * @library libnative_window.so * @since 8 * @version 1.0 */ diff --git a/resourceschedule/ffrt/ffrt.h b/resourceschedule/ffrt/ffrt.h deleted file mode 100644 index de48d6f52..000000000 --- a/resourceschedule/ffrt/ffrt.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2023 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#ifndef FFRT_API_FFRT_H -#define FFRT_API_FFRT_H -#ifdef __cplusplus -#include "cpp/task.h" -#include "cpp/mutex.h" -#include "cpp/condition_variable.h" -#include "cpp/sleep.h" -#include "cpp/queue.h" -#else -#include "c/task.h" -#include "c/mutex.h" -#include "c/condition_variable.h" -#include "c/sleep.h" -#include "c/queue.h" -#endif -#endif diff --git a/security/huks/include/native_huks_param.h b/security/huks/include/native_huks_param.h index c375fe1f9..2da107aa9 100644 --- a/security/huks/include/native_huks_param.h +++ b/security/huks/include/native_huks_param.h @@ -21,7 +21,7 @@ * @{ * * @brief Defines the capabilities of OpenHarmony Universal KeyStore (HUKS) parameter sets. - * The HUKS APIs can be used to perform parameter set lifecycle management, + * The HUKS APIs can be used to perform parameter set lifecycle management, * including initializing a parameter set, adding parameters to a parameter set, constructing * a parameter set, and destroying a parameter set. * They can also be used to obtain parameters, copy parameter sets, and check parameter validity. diff --git a/security/huks/include/native_huks_type.h b/security/huks/include/native_huks_type.h index 9b51f56c9..6dcaa7a8c 100644 --- a/security/huks/include/native_huks_type.h +++ b/security/huks/include/native_huks_type.h @@ -447,7 +447,7 @@ enum OH_Huks_AuthAccessType { /** The key is invalid after the password is cleared. */ OH_HUKS_AUTH_ACCESS_INVALID_CLEAR_PASSWORD = 1 << 0, /** The key is invalid after a new biometric feature is enrolled. */ - OH_HUKS_AUTH_ACCESS_INVALID_NEW_BIO_ENROLL = 1 << 1, + OH_HUKS_AUTH_ACCESS_INVALID_NEW_BIO_ENROLL = 1 << 1 }; /** diff --git a/startup/init/syscap/include/deviceinfo.h b/startup/init/syscap/include/deviceinfo.h index cc1a504ff..955759bfb 100644 --- a/startup/init/syscap/include/deviceinfo.h +++ b/startup/init/syscap/include/deviceinfo.h @@ -46,7 +46,7 @@ const char *OH_GetManufacture(void); const char *OH_GetBrand(void); /** - * Obtains the external product series represented by a string. + * Obtains the product name speaded in the market * @syscap SystemCapability.Startup.SystemInfo * @since 10 */ @@ -95,14 +95,14 @@ const char *OH_GetBootloaderVersion(void); const char *OH_GetAbiList(void); /** - * Obtains the security patch level represented by a string. + * Obtains the security patch tag represented by a string. * @syscap SystemCapability.Startup.SystemInfo * @since 10 */ const char *OH_GetSecurityPatchTag(void); /** - * Obtains the product version represented by a string. + * Obtains the product version displayed for customer represented by a string. * @syscap SystemCapability.Startup.SystemInfo * @since 10 */ @@ -126,7 +126,7 @@ const char *OH_GetIncrementalVersion(void); const char *OH_GetOsReleaseType(void); /** - * Obtains the OS version represented by a string. + * Obtains the OS full version name represented by a string. * @syscap SystemCapability.Startup.SystemInfo * @since 10 */ @@ -154,35 +154,35 @@ int OH_GetFirstApiVersion(void); const char *OH_GetVersionId(void); /** - * Obtains the build types of the same baseline code. + * Obtains the build type of the current running OS. * @syscap SystemCapability.Startup.SystemInfo * @since 10 */ const char *OH_GetBuildType(void); /** - * Obtains the different build user of the same baseline code. + * Obtains the build user of the current running OS. * @syscap SystemCapability.Startup.SystemInfo * @since 10 */ const char *OH_GetBuildUser(void); /** - * Obtains the different build host of the same baseline code. + * Obtains the build host of the current running OS. * @syscap SystemCapability.Startup.SystemInfo * @since 10 */ const char *OH_GetBuildHost(void); /** - * Obtains the build time. + * Obtains the build time of the current running OS. * @syscap SystemCapability.Startup.SystemInfo * @since 10 */ const char *OH_GetBuildTime(void); /** - * Obtains the version hash. + * Obtains the version hash of the current running OS. * @syscap SystemCapability.Startup.SystemInfo * @since 10 */ diff --git a/third_party/libuv/BUILD.gn b/third_party/libuv/BUILD.gn index 6b4a49b2c..79322b852 100644 --- a/third_party/libuv/BUILD.gn +++ b/third_party/libuv/BUILD.gn @@ -18,329 +18,7 @@ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. -if (defined(ohos_lite)) { - import("//build/lite/config/component/lite_component.gni") - import("//build/lite/ndk/ndk.gni") - import("//third_party/libuv/libuv.gni") - - # This is the configuration needed to use libuv. - config("libuv_config") { - include_dirs = [ - "include", - "src", - "src/unix", - ] - cflags = [ - "-Wno-unused-parameter", - "-Wno-incompatible-pointer-types", - "-D_GNU_SOURCE", - "-D_POSIX_C_SOURCE=200112", - ] - - # Adding NDEBUG macro manually to avoid compilation - # error in debug version, FIX ME - # https://gitee.com/openharmony/build/pulls/1206/files - defines += [ "NDEBUG" ] - } - - # This is the configuration used to build libuv itself. - # It should not be needed outside of this library. - config("libuv_private_config") { - visibility = [ ":*" ] - include_dirs = [ - "include", - "src", - "src/unix", - ] - - # Adding NDEBUG macro manually to avoid compilation - # error in debug version, FIX ME - # https://gitee.com/openharmony/build/pulls/1206/files - defines += [ "NDEBUG" ] - } - - source_set("libuv_source") { - include_dirs = [ - "include", - "src", - "src/unix", - ] - - cflags = [ - "-Wno-unused-parameter", - "-Wno-incompatible-pointer-types", - "-D_GNU_SOURCE", - "-D_POSIX_C_SOURCE=200112", - "-U__linux__", - "-D__GNU__", - "-fPIC", - ] - - sources = [ - # common_source - "src/fs-poll.c", - "src/idna.c", - "src/inet.c", - "src/random.c", - "src/strscpy.c", - "src/threadpool.c", - "src/timer.c", - "src/uv-common.c", - "src/uv-data-getter-setters.c", - "src/version.c", - - # nonwin_srcs - "src/unix/async.c", - "src/unix/core.c", - "src/unix/dl.c", - "src/unix/epoll.c", - "src/unix/fs.c", - "src/unix/getaddrinfo.c", - "src/unix/getnameinfo.c", - "src/unix/loop-watcher.c", - "src/unix/loop.c", - "src/unix/no-fsevents.c", - "src/unix/pipe.c", - "src/unix/poll.c", - "src/unix/posix-hrtime.c", - "src/unix/posix-poll.c", - "src/unix/process.c", - "src/unix/random-devurandom.c", - "src/unix/signal.c", - "src/unix/stream.c", - "src/unix/tcp.c", - "src/unix/thread.c", - "src/unix/tty.c", - "src/unix/udp.c", - ] - } - - static_library("uv_static") { - deps = [ ":libuv_source" ] - public_configs = [ ":libuv_config" ] - } - - shared_library("uv") { - deps = [ ":libuv_source" ] - public_configs = [ ":libuv_config" ] - libs = [ - "pthread", - "dl", - ] - } -} else { - import("//build/ohos.gni") - import("//third_party/libuv/libuv.gni") - - common_source = [ - "src/fs-poll.c", - "src/idna.c", - "src/inet.c", - "src/random.c", - "src/strscpy.c", - "src/threadpool.c", - "src/timer.c", - "src/uv-common.c", - "src/uv-data-getter-setters.c", - "src/version.c", - ] - if (!is_mingw && !is_win) { - nonwin_srcs = [ - "src/unix/epoll.c", - "src/unix/async.c", - "src/unix/core.c", - "src/unix/dl.c", - "src/unix/fs.c", - "src/unix/getaddrinfo.c", - "src/unix/getnameinfo.c", - "src/unix/loop.c", - "src/unix/loop-watcher.c", - "src/unix/pipe.c", - "src/unix/poll.c", - "src/unix/process.c", - "src/unix/random-devurandom.c", - "src/unix/signal.c", - "src/unix/stream.c", - "src/unix/tcp.c", - "src/unix/thread.c", - "src/unix/tty.c", - "src/unix/udp.c", - ] - } - - # This is the configuration needed to use libuv. - config("libuv_config") { - include_dirs = [ - "include", - "src", - "src/unix", - ] - cflags = [ "-Wno-unused-parameter" ] - if (is_linux || is_ohos) { - cflags += [ - "-Wno-incompatible-pointer-types", - "-D_GNU_SOURCE", - "-D_POSIX_C_SOURCE=200112", - ] - - # Adding NDEBUG macro manually to avoid compilation - # error in debug version, FIX ME - # https://gitee.com/openharmony/build/pulls/1206/files - defines = [ "NDEBUG" ] - if (use_ffrt && is_ohos) { - defines += [ "USE_FFRT" ] - } - } else if (is_mingw || is_win) { - cflags += [ - "-Wno-missing-braces", - "-Wno-implicit-function-declaration", - "-Wno-error=return-type", - "-Wno-error=sign-compare", - "-Wno-error=unused-variable", - "-Wno-error=unknown-pragmas", - "-Wno-unused-variable", - ] - defines = [ - "WIN32_LEAN_AND_MEAN", - "_WIN32_WINNT=0x0600", - ] - - # Adding NDEBUG macro manually to avoid compilation - # error in debug version, FIX ME - # https://gitee.com/openharmony/build/pulls/1206/files - defines += [ "NDEBUG" ] - - libs = [ - "psapi", - "user32", - "advapi32", - "iphlpapi", - "userenv", - "ws2_32", - ] - } - } - - # This is the configuration used to build libuv itself. - # It should not be needed outside of this library. - config("libuv_private_config") { - visibility = [ ":*" ] - include_dirs = [ - "include", - "src", - "src/unix", - ] - - # Adding NDEBUG macro manually to avoid compilation - # error in debug version, FIX ME - # https://gitee.com/openharmony/build/pulls/1206/files - defines = [ "NDEBUG" ] - } - - ohos_source_set("libuv_source") { - configs = [ ":libuv_config" ] - sources = common_source - - if (is_mac || (defined(is_ios) && is_ios)) { - sources += nonwin_srcs + [ - "src/unix/bsd-ifaddrs.c", - "src/unix/kqueue.c", - "src/unix/random-getentropy.c", - "src/unix/darwin-proctitle.c", - "src/unix/darwin.c", - "src/unix/fsevents.c", - "src/unix/os390-proctitle.c", - ] - sources -= [ "src/unix/epoll.c" ] - } else if (is_mingw || is_win) { - sources += [ - "src/win/async.c", - "src/win/core.c", - "src/win/detect-wakeup.c", - "src/win/dl.c", - "src/win/error.c", - "src/win/fs-event.c", - "src/win/fs.c", - "src/win/getaddrinfo.c", - "src/win/getnameinfo.c", - "src/win/handle.c", - "src/win/loop-watcher.c", - "src/win/pipe.c", - "src/win/poll.c", - "src/win/process-stdio.c", - "src/win/process.c", - "src/win/signal.c", - "src/win/snprintf.c", - "src/win/stream.c", - "src/win/tcp.c", - "src/win/thread.c", - "src/win/tty.c", - "src/win/udp.c", - "src/win/util.c", - "src/win/winapi.c", - "src/win/winsock.c", - ] - } else if (is_ohos || (defined(is_android) && is_android)) { - sources += nonwin_srcs + [ - "src/unix/linux-core.c", - "src/unix/linux-inotify.c", - "src/unix/linux-syscalls.c", - "src/unix/procfs-exepath.c", - "src/unix/pthread-fixes.c", - "src/unix/random-getentropy.c", - "src/unix/random-getrandom.c", - "src/unix/random-sysctl-linux.c", - "src/unix/proctitle.c", - ] - if (use_ffrt) { - external_deps = [ "ffrt:libffrt" ] - } - } else if (is_linux) { - sources += nonwin_srcs + [ - "src/unix/linux-core.c", - "src/unix/linux-inotify.c", - "src/unix/linux-syscalls.c", - "src/unix/procfs-exepath.c", - "src/unix/random-getrandom.c", - "src/unix/random-sysctl-linux.c", - "src/unix/proctitle.c", - ] - } else { - sources += nonwin_srcs + [ - "src/unix/linux-core.c", - "src/unix/linux-inotify.c", - "src/unix/linux-syscalls.c", - "src/unix/procfs-exepath.c", - "src/unix/random-getrandom.c", - "src/unix/random-sysctl-linux.c", - "src/unix/proctitle.c", - ] - } - subsystem_name = "thirdparty" - part_name = "libuv" - } - - ohos_static_library("uv_static") { - deps = [ ":libuv_source" ] - public_configs = [ ":libuv_config" ] - subsystem_name = "thirdparty" - part_name = "libuv" - } - ohos_shared_library("uv") { - deps = [ ":libuv_source" ] - public_configs = [ ":libuv_config" ] - subsystem_name = "thirdparty" - innerapi_tags = [ "platformsdk" ] - part_name = "libuv" - if (is_ohos) { - output_extension = "so" - } - install_images = [ - "system", - "updater", - ] - } -} +import("//build/ohos.gni") ohos_ndk_library("libuv_ndk") { ndk_description_file = "./libuv.ndk.json" diff --git a/third_party/libuv/libuv.ndk.json b/third_party/libuv/libuv.ndk.json deleted file mode 100644 index aeff061fe..000000000 --- a/third_party/libuv/libuv.ndk.json +++ /dev/null @@ -1,284 +0,0 @@ -[ - {"name":"uv_version"}, - {"name":"uv_version_string"}, - {"name":"uv_replace_allocator"}, - {"name":"uv_default_loop"}, - {"name":"uv_loop_init"}, - {"name":"uv_loop_close"}, - {"name":"uv_loop_new"}, - {"name":"uv_loop_delete"}, - {"name":"uv_loop_size"}, - {"name":"uv_loop_alive"}, - {"name":"uv_loop_configure"}, - {"name":"uv_loop_fork"}, - {"name":"uv_run"}, - {"name":"uv_stop"}, - {"name":"uv_ref"}, - {"name":"uv_unref"}, - {"name":"uv_has_ref"}, - {"name":"uv_update_time"}, - {"name":"uv_now"}, - {"name":"uv_backend_fd"}, - {"name":"uv_backend_timeout"}, - {"name":"uv_translate_sys_error"}, - {"name":"uv_strerror"}, - {"name":"uv_strerror_r"}, - {"name":"uv_err_name"}, - {"name":"uv_err_name_r"}, - {"name":"uv_shutdown"}, - {"name":"uv_handle_size"}, - {"name":"uv_handle_get_type"}, - {"name":"uv_handle_type_name"}, - {"name":"uv_handle_get_data"}, - {"name":"uv_handle_get_loop"}, - {"name":"uv_handle_set_data"}, - {"name":"uv_req_size"}, - {"name":"uv_req_get_data"}, - {"name":"uv_req_set_data"}, - {"name":"uv_req_get_type"}, - {"name":"uv_req_type_name"}, - {"name":"uv_is_active"}, - {"name":"uv_walk"}, - {"name":"uv_print_all_handles"}, - {"name":"uv_print_active_handles"}, - {"name":"uv_close"}, - {"name":"uv_send_buffer_size"}, - {"name":"uv_recv_buffer_size"}, - {"name":"uv_fileno"}, - {"name":"uv_buf_init"}, - {"name":"uv_stream_get_write_queue_size"}, - {"name":"uv_listen"}, - {"name":"uv_accept"}, - {"name":"uv_read_start"}, - {"name":"uv_read_stop"}, - {"name":"uv_write"}, - {"name":"uv_write2"}, - {"name":"uv_try_write"}, - {"name":"uv_is_readable"}, - {"name":"uv_is_writable"}, - {"name":"uv_stream_set_blocking"}, - {"name":"uv_is_closing"}, - {"name":"uv_tcp_init"}, - {"name":"uv_tcp_init_ex"}, - {"name":"uv_tcp_open"}, - {"name":"uv_tcp_nodelay"}, - {"name":"uv_tcp_keepalive"}, - {"name":"uv_tcp_simultaneous_accepts"}, - {"name":"uv_tcp_bind"}, - {"name":"uv_tcp_getsockname"}, - {"name":"uv_tcp_getpeername"}, - {"name":"uv_tcp_close_reset"}, - {"name":"uv_tcp_connect"}, - {"name":"uv_udp_init"}, - {"name":"uv_udp_init_ex"}, - {"name":"uv_udp_open"}, - {"name":"uv_udp_bind"}, - {"name":"uv_udp_connect"}, - {"name":"uv_udp_getpeername"}, - {"name":"uv_udp_getsockname"}, - {"name":"uv_udp_set_membership"}, - {"name":"uv_udp_set_source_membership"}, - {"name":"uv_udp_set_multicast_loop"}, - {"name":"uv_udp_set_multicast_ttl"}, - {"name":"uv_udp_set_multicast_interface"}, - {"name":"uv_udp_set_broadcast"}, - {"name":"uv_udp_set_ttl"}, - {"name":"uv_udp_send"}, - {"name":"uv_udp_try_send"}, - {"name":"uv_udp_recv_start"}, - {"name":"uv_udp_recv_stop"}, - {"name":"uv_udp_get_send_queue_size"}, - {"name":"uv_udp_get_send_queue_count"}, - {"name":"uv_tty_init"}, - {"name":"uv_tty_set_mode"}, - {"name":"uv_tty_reset_mode"}, - {"name":"uv_tty_get_winsize"}, - {"name":"uv_tty_set_vterm_state"}, - {"name":"uv_tty_get_vterm_state"}, - {"name":"uv_guess_handle"}, - {"name":"uv_pipe_init"}, - {"name":"uv_pipe_open"}, - {"name":"uv_pipe_bind"}, - {"name":"uv_pipe_connect"}, - {"name":"uv_pipe_getsockname"}, - {"name":"uv_pipe_getpeername"}, - {"name":"uv_pipe_pending_instances"}, - {"name":"uv_pipe_pending_count"}, - {"name":"uv_pipe_pending_type"}, - {"name":"uv_pipe_chmod"}, - {"name":"uv_poll_init"}, - {"name":"uv_poll_init_socket"}, - {"name":"uv_poll_start"}, - {"name":"uv_poll_stop"}, - {"name":"uv_prepare_init"}, - {"name":"uv_prepare_start"}, - {"name":"uv_prepare_stop"}, - {"name":"uv_check_init"}, - {"name":"uv_check_start"}, - {"name":"uv_check_stop"}, - {"name":"uv_idle_init"}, - {"name":"uv_idle_start"}, - {"name":"uv_idle_stop"}, - {"name":"uv_async_init"}, - {"name":"uv_async_send"}, - {"name":"uv_timer_init"}, - {"name":"uv_timer_start"}, - {"name":"uv_timer_stop"}, - {"name":"uv_timer_again"}, - {"name":"uv_timer_set_repeat"}, - {"name":"uv_timer_get_repeat"}, - {"name":"uv_getaddrinfo"}, - {"name":"uv_freeaddrinfo"}, - {"name":"uv_getnameinfo"}, - {"name":"uv_spawn"}, - {"name":"uv_process_kill"}, - {"name":"uv_kill"}, - {"name":"uv_process_get_pid"}, - {"name":"uv_queue_work"}, - {"name":"uv_cancel"}, - {"name":"uv_setup_args"}, - {"name":"uv_get_process_title"}, - {"name":"uv_set_process_title"}, - {"name":"uv_resident_set_memory"}, - {"name":"uv_uptime"}, - {"name":"uv_get_osfhandle"}, - {"name":"uv_open_osfhandle"}, - {"name":"uv_getrusage"}, - {"name":"uv_os_homedir"}, - {"name":"uv_os_tmpdir"}, - {"name":"uv_os_get_passwd"}, - {"name":"uv_os_free_passwd"}, - {"name":"uv_os_getpid"}, - {"name":"uv_os_getppid"}, - {"name":"uv_os_getpriority"}, - {"name":"uv_os_setpriority"}, - {"name":"uv_cpu_info"}, - {"name":"uv_free_cpu_info"}, - {"name":"uv_interface_addresses"}, - {"name":"uv_free_interface_addresses"}, - {"name":"uv_os_environ"}, - {"name":"uv_os_free_environ"}, - {"name":"uv_os_getenv"}, - {"name":"uv_os_setenv"}, - {"name":"uv_os_unsetenv"}, - {"name":"uv_os_gethostname"}, - {"name":"uv_os_uname"}, - {"name":"uv_fs_get_type"}, - {"name":"uv_fs_get_result"}, - {"name":"uv_fs_get_ptr"}, - {"name":"uv_fs_get_path"}, - {"name":"uv_fs_get_statbuf"}, - {"name":"uv_fs_req_cleanup"}, - {"name":"uv_fs_close"}, - {"name":"uv_fs_open"}, - {"name":"uv_fs_read"}, - {"name":"uv_fs_unlink"}, - {"name":"uv_fs_write"}, - {"name":"uv_fs_copyfile"}, - {"name":"uv_fs_mkdir"}, - {"name":"uv_fs_mkdtemp"}, - {"name":"uv_fs_mkstemp"}, - {"name":"uv_fs_rmdir"}, - {"name":"uv_fs_scandir"}, - {"name":"uv_fs_scandir_next"}, - {"name":"uv_fs_opendir"}, - {"name":"uv_fs_readdir"}, - {"name":"uv_fs_closedir"}, - {"name":"uv_fs_stat"}, - {"name":"uv_fs_fstat"}, - {"name":"uv_fs_rename"}, - {"name":"uv_fs_fsync"}, - {"name":"uv_fs_fdatasync"}, - {"name":"uv_fs_ftruncate"}, - {"name":"uv_fs_sendfile"}, - {"name":"uv_fs_access"}, - {"name":"uv_fs_chmod"}, - {"name":"uv_fs_utime"}, - {"name":"uv_fs_futime"}, - {"name":"uv_fs_lstat"}, - {"name":"uv_fs_link"}, - {"name":"uv_fs_symlink"}, - {"name":"uv_fs_readlink"}, - {"name":"uv_fs_realpath"}, - {"name":"uv_fs_fchmod"}, - {"name":"uv_fs_chown"}, - {"name":"uv_fs_fchown"}, - {"name":"uv_fs_lchown"}, - {"name":"uv_fs_statfs"}, - {"name":"uv_fs_poll_init"}, - {"name":"uv_fs_poll_start"}, - {"name":"uv_fs_poll_stop"}, - {"name":"uv_fs_poll_getpath"}, - {"name":"uv_signal_init"}, - {"name":"uv_signal_start"}, - {"name":"uv_signal_start_oneshot"}, - {"name":"uv_signal_stop"}, - {"name":"uv_loadavg"}, - {"name":"uv_fs_event_init"}, - {"name":"uv_fs_event_start"}, - {"name":"uv_fs_event_stop"}, - {"name":"uv_fs_event_getpath"}, - {"name":"uv_ip4_addr"}, - {"name":"uv_ip6_addr"}, - {"name":"uv_ip4_name"}, - {"name":"uv_ip6_name"}, - {"name":"uv_inet_ntop"}, - {"name":"uv_inet_pton"}, - {"name":"uv_random"}, - {"name":"uv_if_indextoname"}, - {"name":"uv_if_indextoiid"}, - {"name":"uv_exepath"}, - {"name":"uv_cwd"}, - {"name":"uv_chdir"}, - {"name":"uv_get_free_memory"}, - {"name":"uv_get_total_memory"}, - {"name":"uv_get_constrained_memory"}, - {"name":"uv_hrtime"}, - {"name":"uv_sleep"}, - {"name":"uv_disable_stdio_inheritance"}, - {"name":"uv_dlopen"}, - {"name":"uv_dlclose"}, - {"name":"uv_dlsym"}, - {"name":"uv_dlerror"}, - {"name":"uv_mutex_init"}, - {"name":"uv_mutex_init_recursive"}, - {"name":"uv_mutex_destroy"}, - {"name":"uv_mutex_lock"}, - {"name":"uv_mutex_trylock"}, - {"name":"uv_mutex_unlock"}, - {"name":"uv_rwlock_init"}, - {"name":"uv_rwlock_destroy"}, - {"name":"uv_rwlock_rdlock"}, - {"name":"uv_rwlock_tryrdlock"}, - {"name":"uv_rwlock_rdunlock"}, - {"name":"uv_rwlock_wrlock"}, - {"name":"uv_rwlock_trywrlock"}, - {"name":"uv_rwlock_wrunlock"}, - {"name":"uv_sem_init"}, - {"name":"uv_sem_destroy"}, - {"name":"uv_sem_post"}, - {"name":"uv_sem_wait"}, - {"name":"uv_sem_trywait"}, - {"name":"uv_cond_init"}, - {"name":"uv_cond_destroy"}, - {"name":"uv_cond_signal"}, - {"name":"uv_cond_broadcast"}, - {"name":"uv_barrier_init"}, - {"name":"uv_barrier_destroy"}, - {"name":"uv_barrier_wait"}, - {"name":"uv_cond_wait"}, - {"name":"uv_cond_timedwait"}, - {"name":"uv_once"}, - {"name":"uv_key_create"}, - {"name":"uv_key_delete"}, - {"name":"uv_key_get"}, - {"name":"uv_key_set"}, - {"name":"uv_gettimeofday"}, - {"name":"uv_thread_create"}, - {"name":"uv_thread_create_ex"}, - {"name":"uv_thread_self"}, - {"name":"uv_thread_join"}, - {"name":"uv_thread_equal"}, - {"name":"uv_loop_get_data"}, - {"name":"uv_loop_set_data"} -] diff --git a/third_party/mindspore/BUILD.gn b/third_party/mindspore/kits/BUILD.gn similarity index 100% rename from third_party/mindspore/BUILD.gn rename to third_party/mindspore/kits/BUILD.gn diff --git a/third_party/mindspore/context.h b/third_party/mindspore/kits/context.h similarity index 96% rename from third_party/mindspore/context.h rename to third_party/mindspore/kits/context.h index 0e5ff0231..c377bcc4c 100644 --- a/third_party/mindspore/context.h +++ b/third_party/mindspore/kits/context.h @@ -13,6 +13,25 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + +/** + * @addtogroup MindSpore + * @{ + * + * @brief 提供MindSpore Lite的模型推理相关接口。 + * + * @Syscap SystemCapability.Ai.MindSpore + * @since 9 + */ + +/** + * @file context.h + * + * @brief 提供了Context相关的接口,可以配置运行时信息。 + * + * @library libmindspore_lite_ndk.so + * @since 9 + */ #ifndef MINDSPORE_INCLUDE_C_API_CONTEXT_C_H #define MINDSPORE_INCLUDE_C_API_CONTEXT_C_H @@ -112,7 +131,7 @@ OH_AI_API void OH_AI_ContextSetEnableParallel(OH_AI_ContextHandle context, bool * @return Bool value that indicates whether in parallel. * @since 9 */ - OH_AI_API bool OH_AI_ContextGetEnableParallel(const OH_AI_ContextHandle context); +OH_AI_API bool OH_AI_ContextGetEnableParallel(const OH_AI_ContextHandle context); /** * @brief Add device info to context object. diff --git a/third_party/mindspore/data_type.h b/third_party/mindspore/kits/data_type.h similarity index 85% rename from third_party/mindspore/data_type.h rename to third_party/mindspore/kits/data_type.h index 124ed17b3..6b709b2b4 100644 --- a/third_party/mindspore/data_type.h +++ b/third_party/mindspore/kits/data_type.h @@ -13,6 +13,25 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + +/** + * @addtogroup MindSpore + * @{ + * + * @brief 提供MindSpore Lite的模型推理相关接口。 + * + * @Syscap SystemCapability.Ai.MindSpore + * @since 9 + */ + +/** + * @file data_type.h + * + * @brief 声明了张量的数据的类型。 + * + * @library libmindspore_lite_ndk.so + * @since 9 + */ #ifndef MINDSPORE_INCLUDE_C_API_DATA_TYPE_C_H #define MINDSPORE_INCLUDE_C_API_DATA_TYPE_C_H diff --git a/third_party/mindspore/format.h b/third_party/mindspore/kits/format.h similarity index 81% rename from third_party/mindspore/format.h rename to third_party/mindspore/kits/format.h index 36b355fe6..8cb8a806e 100644 --- a/third_party/mindspore/format.h +++ b/third_party/mindspore/kits/format.h @@ -13,6 +13,25 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + +/** + * @addtogroup MindSpore + * @{ + * + * @brief 提供MindSpore Lite的模型推理相关接口。 + * + * @Syscap SystemCapability.Ai.MindSpore + * @since 9 + */ + +/** + * @file format.h + * + * @brief 提供张量数据的排列格式。 + * + * @library libmindspore_lite_ndk.so + * @since 9 + */ #ifndef MINDSPORE_INCLUDE_C_API_FORMAT_C_H #define MINDSPORE_INCLUDE_C_API_FORMAT_C_H diff --git a/third_party/mindspore/model.h b/third_party/mindspore/kits/model.h similarity index 94% rename from third_party/mindspore/model.h rename to third_party/mindspore/kits/model.h index 870b9be3a..03c9e5e1a 100644 --- a/third_party/mindspore/model.h +++ b/third_party/mindspore/kits/model.h @@ -13,6 +13,25 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + +/** + * @addtogroup MindSpore + * @{ + * + * @brief 提供MindSpore Lite的模型推理相关接口。 + * + * @Syscap SystemCapability.Ai.MindSpore + * @since 9 + */ + +/** + * @file model.h + * + * @brief 提供了模型相关接口,可以用于模型创建、模型推理等。 + * + * @library libmindspore_lite_ndk.so + * @since 9 + */ #ifndef MINDSPORE_INCLUDE_C_API_MODEL_C_H #define MINDSPORE_INCLUDE_C_API_MODEL_C_H diff --git a/third_party/mindspore/status.h b/third_party/mindspore/kits/status.h similarity index 92% rename from third_party/mindspore/status.h rename to third_party/mindspore/kits/status.h index 102c7962a..6bff13d4f 100644 --- a/third_party/mindspore/status.h +++ b/third_party/mindspore/kits/status.h @@ -13,6 +13,25 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + +/** + * @addtogroup MindSpore + * @{ + * + * @brief 提供MindSpore Lite的模型推理相关接口。 + * + * @Syscap SystemCapability.Ai.MindSpore + * @since 9 + */ + +/** + * @file status.h + * + * @brief 提供了Mindspore Lite运行时的状态码。 + * + * @library libmindspore_lite_ndk.so + * @since 9 + */ #ifndef MINDSPORE_INCLUDE_C_API_STATUS_C_H #define MINDSPORE_INCLUDE_C_API_STATUS_C_H diff --git a/third_party/mindspore/tensor.h b/third_party/mindspore/kits/tensor.h similarity index 94% rename from third_party/mindspore/tensor.h rename to third_party/mindspore/kits/tensor.h index ab936299f..6261f35f1 100644 --- a/third_party/mindspore/tensor.h +++ b/third_party/mindspore/kits/tensor.h @@ -13,6 +13,25 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + +/** + * @addtogroup MindSpore + * @{ + * + * @brief 提供MindSpore Lite的模型推理相关接口。 + * + * @Syscap SystemCapability.Ai.MindSpore + * @since 9 + */ + +/** + * @file tensor.h + * + * @brief 提供了张量相关的接口,可用于创建和修改张量信息。 + * + * @library libmindspore_lite_ndk.so + * @since 9 + */ #ifndef MINDSPORE_INCLUDE_C_API_TENSOE_C_H #define MINDSPORE_INCLUDE_C_API_TENSOE_C_H diff --git a/third_party/mindspore/types.h b/third_party/mindspore/kits/types.h similarity index 88% rename from third_party/mindspore/types.h rename to third_party/mindspore/kits/types.h index d38660b0d..4b45a664b 100644 --- a/third_party/mindspore/types.h +++ b/third_party/mindspore/kits/types.h @@ -13,6 +13,25 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + +/** + * @addtogroup MindSpore + * @{ + * + * @brief 提供MindSpore Lite的模型推理相关接口。 + * + * @Syscap SystemCapability.Ai.MindSpore + * @since 9 + */ + +/** + * @file types.h + * + * @brief 提供了MindSpore Lite支持的模型文件类型和设备类型。 + * + * @library libmindspore_lite_ndk.so + * @since 9 + */ #ifndef MINDSPORE_INCLUDE_C_API_TYPES_C_H #define MINDSPORE_INCLUDE_C_API_TYPES_C_H diff --git a/third_party/musl/ndk_musl_include/aio.h b/third_party/musl/ndk_musl_include/aio.h index 0368ada8a..eb89d9169 100644 --- a/third_party/musl/ndk_musl_include/aio.h +++ b/third_party/musl/ndk_musl_include/aio.h @@ -44,10 +44,6 @@ struct aiocb { #define off64_t off_t #endif -#if _REDIR_TIME64 -__REDIR(aio_suspend, __aio_suspend_time64); -#endif - #ifdef __cplusplus } #endif diff --git a/third_party/musl/ndk_musl_include/langinfo.h b/third_party/musl/ndk_musl_include/langinfo.h index 124611738..7c93f17c7 100644 --- a/third_party/musl/ndk_musl_include/langinfo.h +++ b/third_party/musl/ndk_musl_include/langinfo.h @@ -1,18 +1,3 @@ -/** - * Copyright (c) 2022 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - #ifndef _LANGINFO_H #define _LANGINFO_H diff --git a/third_party/musl/ndk_musl_include/malloc.h b/third_party/musl/ndk_musl_include/malloc.h index 86cd9501f..4817d5a5e 100644 --- a/third_party/musl/ndk_musl_include/malloc.h +++ b/third_party/musl/ndk_musl_include/malloc.h @@ -9,16 +9,22 @@ extern "C" { #include -#define M_SET_THREAD_CACHE -1001 +#define M_SET_THREAD_CACHE (-1001) #define M_THREAD_CACHE_ENABLE 1 #define M_THREAD_CACHE_DISABLE 0 -#define M_FLUSH_THREAD_CACHE -1002 +#define M_FLUSH_THREAD_CACHE (-1002) -#define M_DELAYED_FREE -1003 +#define M_DELAYED_FREE (-1003) #define M_DELAYED_FREE_ENABLE 1 #define M_DELAYED_FREE_DISABLE 0 +#define M_OHOS_CONFIG (-1004) +#define M_DISABLE_OPT_TCACHE 100 +#define M_ENABLE_OPT_TCACHE 101 +#define M_TCACHE_PERFORMANCE_MODE 102 +#define M_TCACHE_NORMAL_MODE 103 + void *malloc (size_t); void *calloc (size_t, size_t); void *realloc (void *, size_t); diff --git a/third_party/musl/ndk_musl_include/mqueue.h b/third_party/musl/ndk_musl_include/mqueue.h index 4616f0763..59c8de63a 100644 --- a/third_party/musl/ndk_musl_include/mqueue.h +++ b/third_party/musl/ndk_musl_include/mqueue.h @@ -19,11 +19,6 @@ struct mq_attr { }; struct sigevent; -#if _REDIR_TIME64 -__REDIR(mq_timedreceive, __mq_timedreceive_time64); -__REDIR(mq_timedsend, __mq_timedsend_time64); -#endif - #ifdef __cplusplus } #endif diff --git a/third_party/musl/ndk_musl_include/pthread.h b/third_party/musl/ndk_musl_include/pthread.h index 33e6a3eda..456723755 100644 --- a/third_party/musl/ndk_musl_include/pthread.h +++ b/third_party/musl/ndk_musl_include/pthread.h @@ -1,18 +1,3 @@ -/* - * Copyright (c) 2022 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - #ifndef _PTHREAD_H #define _PTHREAD_H #ifdef __cplusplus diff --git a/third_party/musl/ndk_musl_include/sys/reboot.h b/third_party/musl/ndk_musl_include/sys/reboot.h index 3f4b7ceca..88bb1a9c1 100644 --- a/third_party/musl/ndk_musl_include/sys/reboot.h +++ b/third_party/musl/ndk_musl_include/sys/reboot.h @@ -1,18 +1,3 @@ -/* - * Copyright (c) 2022 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - #ifndef _SYS_REBOOT_H #define _SYS_REBOOT_H #ifdef __cplusplus diff --git a/third_party/musl/ndk_script/copy_musl_sysroot.sh b/third_party/musl/ndk_script/copy_musl_sysroot.sh index d8c700b3b..07ce2cb3d 100755 --- a/third_party/musl/ndk_script/copy_musl_sysroot.sh +++ b/third_party/musl/ndk_script/copy_musl_sysroot.sh @@ -37,4 +37,4 @@ mv ${OUT_DIR}/asm ${OUT_DIR}/${TARGET_ARCH}-linux-ohos/ cp -rp ${OUT_DIR}/asm-x86/asm ${OUT_DIR}/x86_64-linux-ohos mv ${OUT_DIR}/asm-x86/asm ${OUT_DIR}/i686-linux-ohos -rm -fr ${OUT_DIR}/asm-x86 +rm -fr ${OUT_DIR}/asm-x86 \ No newline at end of file diff --git a/third_party/musl/ndk_script/copy_ndk_musl_headers.sh b/third_party/musl/ndk_script/copy_ndk_musl_headers.sh index 40d8099fe..4f6dfb87a 100755 --- a/third_party/musl/ndk_script/copy_ndk_musl_headers.sh +++ b/third_party/musl/ndk_script/copy_ndk_musl_headers.sh @@ -25,4 +25,4 @@ if [ ! -d "${OUT_DIR}" ];then mkdir -p ${OUT_DIR} fi -cp -rp ${SOURCE_DIR}/* ${OUT_DIR} +cp -rp ${SOURCE_DIR}/* ${OUT_DIR} \ No newline at end of file diff --git a/third_party/openGLES/GLES3/gl3.h b/third_party/openGLES/GLES3/gl3.h index a31743e0b..eb823e1e1 100644 --- a/third_party/openGLES/GLES3/gl3.h +++ b/third_party/openGLES/GLES3/gl3.h @@ -25,7 +25,7 @@ extern "C" { #define GL_GLES_PROTOTYPES 1 #endif -/* Generated on date 20210107 */ +/* Generated on date 20230220 */ /* Generated C header for: * API: gles2 -- Gitee