mirror of
https://gitee.com/openharmony/interface_sdk_c
synced 2024-11-23 06:39:54 +00:00
同步NDK
Signed-off-by: huangdongting <huangdongting3@huawei.com>
This commit is contained in:
parent
8a2944c884
commit
7875955258
@ -14,21 +14,21 @@
|
||||
import("//build/ohos.gni")
|
||||
|
||||
ohos_ndk_library("libneural_network_runtime_ndk") {
|
||||
output_name = "neural_network_runtime.z"
|
||||
output_extension = "so"
|
||||
ndk_description_file = "libneural_network_runtime.ndk.json"
|
||||
min_compact_version = "9"
|
||||
system_capability = "SystemCapability.AI.NeuralNetworkRuntime"
|
||||
system_capability_headers = [
|
||||
"neural_network_runtime.h",
|
||||
"neural_network_runtime_type.h",
|
||||
]
|
||||
output_name = "neural_network_runtime"
|
||||
output_extension = "so"
|
||||
ndk_description_file = "libneural_network_runtime.ndk.json"
|
||||
min_compact_version = "9"
|
||||
system_capability = "SystemCapability.AI.NeuralNetworkRuntime"
|
||||
system_capability_headers = [
|
||||
"neural_network_runtime.h",
|
||||
"neural_network_runtime_type.h",
|
||||
]
|
||||
}
|
||||
|
||||
ohos_ndk_headers("libneural_network_runtime_header") {
|
||||
dest_dir = "$ndk_headers_out_dir/neural_network_runtime"
|
||||
sources = [
|
||||
"neural_network_runtime.h",
|
||||
"neural_network_runtime_type.h",
|
||||
]
|
||||
}
|
||||
dest_dir = "$ndk_headers_out_dir/neural_network_runtime"
|
||||
sources = [
|
||||
"neural_network_runtime.h",
|
||||
"neural_network_runtime_type.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
|
||||
*/
|
||||
|
@ -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
|
||||
*/
|
||||
|
@ -47,6 +47,7 @@ extern "C" {
|
||||
/**
|
||||
* @brief Initializes the DDK.
|
||||
*
|
||||
* @permission ohos.permission.ACCESS_DDK_USB
|
||||
* @return <b>0</b> 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 <b>0</b> 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 <b>OH_Usb_FreeConfigDescriptor</b>\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 <b>bConfigurationValue</b> 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 <b>OH_Usb_FreeConfigDescriptor</b>\n
|
||||
* to release a descriptor after use.
|
||||
*
|
||||
* @permission ohos.permission.ACCESS_DDK_USB
|
||||
* @param config Configuration descriptor obtained by calling <b>OH_Usb_GetConfigDescriptor</b>.
|
||||
* @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 <b>bInterfaceNumber</b> 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 <b>0</b> 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 <b>bAlternateSetting</b>\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 <b>bAlternateSetting</b>\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 <b>Setup Data</b> 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 <b>Setup Data</b> 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 <b>OH_Usb_CreateDeviceMemMap</b>.
|
||||
* @return <b>0</b> 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
|
||||
* <b>OH_Usb_DestroyDeviceMemMap</b> 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 <b>OH_Usb_CreateDeviceMemMap</b>.
|
||||
* @since 10
|
||||
* @version 1.0
|
||||
|
36
graphic/graphic_2d/GLES2/BUILD.gn
Normal file
36
graphic/graphic_2d/GLES2/BUILD.gn
Normal file
@ -0,0 +1,36 @@
|
||||
# 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.
|
||||
|
||||
import("//build/ohos.gni")
|
||||
import("//build/ohos/ndk/ndk.gni")
|
||||
|
||||
ohos_ndk_headers("GLES2_header") {
|
||||
dest_dir = "$ndk_headers_out_dir/GLES2"
|
||||
sources = [
|
||||
"../../../third_party/openGLES/GLES2/gl2.h",
|
||||
"../../../third_party/openGLES/GLES2/gl2ext.h",
|
||||
"../../../third_party/openGLES/GLES2/gl2platform.h",
|
||||
]
|
||||
}
|
||||
|
||||
ohos_ndk_library("libGLESv2_ndk") {
|
||||
output_name = "GLESv2"
|
||||
output_extension = "so"
|
||||
ndk_description_file = "./libGLESv2.ndk.json"
|
||||
system_capability = "SystemCapability.Graphic.Graphic2D.GLES2"
|
||||
system_capability_headers = [
|
||||
"GLES2/gl2.h",
|
||||
"GLES2/gl2ext.h",
|
||||
"GLES2/gl2platform.h",
|
||||
]
|
||||
}
|
675
graphic/graphic_2d/GLES2/libGLESv2.ndk.json
Normal file
675
graphic/graphic_2d/GLES2/libGLESv2.ndk.json
Normal file
@ -0,0 +1,675 @@
|
||||
[
|
||||
{ "name": "glActiveTexture" },
|
||||
{ "name": "glAttachShader" },
|
||||
{ "name": "glBindAttribLocation" },
|
||||
{ "name": "glBindBuffer" },
|
||||
{ "name": "glBindFramebuffer" },
|
||||
{ "name": "glBindRenderbuffer" },
|
||||
{ "name": "glBindTexture" },
|
||||
{ "name": "glBlendColor" },
|
||||
{ "name": "glBlendEquation" },
|
||||
{ "name": "glBlendEquationSeparate" },
|
||||
{ "name": "glBlendFunc" },
|
||||
{ "name": "glBlendFuncSeparate" },
|
||||
{ "name": "glBufferData" },
|
||||
{ "name": "glBufferSubData" },
|
||||
{ "name": "glCheckFramebufferStatus" },
|
||||
{ "name": "glClear" },
|
||||
{ "name": "glClearColor" },
|
||||
{ "name": "glClearDepthf" },
|
||||
{ "name": "glClearStencil" },
|
||||
{ "name": "glColorMask" },
|
||||
{ "name": "glCompileShader" },
|
||||
{ "name": "glCompressedTexImage2D" },
|
||||
{ "name": "glCompressedTexSubImage2D" },
|
||||
{ "name": "glCopyTexImage2D" },
|
||||
{ "name": "glCopyTexSubImage2D" },
|
||||
{ "name": "glCreateProgram" },
|
||||
{ "name": "glCreateShader" },
|
||||
{ "name": "glCullFace" },
|
||||
{ "name": "glDeleteBuffers" },
|
||||
{ "name": "glDeleteFramebuffers" },
|
||||
{ "name": "glDeleteProgram" },
|
||||
{ "name": "glDeleteRenderbuffers" },
|
||||
{ "name": "glDeleteShader" },
|
||||
{ "name": "glDeleteTextures" },
|
||||
{ "name": "glDepthFunc" },
|
||||
{ "name": "glDepthMask" },
|
||||
{ "name": "glDepthRangef" },
|
||||
{ "name": "glDetachShader" },
|
||||
{ "name": "glDisable" },
|
||||
{ "name": "glDisableVertexAttribArray" },
|
||||
{ "name": "glDrawArrays" },
|
||||
{ "name": "glDrawElements" },
|
||||
{ "name": "glEnable" },
|
||||
{ "name": "glEnableVertexAttribArray" },
|
||||
{ "name": "glFinish" },
|
||||
{ "name": "glFlush" },
|
||||
{ "name": "glFramebufferRenderbuffer" },
|
||||
{ "name": "glFramebufferTexture2D" },
|
||||
{ "name": "glFrontFace" },
|
||||
{ "name": "glGenBuffers" },
|
||||
{ "name": "glGenerateMipmap" },
|
||||
{ "name": "glGenFramebuffers" },
|
||||
{ "name": "glGenRenderbuffers" },
|
||||
{ "name": "glGenTextures" },
|
||||
{ "name": "glGetActiveAttrib" },
|
||||
{ "name": "glGetActiveUniform" },
|
||||
{ "name": "glGetAttachedShaders" },
|
||||
{ "name": "glGetAttribLocation" },
|
||||
{ "name": "glGetBooleanv" },
|
||||
{ "name": "glGetBufferParameteriv" },
|
||||
{ "name": "glGetError" },
|
||||
{ "name": "glGetFloatv" },
|
||||
{ "name": "glGetFramebufferAttachmentParameteriv" },
|
||||
{ "name": "glGetIntegerv" },
|
||||
{ "name": "glGetProgramiv" },
|
||||
{ "name": "glGetProgramInfoLog" },
|
||||
{ "name": "glGetRenderbufferParameteriv" },
|
||||
{ "name": "glGetShaderiv" },
|
||||
{ "name": "glGetShaderInfoLog" },
|
||||
{ "name": "glGetShaderPrecisionFormat" },
|
||||
{ "name": "glGetShaderSource" },
|
||||
{ "name": "glGetString" },
|
||||
{ "name": "glGetTexParameterfv" },
|
||||
{ "name": "glGetTexParameteriv" },
|
||||
{ "name": "glGetUniformfv" },
|
||||
{ "name": "glGetUniformiv" },
|
||||
{ "name": "glGetUniformLocation" },
|
||||
{ "name": "glGetVertexAttribfv" },
|
||||
{ "name": "glGetVertexAttribiv" },
|
||||
{ "name": "glGetVertexAttribPointerv" },
|
||||
{ "name": "glHint" },
|
||||
{ "name": "glIsBuffer" },
|
||||
{ "name": "glIsEnabled" },
|
||||
{ "name": "glIsFramebuffer" },
|
||||
{ "name": "glIsProgram" },
|
||||
{ "name": "glIsRenderbuffer" },
|
||||
{ "name": "glIsShader" },
|
||||
{ "name": "glIsTexture" },
|
||||
{ "name": "glLineWidth" },
|
||||
{ "name": "glLinkProgram" },
|
||||
{ "name": "glPixelStorei" },
|
||||
{ "name": "glPolygonOffset" },
|
||||
{ "name": "glReadPixels" },
|
||||
{ "name": "glReleaseShaderCompiler" },
|
||||
{ "name": "glRenderbufferStorage" },
|
||||
{ "name": "glSampleCoverage" },
|
||||
{ "name": "glScissor" },
|
||||
{ "name": "glShaderBinary" },
|
||||
{ "name": "glShaderSource" },
|
||||
{ "name": "glStencilFunc" },
|
||||
{ "name": "glStencilFuncSeparate" },
|
||||
{ "name": "glStencilMask" },
|
||||
{ "name": "glStencilMaskSeparate" },
|
||||
{ "name": "glStencilOp" },
|
||||
{ "name": "glStencilOpSeparate" },
|
||||
{ "name": "glTexImage2D" },
|
||||
{ "name": "glTexParameterf" },
|
||||
{ "name": "glTexParameterfv" },
|
||||
{ "name": "glTexParameteri" },
|
||||
{ "name": "glTexParameteriv" },
|
||||
{ "name": "glTexSubImage2D" },
|
||||
{ "name": "glUniform1f" },
|
||||
{ "name": "glUniform1fv" },
|
||||
{ "name": "glUniform1i" },
|
||||
{ "name": "glUniform1iv" },
|
||||
{ "name": "glUniform2f" },
|
||||
{ "name": "glUniform2fv" },
|
||||
{ "name": "glUniform2i" },
|
||||
{ "name": "glUniform2iv" },
|
||||
{ "name": "glUniform3f" },
|
||||
{ "name": "glUniform3fv" },
|
||||
{ "name": "glUniform3i" },
|
||||
{ "name": "glUniform3iv" },
|
||||
{ "name": "glUniform4f" },
|
||||
{ "name": "glUniform4fv" },
|
||||
{ "name": "glUniform4i" },
|
||||
{ "name": "glUniform4iv" },
|
||||
{ "name": "glUniformMatrix2fv" },
|
||||
{ "name": "glUniformMatrix3fv" },
|
||||
{ "name": "glUniformMatrix4fv" },
|
||||
{ "name": "glUseProgram" },
|
||||
{ "name": "glValidateProgram" },
|
||||
{ "name": "glVertexAttrib1f" },
|
||||
{ "name": "glVertexAttrib1fv" },
|
||||
{ "name": "glVertexAttrib2f" },
|
||||
{ "name": "glVertexAttrib2fv" },
|
||||
{ "name": "glVertexAttrib3f" },
|
||||
{ "name": "glVertexAttrib3fv" },
|
||||
{ "name": "glVertexAttrib4f" },
|
||||
{ "name": "glVertexAttrib4fv" },
|
||||
{ "name": "glVertexAttribPointer" },
|
||||
{ "name": "glViewport" },
|
||||
{ "name": "glAcquireKeyedMutexWin32EXT" },
|
||||
{ "name": "glActiveShaderProgramEXT" },
|
||||
{ "name": "glAlphaFuncQCOM" },
|
||||
{ "name": "glApplyFramebufferAttachmentCMAAINTEL" },
|
||||
{ "name": "glBeginConditionalRenderNV" },
|
||||
{ "name": "glBeginPerfMonitorAMD" },
|
||||
{ "name": "glBeginPerfQueryINTEL" },
|
||||
{ "name": "glBeginQueryEXT" },
|
||||
{ "name": "glBindFragDataLocationEXT" },
|
||||
{ "name": "glBindFragDataLocationIndexedEXT" },
|
||||
{ "name": "glBindProgramPipelineEXT" },
|
||||
{ "name": "glBindShadingRateImageNV" },
|
||||
{ "name": "glBindVertexArrayOES" },
|
||||
{ "name": "glBlendBarrierKHR" },
|
||||
{ "name": "glBlendBarrierNV" },
|
||||
{ "name": "glBlendEquationiEXT" },
|
||||
{ "name": "glBlendEquationiOES" },
|
||||
{ "name": "glBlendEquationSeparateiEXT" },
|
||||
{ "name": "glBlendEquationSeparateiOES" },
|
||||
{ "name": "glBlendFunciEXT" },
|
||||
{ "name": "glBlendFunciOES" },
|
||||
{ "name": "glBlendFuncSeparateiEXT" },
|
||||
{ "name": "glBlendFuncSeparateiOES" },
|
||||
{ "name": "glBlendParameteriNV" },
|
||||
{ "name": "glBlitFramebufferANGLE" },
|
||||
{ "name": "glBlitFramebufferNV" },
|
||||
{ "name": "glBufferAttachMemoryNV" },
|
||||
{ "name": "glBufferPageCommitmentMemNV" },
|
||||
{ "name": "glBufferStorageEXT" },
|
||||
{ "name": "glBufferStorageExternalEXT" },
|
||||
{ "name": "glBufferStorageMemEXT" },
|
||||
{ "name": "glClearPixelLocalStorageuiEXT" },
|
||||
{ "name": "glClearTexImageEXT" },
|
||||
{ "name": "glClearTexSubImageEXT" },
|
||||
{ "name": "glClientWaitSyncAPPLE" },
|
||||
{ "name": "glClipControlEXT" },
|
||||
{ "name": "glColorMaskiEXT" },
|
||||
{ "name": "glColorMaskiOES" },
|
||||
{ "name": "glCompressedTexImage3DOES" },
|
||||
{ "name": "glCompressedTexSubImage3DOES" },
|
||||
{ "name": "glConservativeRasterParameteriNV" },
|
||||
{ "name": "glCopyBufferSubDataNV" },
|
||||
{ "name": "glCopyImageSubDataEXT" },
|
||||
{ "name": "glCopyImageSubDataOES" },
|
||||
{ "name": "glCopyPathNV" },
|
||||
{ "name": "glCopyTexSubImage3DOES" },
|
||||
{ "name": "glCopyTextureLevelsAPPLE" },
|
||||
{ "name": "glCoverageMaskNV" },
|
||||
{ "name": "glCoverageModulationNV" },
|
||||
{ "name": "glCoverageModulationTableNV" },
|
||||
{ "name": "glCoverageOperationNV" },
|
||||
{ "name": "glCoverFillPathInstancedNV" },
|
||||
{ "name": "glCoverFillPathNV" },
|
||||
{ "name": "glCoverStrokePathInstancedNV" },
|
||||
{ "name": "glCoverStrokePathNV" },
|
||||
{ "name": "glCreateMemoryObjectsEXT" },
|
||||
{ "name": "glCreatePerfQueryINTEL" },
|
||||
{ "name": "glCreateSemaphoresNV" },
|
||||
{ "name": "glCreateShaderProgramvEXT" },
|
||||
{ "name": "glDebugMessageCallbackKHR" },
|
||||
{ "name": "glDebugMessageControlKHR" },
|
||||
{ "name": "glDebugMessageInsertKHR" },
|
||||
{ "name": "glDeleteFencesNV" },
|
||||
{ "name": "glDeleteMemoryObjectsEXT" },
|
||||
{ "name": "glDeletePathsNV" },
|
||||
{ "name": "glDeletePerfMonitorsAMD" },
|
||||
{ "name": "glDeletePerfQueryINTEL" },
|
||||
{ "name": "glDeleteProgramPipelinesEXT" },
|
||||
{ "name": "glDeleteQueriesEXT" },
|
||||
{ "name": "glDeleteSemaphoresEXT" },
|
||||
{ "name": "glDeleteSyncAPPLE" },
|
||||
{ "name": "glDeleteVertexArraysOES" },
|
||||
{ "name": "glDepthRangeArrayfvNV" },
|
||||
{ "name": "glDepthRangeArrayfvOES" },
|
||||
{ "name": "glDepthRangeIndexedfNV" },
|
||||
{ "name": "glDepthRangeIndexedfOES" },
|
||||
{ "name": "glDisableDriverControlQCOM" },
|
||||
{ "name": "glDisableiEXT" },
|
||||
{ "name": "glDisableiNV" },
|
||||
{ "name": "glDisableiOES" },
|
||||
{ "name": "glDiscardFramebufferEXT" },
|
||||
{ "name": "glDrawArraysInstancedANGLE" },
|
||||
{ "name": "glDrawArraysInstancedBaseInstanceEXT" },
|
||||
{ "name": "glDrawArraysInstancedEXT" },
|
||||
{ "name": "glDrawArraysInstancedNV" },
|
||||
{ "name": "glDrawBuffersEXT" },
|
||||
{ "name": "glDrawBuffersIndexedEXT" },
|
||||
{ "name": "glDrawBuffersNV" },
|
||||
{ "name": "glDrawElementsBaseVertexEXT" },
|
||||
{ "name": "glDrawElementsBaseVertexOES" },
|
||||
{ "name": "glDrawElementsInstancedANGLE" },
|
||||
{ "name": "glDrawElementsInstancedBaseInstanceEXT" },
|
||||
{ "name": "glDrawElementsInstancedBaseVertexBaseInstanceEXT" },
|
||||
{ "name": "glDrawElementsInstancedBaseVertexEXT" },
|
||||
{ "name": "glDrawElementsInstancedBaseVertexOES" },
|
||||
{ "name": "glDrawElementsInstancedEXT" },
|
||||
{ "name": "glDrawElementsInstancedNV" },
|
||||
{ "name": "glDrawMeshTasksIndirectNV" },
|
||||
{ "name": "glDrawMeshTasksNV" },
|
||||
{ "name": "glDrawRangeElementsBaseVertexEXT" },
|
||||
{ "name": "glDrawRangeElementsBaseVertexOES" },
|
||||
{ "name": "glDrawTransformFeedbackEXT" },
|
||||
{ "name": "glDrawTransformFeedbackInstancedEXT" },
|
||||
{ "name": "glDrawVkImageNV" },
|
||||
{ "name": "glEGLImageTargetRenderbufferStorageOES" },
|
||||
{ "name": "glEGLImageTargetTexStorageEXT" },
|
||||
{ "name": "glEGLImageTargetTexture2DOES" },
|
||||
{ "name": "glEGLImageTargetTextureStorageEXT" },
|
||||
{ "name": "glEnableDriverControlQCOM" },
|
||||
{ "name": "glEnableiEXT" },
|
||||
{ "name": "glEnableiNV" },
|
||||
{ "name": "glEnableiOES" },
|
||||
{ "name": "glEndConditionalRenderNV" },
|
||||
{ "name": "glEndPerfMonitorAMD" },
|
||||
{ "name": "glEndPerfQueryINTEL" },
|
||||
{ "name": "glEndQueryEXT" },
|
||||
{ "name": "glEndTilingQCOM" },
|
||||
{ "name": "glExtGetBufferPointervQCOM" },
|
||||
{ "name": "glExtGetBuffersQCOM" },
|
||||
{ "name": "glExtGetFramebuffersQCOM" },
|
||||
{ "name": "glExtGetProgramBinarySourceQCOM" },
|
||||
{ "name": "glExtGetProgramsQCOM" },
|
||||
{ "name": "glExtGetRenderbuffersQCOM" },
|
||||
{ "name": "glExtGetShadersQCOM" },
|
||||
{ "name": "glExtGetTexLevelParameterivQCOM" },
|
||||
{ "name": "glExtGetTexSubImageQCOM" },
|
||||
{ "name": "glExtGetTexturesQCOM" },
|
||||
{ "name": "glExtIsProgramBinaryQCOM" },
|
||||
{ "name": "glExtrapolateTex2DQCOM" },
|
||||
{ "name": "glExtTexObjectStateOverrideiQCOM" },
|
||||
{ "name": "glFenceSyncAPPLE" },
|
||||
{ "name": "glFinishFenceNV" },
|
||||
{ "name": "glFlushMappedBufferRangeEXT" },
|
||||
{ "name": "glFragmentCoverageColorNV" },
|
||||
{ "name": "glFramebufferFetchBarrierEXT" },
|
||||
{ "name": "glFramebufferFetchBarrierQCOM" },
|
||||
{ "name": "glFramebufferFoveationConfigQCOM" },
|
||||
{ "name": "glFramebufferFoveationParametersQCOM" },
|
||||
{ "name": "glFramebufferParameteriMESA" },
|
||||
{ "name": "glFramebufferPixelLocalStorageSizeEXT" },
|
||||
{ "name": "glFramebufferSampleLocationsfvNV" },
|
||||
{ "name": "glFramebufferTexture2DDownsampleIMG" },
|
||||
{ "name": "glFramebufferTexture2DMultisampleEXT" },
|
||||
{ "name": "glFramebufferTexture2DMultisampleIMG" },
|
||||
{ "name": "glFramebufferTexture3DOES" },
|
||||
{ "name": "glFramebufferTextureEXT" },
|
||||
{ "name": "glFramebufferTextureLayerDownsampleIMG" },
|
||||
{ "name": "glFramebufferTextureMultisampleMultiviewOVR" },
|
||||
{ "name": "glFramebufferTextureMultiviewOVR" },
|
||||
{ "name": "glFramebufferTextureOES" },
|
||||
{ "name": "glGenFencesNV" },
|
||||
{ "name": "glGenPathsNV" },
|
||||
{ "name": "glGenPerfMonitorsAMD" },
|
||||
{ "name": "glGenProgramPipelinesEXT" },
|
||||
{ "name": "glGenQueriesEXT" },
|
||||
{ "name": "glGenSemaphoresEXT" },
|
||||
{ "name": "glGenVertexArraysOES" },
|
||||
{ "name": "glGetBufferPointervOES" },
|
||||
{ "name": "glGetCoverageModulationTableNV" },
|
||||
{ "name": "glGetDebugMessageLogKHR" },
|
||||
{ "name": "glGetDriverControlsQCOM" },
|
||||
{ "name": "glGetDriverControlStringQCOM" },
|
||||
{ "name": "glGetFenceivNV" },
|
||||
{ "name": "glGetFirstPerfQueryIdINTEL" },
|
||||
{ "name": "glGetFloati_vNV" },
|
||||
{ "name": "glGetFloati_vOES" },
|
||||
{ "name": "glGetFragDataIndexEXT" },
|
||||
{ "name": "glGetFramebufferParameterivMESA" },
|
||||
{ "name": "glGetFramebufferPixelLocalStorageSizeEXT" },
|
||||
{ "name": "glGetGraphicsResetStatusEXT" },
|
||||
{ "name": "glGetGraphicsResetStatusKHR" },
|
||||
{ "name": "glGetImageHandleNV" },
|
||||
{ "name": "glGetInteger64vAPPLE" },
|
||||
{ "name": "glGetInteger64vEXT" },
|
||||
{ "name": "glGetIntegeri_vEXT" },
|
||||
{ "name": "glGetInternalformatSampleivNV" },
|
||||
{ "name": "glGetMemoryObjectDetachedResourcesuivNV" },
|
||||
{ "name": "glGetMemoryObjectParameterivEXT" },
|
||||
{ "name": "glGetNextPerfQueryIdINTEL" },
|
||||
{ "name": "glGetnUniformfvEXT" },
|
||||
{ "name": "glGetnUniformfvKHR" },
|
||||
{ "name": "glGetnUniformivEXT" },
|
||||
{ "name": "glGetnUniformivKHR" },
|
||||
{ "name": "glGetnUniformuivKHR" },
|
||||
{ "name": "glGetObjectLabelEXT" },
|
||||
{ "name": "glGetObjectLabelKHR" },
|
||||
{ "name": "glGetObjectPtrLabelKHR" },
|
||||
{ "name": "glGetPathCommandsNV" },
|
||||
{ "name": "glGetPathCoordsNV" },
|
||||
{ "name": "glGetPathDashArrayNV" },
|
||||
{ "name": "glGetPathLengthNV" },
|
||||
{ "name": "glGetPathMetricRangeNV" },
|
||||
{ "name": "glGetPathMetricsNV" },
|
||||
{ "name": "glGetPathParameterfvNV" },
|
||||
{ "name": "glGetPathParameterivNV" },
|
||||
{ "name": "glGetPathSpacingNV" },
|
||||
{ "name": "glGetPerfCounterInfoINTEL" },
|
||||
{ "name": "glGetPerfMonitorCounterDataAMD" },
|
||||
{ "name": "glGetPerfMonitorCounterInfoAMD" },
|
||||
{ "name": "glGetPerfMonitorCountersAMD" },
|
||||
{ "name": "glGetPerfMonitorCounterStringAMD" },
|
||||
{ "name": "glGetPerfMonitorGroupsAMD" },
|
||||
{ "name": "glGetPerfMonitorGroupStringAMD" },
|
||||
{ "name": "glGetPerfQueryDataINTEL" },
|
||||
{ "name": "glGetPerfQueryIdByNameINTEL" },
|
||||
{ "name": "glGetPerfQueryInfoINTEL" },
|
||||
{ "name": "glGetPointervKHR" },
|
||||
{ "name": "glGetProgramBinaryOES" },
|
||||
{ "name": "glGetProgramPipelineInfoLogEXT" },
|
||||
{ "name": "glGetProgramPipelineivEXT" },
|
||||
{ "name": "glGetProgramResourcefvNV" },
|
||||
{ "name": "glGetProgramResourceLocationIndexEXT" },
|
||||
{ "name": "glGetQueryivEXT" },
|
||||
{ "name": "glGetQueryObjecti64vEXT" },
|
||||
{ "name": "glGetQueryObjectivEXT" },
|
||||
{ "name": "glGetQueryObjectui64vEXT" },
|
||||
{ "name": "glGetQueryObjectuivEXT" },
|
||||
{ "name": "glGetSamplerParameterIivEXT" },
|
||||
{ "name": "glGetSamplerParameterIivOES" },
|
||||
{ "name": "glGetSamplerParameterIuivEXT" },
|
||||
{ "name": "glGetSamplerParameterIuivOES" },
|
||||
{ "name": "glGetSemaphoreParameterivNV" },
|
||||
{ "name": "glGetSemaphoreParameterui64vEXT" },
|
||||
{ "name": "glGetShadingRateImagePaletteNV" },
|
||||
{ "name": "glGetShadingRateSampleLocationivNV" },
|
||||
{ "name": "glGetSyncivAPPLE" },
|
||||
{ "name": "glGetTexParameterIivEXT" },
|
||||
{ "name": "glGetTexParameterIivOES" },
|
||||
{ "name": "glGetTexParameterIuivEXT" },
|
||||
{ "name": "glGetTexParameterIuivOES" },
|
||||
{ "name": "glGetTextureHandleIMG" },
|
||||
{ "name": "glGetTextureHandleNV" },
|
||||
{ "name": "glGetTextureSamplerHandleIMG" },
|
||||
{ "name": "glGetTextureSamplerHandleNV" },
|
||||
{ "name": "glGetTranslatedShaderSourceANGLE" },
|
||||
{ "name": "glGetUniformi64vNV" },
|
||||
{ "name": "glGetUnsignedBytei_vEXT" },
|
||||
{ "name": "glGetUnsignedBytevEXT" },
|
||||
{ "name": "glGetVkProcAddrNV" },
|
||||
{ "name": "glImportMemoryFdEXT" },
|
||||
{ "name": "glImportMemoryWin32HandleEXT" },
|
||||
{ "name": "glImportMemoryWin32NameEXT" },
|
||||
{ "name": "glImportSemaphoreFdEXT" },
|
||||
{ "name": "glImportSemaphoreWin32HandleEXT" },
|
||||
{ "name": "glImportSemaphoreWin32NameEXT" },
|
||||
{ "name": "glInsertEventMarkerEXT" },
|
||||
{ "name": "glInterpolatePathsNV" },
|
||||
{ "name": "glIsEnablediEXT" },
|
||||
{ "name": "glIsEnablediNV" },
|
||||
{ "name": "glIsEnablediOES" },
|
||||
{ "name": "glIsFenceNV" },
|
||||
{ "name": "glIsImageHandleResidentNV" },
|
||||
{ "name": "glIsMemoryObjectEXT" },
|
||||
{ "name": "glIsPathNV" },
|
||||
{ "name": "glIsPointInFillPathNV" },
|
||||
{ "name": "glIsPointInStrokePathNV" },
|
||||
{ "name": "glIsProgramPipelineEXT" },
|
||||
{ "name": "glIsQueryEXT" },
|
||||
{ "name": "glIsSemaphoreEXT" },
|
||||
{ "name": "glIsSyncAPPLE" },
|
||||
{ "name": "glIsTextureHandleResidentNV" },
|
||||
{ "name": "glIsVertexArrayOES" },
|
||||
{ "name": "glLabelObjectEXT" },
|
||||
{ "name": "glMakeImageHandleNonResidentNV" },
|
||||
{ "name": "glMakeImageHandleResidentNV" },
|
||||
{ "name": "glMakeTextureHandleNonResidentNV" },
|
||||
{ "name": "glMakeTextureHandleResidentNV" },
|
||||
{ "name": "glMapBufferOES" },
|
||||
{ "name": "glMapBufferRangeEXT" },
|
||||
{ "name": "glMatrixFrustumEXT" },
|
||||
{ "name": "glMatrixLoad3x2fNV" },
|
||||
{ "name": "glMatrixLoad3x3fNV" },
|
||||
{ "name": "glMatrixLoaddEXT" },
|
||||
{ "name": "glMatrixLoadfEXT" },
|
||||
{ "name": "glMatrixLoadIdentityEXT" },
|
||||
{ "name": "glMatrixLoadTranspose3x3fNV" },
|
||||
{ "name": "glMatrixLoadTransposedEXT" },
|
||||
{ "name": "glMatrixLoadTransposefEXT" },
|
||||
{ "name": "glMatrixMult3x2fNV" },
|
||||
{ "name": "glMatrixMult3x3fNV" },
|
||||
{ "name": "glMatrixMultdEXT" },
|
||||
{ "name": "glMatrixMultfEXT" },
|
||||
{ "name": "glMatrixMultTranspose3x3fNV" },
|
||||
{ "name": "glMatrixMultTransposedEXT" },
|
||||
{ "name": "glMatrixMultTransposefEXT" },
|
||||
{ "name": "glMatrixOrthoEXT" },
|
||||
{ "name": "glMatrixPopEXT" },
|
||||
{ "name": "glMatrixPushEXT" },
|
||||
{ "name": "glMatrixRotatedEXT" },
|
||||
{ "name": "glMatrixRotatefEXT" },
|
||||
{ "name": "glMatrixScaledEXT" },
|
||||
{ "name": "glMatrixScalefEXT" },
|
||||
{ "name": "glMatrixTranslatedEXT" },
|
||||
{ "name": "glMatrixTranslatefEXT" },
|
||||
{ "name": "glMaxShaderCompilerThreadsKHR" },
|
||||
{ "name": "glMemoryObjectParameterivEXT" },
|
||||
{ "name": "glMinSampleShadingOES" },
|
||||
{ "name": "glMultiDrawArraysEXT" },
|
||||
{ "name": "glMultiDrawArraysIndirectEXT" },
|
||||
{ "name": "glMultiDrawElementsBaseVertexEXT" },
|
||||
{ "name": "glMultiDrawElementsEXT" },
|
||||
{ "name": "glMultiDrawElementsIndirectEXT" },
|
||||
{ "name": "glMultiDrawMeshTasksIndirectCountNV" },
|
||||
{ "name": "glMultiDrawMeshTasksIndirectNV" },
|
||||
{ "name": "glNamedBufferAttachMemoryNV" },
|
||||
{ "name": "glNamedBufferPageCommitmentMemNV" },
|
||||
{ "name": "glNamedBufferStorageExternalEXT" },
|
||||
{ "name": "glNamedBufferStorageMemEXT" },
|
||||
{ "name": "glNamedFramebufferSampleLocationsfvNV" },
|
||||
{ "name": "glNamedRenderbufferStorageMultisampleAdvancedAMD" },
|
||||
{ "name": "glObjectLabelKHR" },
|
||||
{ "name": "glObjectPtrLabelKHR" },
|
||||
{ "name": "glPatchParameteriEXT" },
|
||||
{ "name": "glPatchParameteriOES" },
|
||||
{ "name": "glPathCommandsNV" },
|
||||
{ "name": "glPathCoordsNV" },
|
||||
{ "name": "glPathCoverDepthFuncNV" },
|
||||
{ "name": "glPathDashArrayNV" },
|
||||
{ "name": "glPathGlyphIndexArrayNV" },
|
||||
{ "name": "glPathGlyphIndexRangeNV" },
|
||||
{ "name": "glPathGlyphRangeNV" },
|
||||
{ "name": "glPathGlyphsNV" },
|
||||
{ "name": "glPathMemoryGlyphIndexArrayNV" },
|
||||
{ "name": "glPathParameterfNV" },
|
||||
{ "name": "glPathParameterfvNV" },
|
||||
{ "name": "glPathParameteriNV" },
|
||||
{ "name": "glPathParameterivNV" },
|
||||
{ "name": "glPathStencilDepthOffsetNV" },
|
||||
{ "name": "glPathStencilFuncNV" },
|
||||
{ "name": "glPathStringNV" },
|
||||
{ "name": "glPathSubCommandsNV" },
|
||||
{ "name": "glPathSubCoordsNV" },
|
||||
{ "name": "glPointAlongPathNV" },
|
||||
{ "name": "glPolygonModeNV" },
|
||||
{ "name": "glPolygonOffsetClampEXT" },
|
||||
{ "name": "glPopDebugGroupKHR" },
|
||||
{ "name": "glPopGroupMarkerEXT" },
|
||||
{ "name": "glPrimitiveBoundingBoxEXT" },
|
||||
{ "name": "glPrimitiveBoundingBoxOES" },
|
||||
{ "name": "glProgramBinaryOES" },
|
||||
{ "name": "glProgramParameteriEXT" },
|
||||
{ "name": "glProgramPathFragmentInputGenNV" },
|
||||
{ "name": "glProgramUniform1fEXT" },
|
||||
{ "name": "glProgramUniform1fvEXT" },
|
||||
{ "name": "glProgramUniform1i64NV" },
|
||||
{ "name": "glProgramUniform1i64vNV" },
|
||||
{ "name": "glProgramUniform1iEXT" },
|
||||
{ "name": "glProgramUniform1ivEXT" },
|
||||
{ "name": "glProgramUniform1ui64NV" },
|
||||
{ "name": "glProgramUniform1ui64vNV" },
|
||||
{ "name": "glProgramUniform1uiEXT" },
|
||||
{ "name": "glProgramUniform1uivEXT" },
|
||||
{ "name": "glProgramUniform2fEXT" },
|
||||
{ "name": "glProgramUniform2fvEXT" },
|
||||
{ "name": "glProgramUniform2i64NV" },
|
||||
{ "name": "glProgramUniform2i64vNV" },
|
||||
{ "name": "glProgramUniform2iEXT" },
|
||||
{ "name": "glProgramUniform2ivEXT" },
|
||||
{ "name": "glProgramUniform2ui64NV" },
|
||||
{ "name": "glProgramUniform2ui64vNV" },
|
||||
{ "name": "glProgramUniform2uiEXT" },
|
||||
{ "name": "glProgramUniform2uivEXT" },
|
||||
{ "name": "glProgramUniform3fEXT" },
|
||||
{ "name": "glProgramUniform3fvEXT" },
|
||||
{ "name": "glProgramUniform3i64NV" },
|
||||
{ "name": "glProgramUniform3i64vNV" },
|
||||
{ "name": "glProgramUniform3iEXT" },
|
||||
{ "name": "glProgramUniform3ivEXT" },
|
||||
{ "name": "glProgramUniform3ui64NV" },
|
||||
{ "name": "glProgramUniform3ui64vNV" },
|
||||
{ "name": "glProgramUniform3uiEXT" },
|
||||
{ "name": "glProgramUniform3uivEXT" },
|
||||
{ "name": "glProgramUniform4fEXT" },
|
||||
{ "name": "glProgramUniform4fvEXT" },
|
||||
{ "name": "glProgramUniform4i64NV" },
|
||||
{ "name": "glProgramUniform4i64vNV" },
|
||||
{ "name": "glProgramUniform4iEXT" },
|
||||
{ "name": "glProgramUniform4ivEXT" },
|
||||
{ "name": "glProgramUniform4ui64NV" },
|
||||
{ "name": "glProgramUniform4ui64vNV" },
|
||||
{ "name": "glProgramUniform4uiEXT" },
|
||||
{ "name": "glProgramUniform4uivEXT" },
|
||||
{ "name": "glProgramUniformHandleui64IMG" },
|
||||
{ "name": "glProgramUniformHandleui64NV" },
|
||||
{ "name": "glProgramUniformHandleui64vIMG" },
|
||||
{ "name": "glProgramUniformHandleui64vNV" },
|
||||
{ "name": "glProgramUniformMatrix2fvEXT" },
|
||||
{ "name": "glProgramUniformMatrix2x3fvEXT" },
|
||||
{ "name": "glProgramUniformMatrix2x4fvEXT" },
|
||||
{ "name": "glProgramUniformMatrix3fvEXT" },
|
||||
{ "name": "glProgramUniformMatrix3x2fvEXT" },
|
||||
{ "name": "glProgramUniformMatrix3x4fvEXT" },
|
||||
{ "name": "glProgramUniformMatrix4fvEXT" },
|
||||
{ "name": "glProgramUniformMatrix4x2fvEXT" },
|
||||
{ "name": "glProgramUniformMatrix4x3fvEXT" },
|
||||
{ "name": "glPushDebugGroupKHR" },
|
||||
{ "name": "glPushGroupMarkerEXT" },
|
||||
{ "name": "glQueryCounterEXT" },
|
||||
{ "name": "glRasterSamplesEXT" },
|
||||
{ "name": "glReadBufferIndexedEXT" },
|
||||
{ "name": "glReadBufferNV" },
|
||||
{ "name": "glReadnPixelsEXT" },
|
||||
{ "name": "glReadnPixelsKHR" },
|
||||
{ "name": "glReleaseKeyedMutexWin32EXT" },
|
||||
{ "name": "glRenderbufferStorageMultisampleAdvancedAMD" },
|
||||
{ "name": "glRenderbufferStorageMultisampleANGLE" },
|
||||
{ "name": "glRenderbufferStorageMultisampleAPPLE" },
|
||||
{ "name": "glRenderbufferStorageMultisampleEXT" },
|
||||
{ "name": "glRenderbufferStorageMultisampleIMG" },
|
||||
{ "name": "glRenderbufferStorageMultisampleNV" },
|
||||
{ "name": "glResetMemoryObjectParameterNV" },
|
||||
{ "name": "glResolveDepthValuesNV" },
|
||||
{ "name": "glResolveMultisampleFramebufferAPPLE" },
|
||||
{ "name": "glSamplerParameterIivEXT" },
|
||||
{ "name": "glSamplerParameterIivOES" },
|
||||
{ "name": "glSamplerParameterIuivEXT" },
|
||||
{ "name": "glSamplerParameterIuivOES" },
|
||||
{ "name": "glScissorArrayvNV" },
|
||||
{ "name": "glScissorArrayvOES" },
|
||||
{ "name": "glScissorExclusiveArrayvNV" },
|
||||
{ "name": "glScissorExclusiveNV" },
|
||||
{ "name": "glScissorIndexedNV" },
|
||||
{ "name": "glScissorIndexedOES" },
|
||||
{ "name": "glScissorIndexedvNV" },
|
||||
{ "name": "glScissorIndexedvOES" },
|
||||
{ "name": "glSelectPerfMonitorCountersAMD" },
|
||||
{ "name": "glSemaphoreParameterivNV" },
|
||||
{ "name": "glSemaphoreParameterui64vEXT" },
|
||||
{ "name": "glSetFenceNV" },
|
||||
{ "name": "glShadingRateImageBarrierNV" },
|
||||
{ "name": "glShadingRateImagePaletteNV" },
|
||||
{ "name": "glShadingRateQCOM" },
|
||||
{ "name": "glShadingRateSampleOrderCustomNV" },
|
||||
{ "name": "glShadingRateSampleOrderNV" },
|
||||
{ "name": "glSignalSemaphoreEXT" },
|
||||
{ "name": "glSignalVkFenceNV" },
|
||||
{ "name": "glSignalVkSemaphoreNV" },
|
||||
{ "name": "glStartTilingQCOM" },
|
||||
{ "name": "glStencilFillPathInstancedNV" },
|
||||
{ "name": "glStencilFillPathNV" },
|
||||
{ "name": "glStencilStrokePathInstancedNV" },
|
||||
{ "name": "glStencilStrokePathNV" },
|
||||
{ "name": "glStencilThenCoverFillPathInstancedNV" },
|
||||
{ "name": "glStencilThenCoverFillPathNV" },
|
||||
{ "name": "glStencilThenCoverStrokePathInstancedNV" },
|
||||
{ "name": "glStencilThenCoverStrokePathNV" },
|
||||
{ "name": "glSubpixelPrecisionBiasNV" },
|
||||
{ "name": "glTestFenceNV" },
|
||||
{ "name": "glTexAttachMemoryNV" },
|
||||
{ "name": "glTexBufferEXT" },
|
||||
{ "name": "glTexBufferOES" },
|
||||
{ "name": "glTexBufferRangeEXT" },
|
||||
{ "name": "glTexBufferRangeOES" },
|
||||
{ "name": "glTexEstimateMotionQCOM" },
|
||||
{ "name": "glTexEstimateMotionRegionsQCOM" },
|
||||
{ "name": "glTexImage3DOES" },
|
||||
{ "name": "glTexPageCommitmentEXT" },
|
||||
{ "name": "glTexPageCommitmentMemNV" },
|
||||
{ "name": "glTexParameterIivEXT" },
|
||||
{ "name": "glTexParameterIivOES" },
|
||||
{ "name": "glTexParameterIuivEXT" },
|
||||
{ "name": "glTexParameterIuivOES" },
|
||||
{ "name": "glTexStorage1DEXT" },
|
||||
{ "name": "glTexStorage2DEXT" },
|
||||
{ "name": "glTexStorage3DEXT" },
|
||||
{ "name": "glTexStorage3DMultisampleOES" },
|
||||
{ "name": "glTexStorageMem2DEXT" },
|
||||
{ "name": "glTexStorageMem2DMultisampleEXT" },
|
||||
{ "name": "glTexStorageMem3DEXT" },
|
||||
{ "name": "glTexStorageMem3DMultisampleEXT" },
|
||||
{ "name": "glTexSubImage3DOES" },
|
||||
{ "name": "glTextureAttachMemoryNV" },
|
||||
{ "name": "glTextureFoveationParametersQCOM" },
|
||||
{ "name": "glTexturePageCommitmentMemNV" },
|
||||
{ "name": "glTextureStorage1DEXT" },
|
||||
{ "name": "glTextureStorage2DEXT" },
|
||||
{ "name": "glTextureStorage3DEXT" },
|
||||
{ "name": "glTextureStorageMem2DEXT" },
|
||||
{ "name": "glTextureStorageMem2DMultisampleEXT" },
|
||||
{ "name": "glTextureStorageMem3DEXT" },
|
||||
{ "name": "glTextureStorageMem3DMultisampleEXT" },
|
||||
{ "name": "glTextureViewEXT" },
|
||||
{ "name": "glTextureViewOES" },
|
||||
{ "name": "glTransformPathNV" },
|
||||
{ "name": "glUniform1i64NV" },
|
||||
{ "name": "glUniform1i64vNV" },
|
||||
{ "name": "glUniform1ui64NV" },
|
||||
{ "name": "glUniform1ui64vNV" },
|
||||
{ "name": "glUniform2i64NV" },
|
||||
{ "name": "glUniform2i64vNV" },
|
||||
{ "name": "glUniform2ui64NV" },
|
||||
{ "name": "glUniform2ui64vNV" },
|
||||
{ "name": "glUniform3i64NV" },
|
||||
{ "name": "glUniform3i64vNV" },
|
||||
{ "name": "glUniform3ui64NV" },
|
||||
{ "name": "glUniform3ui64vNV" },
|
||||
{ "name": "glUniform4i64NV" },
|
||||
{ "name": "glUniform4i64vNV" },
|
||||
{ "name": "glUniform4ui64NV" },
|
||||
{ "name": "glUniform4ui64vNV" },
|
||||
{ "name": "glUniformHandleui64IMG" },
|
||||
{ "name": "glUniformHandleui64NV" },
|
||||
{ "name": "glUniformHandleui64vIMG" },
|
||||
{ "name": "glUniformHandleui64vNV" },
|
||||
{ "name": "glUniformMatrix2x3fvNV" },
|
||||
{ "name": "glUniformMatrix2x4fvNV" },
|
||||
{ "name": "glUniformMatrix3x2fvNV" },
|
||||
{ "name": "glUniformMatrix3x4fvNV" },
|
||||
{ "name": "glUniformMatrix4x2fvNV" },
|
||||
{ "name": "glUniformMatrix4x3fvNV" },
|
||||
{ "name": "glUnmapBufferOES" },
|
||||
{ "name": "glUseProgramStagesEXT" },
|
||||
{ "name": "glValidateProgramPipelineEXT" },
|
||||
{ "name": "glVertexAttribDivisorANGLE" },
|
||||
{ "name": "glVertexAttribDivisorEXT" },
|
||||
{ "name": "glVertexAttribDivisorNV" },
|
||||
{ "name": "glViewportArrayvNV" },
|
||||
{ "name": "glViewportArrayvOES" },
|
||||
{ "name": "glViewportIndexedfNV" },
|
||||
{ "name": "glViewportIndexedfOES" },
|
||||
{ "name": "glViewportIndexedfvNV" },
|
||||
{ "name": "glViewportIndexedfvOES" },
|
||||
{ "name": "glViewportPositionWScaleNV" },
|
||||
{ "name": "glViewportSwizzleNV" },
|
||||
{ "name": "glWaitSemaphoreEXT" },
|
||||
{ "name": "glWaitSyncAPPLE" },
|
||||
{ "name": "glWaitVkSemaphoreNV" },
|
||||
{ "name": "glWeightPathsNV" },
|
||||
{ "name": "glWindowRectanglesEXT" },
|
||||
{ "name": "TexStorageAttribs2DEXT" },
|
||||
{ "name": "TexStorageAttribs3DEXT" }
|
||||
]
|
@ -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 <b>OH_NativeBuffer</b> config. \n
|
||||
* Used to allocating new <b>OH_NativeBuffer</b> 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;
|
||||
|
||||
/**
|
||||
|
@ -32,6 +32,7 @@
|
||||
*
|
||||
* @brief Defines the functions for obtaining and using a native image.
|
||||
*
|
||||
* @library libnative_image.so
|
||||
* @since 9
|
||||
* @version 1.0
|
||||
*/
|
||||
|
@ -1,5 +1,6 @@
|
||||
[
|
||||
{ "name": "OH_NativeVSync_Create" },
|
||||
{ "name": "OH_NativeVSync_Destroy" },
|
||||
{ "name": "OH_NativeVSync_RequestFrame" }
|
||||
{ "name": "OH_NativeVSync_RequestFrame" },
|
||||
{ "name": "OH_NativeVSync_GetPeriod" }
|
||||
]
|
@ -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
|
||||
|
@ -32,6 +32,7 @@
|
||||
*
|
||||
* @brief Defines the functions for obtaining and using a native window.
|
||||
*
|
||||
* @library libnative_window.so
|
||||
* @since 8
|
||||
* @version 1.0
|
||||
*/
|
||||
|
@ -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.
|
||||
|
@ -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
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -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
|
||||
*/
|
||||
|
324
third_party/libuv/BUILD.gn
vendored
324
third_party/libuv/BUILD.gn
vendored
@ -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"
|
||||
|
@ -1,37 +1,37 @@
|
||||
# Copyright 2022 Huawei Technologies 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.
|
||||
# ============================================================================
|
||||
|
||||
import("//build/ohos.gni")
|
||||
|
||||
ohos_ndk_headers("mindspore_header") {
|
||||
dest_dir = "$ndk_headers_out_dir/mindspore"
|
||||
sources = [
|
||||
"context.h",
|
||||
"data_type.h",
|
||||
"format.h",
|
||||
"model.h",
|
||||
"status.h",
|
||||
"tensor.h",
|
||||
"types.h",
|
||||
]
|
||||
}
|
||||
|
||||
ohos_ndk_library("mindspore_lib") {
|
||||
output_name = "mindspore_lite_ndk"
|
||||
output_extension = "so"
|
||||
ndk_description_file = "./mindspore_lib.ndk.json"
|
||||
system_capability = "SystemCapability.Ai.MindSpore"
|
||||
min_compact_version = "9"
|
||||
}
|
||||
# Copyright 2022 Huawei Technologies 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.
|
||||
# ============================================================================
|
||||
|
||||
import("//build/ohos.gni")
|
||||
|
||||
ohos_ndk_headers("mindspore_header") {
|
||||
dest_dir = "$ndk_headers_out_dir/mindspore"
|
||||
sources = [
|
||||
"context.h",
|
||||
"data_type.h",
|
||||
"format.h",
|
||||
"model.h",
|
||||
"status.h",
|
||||
"tensor.h",
|
||||
"types.h",
|
||||
]
|
||||
}
|
||||
|
||||
ohos_ndk_library("mindspore_lib") {
|
||||
output_name = "mindspore_lite_ndk"
|
||||
output_extension = "so"
|
||||
ndk_description_file = "./mindspore_lib.ndk.json"
|
||||
system_capability = "SystemCapability.Ai.MindSpore"
|
||||
min_compact_version = "9"
|
||||
}
|
@ -1,338 +1,357 @@
|
||||
/**
|
||||
* Copyright 2021 Huawei Technologies 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 MINDSPORE_INCLUDE_C_API_CONTEXT_C_H
|
||||
#define MINDSPORE_INCLUDE_C_API_CONTEXT_C_H
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include "mindspore/types.h"
|
||||
#include "mindspore/status.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef void *OH_AI_ContextHandle;
|
||||
typedef void *OH_AI_DeviceInfoHandle;
|
||||
|
||||
/**
|
||||
* @brief Create a context object.
|
||||
* @return Context object handle.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API OH_AI_ContextHandle OH_AI_ContextCreate();
|
||||
|
||||
/**
|
||||
* @brief Destroy the context object.
|
||||
* @param context Context object handle address.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API void OH_AI_ContextDestroy(OH_AI_ContextHandle *context);
|
||||
|
||||
/**
|
||||
* @brief Set the number of threads at runtime.
|
||||
* @param context Context object handle.
|
||||
* @param thread_num the number of threads at runtime.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API void OH_AI_ContextSetThreadNum(OH_AI_ContextHandle context, int32_t thread_num);
|
||||
|
||||
/**
|
||||
* @brief Obtain the current thread number setting.
|
||||
* @param context Context object handle.
|
||||
* @return The current thread number setting.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API int32_t OH_AI_ContextGetThreadNum(const OH_AI_ContextHandle context);
|
||||
|
||||
/**
|
||||
* @brief Set the thread affinity to CPU cores.
|
||||
* @param context Context object handle.
|
||||
* @param mode: 0: no affinities, 1: big cores first, 2: little cores first
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API void OH_AI_ContextSetThreadAffinityMode(OH_AI_ContextHandle context, int mode);
|
||||
|
||||
/**
|
||||
* @brief Obtain the thread affinity of CPU cores.
|
||||
* @param context Context object handle.
|
||||
* @return Thread affinity to CPU cores. 0: no affinities, 1: big cores first, 2: little cores first
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API int OH_AI_ContextGetThreadAffinityMode(const OH_AI_ContextHandle context);
|
||||
|
||||
/**
|
||||
* @brief Set the thread lists to CPU cores.
|
||||
*
|
||||
* If core_list and mode are set by OH_AI_ContextSetThreadAffinityMode at the same time,
|
||||
* the core_list is effective, but the mode is not effective. \n
|
||||
*
|
||||
* @param context Context object handle.
|
||||
* @param core_list: a array of thread core lists.
|
||||
* @param core_num The number of core.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API void OH_AI_ContextSetThreadAffinityCoreList(OH_AI_ContextHandle context, const int32_t *core_list,
|
||||
size_t core_num);
|
||||
|
||||
/**
|
||||
* @brief Obtain the thread lists of CPU cores.
|
||||
* @param context Context object handle.
|
||||
* @param core_num The number of core.
|
||||
* @return a array of thread core lists.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API const int32_t *OH_AI_ContextGetThreadAffinityCoreList(const OH_AI_ContextHandle context, size_t *core_num);
|
||||
|
||||
/**
|
||||
* @brief Set the status whether to perform model inference or training in parallel.
|
||||
* @param context Context object handle.
|
||||
* @param is_parallel: true, parallel; false, not in parallel.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API void OH_AI_ContextSetEnableParallel(OH_AI_ContextHandle context, bool is_parallel);
|
||||
|
||||
/**
|
||||
* @brief Obtain the status whether to perform model inference or training in parallel.
|
||||
* @param context Context object handle.
|
||||
* @return Bool value that indicates whether in parallel.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API bool OH_AI_ContextGetEnableParallel(const OH_AI_ContextHandle context);
|
||||
|
||||
/**
|
||||
* @brief Add device info to context object.
|
||||
* @param context Context object handle.
|
||||
* @param device_info Device info object handle.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API void OH_AI_ContextAddDeviceInfo(OH_AI_ContextHandle context, OH_AI_DeviceInfoHandle device_info);
|
||||
|
||||
/**
|
||||
* @brief Create a device info object.
|
||||
* @param device_info Device info object handle.
|
||||
* @return Device info object handle.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API OH_AI_DeviceInfoHandle OH_AI_DeviceInfoCreate(OH_AI_DeviceType device_type);
|
||||
|
||||
/**
|
||||
* @brief Destroy the device info object.
|
||||
* @param device_info Device info object handle address.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API void OH_AI_DeviceInfoDestroy(OH_AI_DeviceInfoHandle *device_info);
|
||||
|
||||
/**
|
||||
* @brief Set provider's name.
|
||||
* @param device_info Device info object handle.
|
||||
* @param provider define the provider's name.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API void OH_AI_DeviceInfoSetProvider(OH_AI_DeviceInfoHandle device_info, const char *provider);
|
||||
|
||||
/**
|
||||
* @brief Obtain provider's name
|
||||
* @param device_info Device info object handle.
|
||||
* @return provider's name.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API const char *OH_AI_DeviceInfoGetProvider(const OH_AI_DeviceInfoHandle device_info);
|
||||
|
||||
/**
|
||||
* @brief Set provider's device type.
|
||||
* @param device_info Device info object handle.
|
||||
* @param device define the provider's device type. EG: CPU.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API void OH_AI_DeviceInfoSetProviderDevice(OH_AI_DeviceInfoHandle device_info, const char *device);
|
||||
|
||||
/**
|
||||
* @brief Obtain provider's device type.
|
||||
* @param device_info Device info object handle.
|
||||
* @return provider's device type.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API const char *OH_AI_DeviceInfoGetProviderDevice(const OH_AI_DeviceInfoHandle device_info);
|
||||
|
||||
/**
|
||||
* @brief Obtain the device type of the device info.
|
||||
* @param device_info Device info object handle.
|
||||
* @return Device Type of the device info.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API OH_AI_DeviceType OH_AI_DeviceInfoGetDeviceType(const OH_AI_DeviceInfoHandle device_info);
|
||||
|
||||
/**
|
||||
* @brief Set enables to perform the float16 inference, Only valid for CPU/GPU.
|
||||
* @param device_info Device info object handle.
|
||||
* @param is_fp16 Enable float16 inference or not.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API void OH_AI_DeviceInfoSetEnableFP16(OH_AI_DeviceInfoHandle device_info, bool is_fp16);
|
||||
|
||||
/**
|
||||
* @brief Obtain enables to perform the float16 inference, Only valid for CPU/GPU.
|
||||
* @param device_info Device info object handle.
|
||||
* @return Whether enable float16 inference.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API bool OH_AI_DeviceInfoGetEnableFP16(const OH_AI_DeviceInfoHandle device_info);
|
||||
|
||||
/**
|
||||
* @brief Set the NPU frequency, Only valid for NPU.
|
||||
* @param device_info Device info object handle.
|
||||
* @param frequency Can be set to 1 (low power consumption), 2 (balanced), 3 (high performance), 4 (extreme
|
||||
* performance), default as 3.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API void OH_AI_DeviceInfoSetFrequency(OH_AI_DeviceInfoHandle device_info, int frequency);
|
||||
|
||||
/**
|
||||
* @brief Obtain the NPU frequency, Only valid for NPU.
|
||||
* @param device_info Device info object handle.
|
||||
* @return NPU frequency
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API int OH_AI_DeviceInfoGetFrequency(const OH_AI_DeviceInfoHandle device_info);
|
||||
|
||||
/**
|
||||
* @brief Obtain the all device descriptions in NNRT.
|
||||
* @param num Number of NNRT device description.
|
||||
* @return NNRT device description array.
|
||||
* @since 10
|
||||
*/
|
||||
OH_AI_API NNRTDeviceDesc *OH_AI_GetAllNNRTDeviceDescs(size_t *num);
|
||||
|
||||
/**
|
||||
* @brief Obtain the specified element in NNRt device description array.
|
||||
* @param descs NNRT device description array.
|
||||
* @param index Element index.
|
||||
* @return NNRT device description.
|
||||
* @since 10
|
||||
*/
|
||||
OH_AI_API NNRTDeviceDesc *OH_AI_GetElementOfNNRTDeviceDescs(NNRTDeviceDesc *descs, size_t index);
|
||||
|
||||
/**
|
||||
* @brief Destroy the NNRT device descriptions returned by OH_AI_NNRTGetAllDeviceDescs().
|
||||
* @param desc NNRT device description array.
|
||||
* @since 10
|
||||
*/
|
||||
OH_AI_API void OH_AI_DestroyAllNNRTDeviceDescs(NNRTDeviceDesc **desc);
|
||||
|
||||
/**
|
||||
* @brief Obtain the device id in NNRT device description.
|
||||
* @param desc pointer to the NNRT device description instance.
|
||||
* @return NNRT device id.
|
||||
* @since 10
|
||||
*/
|
||||
OH_AI_API size_t OH_AI_GetDeviceIdFromNNRTDeviceDesc(const NNRTDeviceDesc *desc);
|
||||
|
||||
/**
|
||||
* @brief Obtain the device name in NNRT device description.
|
||||
* @param desc pointer to the NNRT device description instance.
|
||||
* @return NNRT device name.
|
||||
* @since 10
|
||||
*/
|
||||
OH_AI_API const char *OH_AI_GetNameFromNNRTDeviceDesc(const NNRTDeviceDesc *desc);
|
||||
|
||||
/**
|
||||
* @brief Obtain the device type in NNRT device description.
|
||||
* @param desc pointer to the NNRT device description instance.
|
||||
* @return NNRT device type.
|
||||
* @since 10
|
||||
*/
|
||||
OH_AI_API OH_AI_NNRTDeviceType OH_AI_GetTypeFromNNRTDeviceDesc(const NNRTDeviceDesc *desc);
|
||||
|
||||
/**
|
||||
* @brief Create the NNRT device info by exactly matching the specific device name.
|
||||
* @param name NNRt device name.
|
||||
* @return Device info object handle.
|
||||
* @since 10
|
||||
*/
|
||||
OH_AI_API OH_AI_DeviceInfoHandle OH_AI_CreateNNRTDeviceInfoByName(const char *name);
|
||||
|
||||
/**
|
||||
* @brief Create the NNRT device info by finding the first device with the specific device type.
|
||||
* @param name NNRt device type.
|
||||
* @return Device info object handle.
|
||||
* @since 10
|
||||
*/
|
||||
OH_AI_API OH_AI_DeviceInfoHandle OH_AI_CreateNNRTDeviceInfoByType(OH_AI_NNRTDeviceType type);
|
||||
|
||||
/**
|
||||
* @brief Set the NNRT device id, Only valid for NNRT.
|
||||
* @param device_info Device info object handle.
|
||||
* @param device_id NNRT device id.
|
||||
* @since 10
|
||||
*/
|
||||
OH_AI_API void OH_AI_DeviceInfoSetDeviceId(OH_AI_DeviceInfoHandle device_info, size_t device_id);
|
||||
|
||||
/**
|
||||
* @brief Obtain the NNRT device id, Only valid for NNRT.
|
||||
* @param device_info Device info object handle.
|
||||
* @return NNRT device id.
|
||||
* @since 10
|
||||
*/
|
||||
OH_AI_API size_t OH_AI_DeviceInfoGetDeviceId(const OH_AI_DeviceInfoHandle device_info);
|
||||
|
||||
/**
|
||||
* @brief Set the NNRT performance mode, Only valid for NNRT.
|
||||
* @param device_info Device info object handle.
|
||||
* @param device_id NNRT performance mode.
|
||||
* @since 10
|
||||
*/
|
||||
OH_AI_API void OH_AI_DeviceInfoSetPerformanceMode(OH_AI_DeviceInfoHandle device_info, OH_AI_PerformanceMode mode);
|
||||
|
||||
/**
|
||||
* @brief Obtain the NNRT performance mode, Only valid for NNRT.
|
||||
* @param device_info Device info object handle.
|
||||
* @return NNRT performance mode.
|
||||
* @since 10
|
||||
*/
|
||||
OH_AI_API OH_AI_PerformanceMode OH_AI_DeviceInfoGetPerformanceMode(const OH_AI_DeviceInfoHandle device_info);
|
||||
|
||||
/**
|
||||
* @brief Set the NNRT priority, Only valid for NNRT.
|
||||
* @param device_info Device info object handle.
|
||||
* @param device_id NNRT priority.
|
||||
* @since 10
|
||||
*/
|
||||
OH_AI_API void OH_AI_DeviceInfoSetPriority(OH_AI_DeviceInfoHandle device_info, OH_AI_Priority priority);
|
||||
|
||||
/**
|
||||
* @brief Obtain the NNRT priority, Only valid for NNRT.
|
||||
* @param device_info Device info object handle.
|
||||
* @return NNRT priority.
|
||||
* @since 10
|
||||
*/
|
||||
OH_AI_API OH_AI_Priority OH_AI_DeviceInfoGetPriority(const OH_AI_DeviceInfoHandle device_info);
|
||||
|
||||
/**
|
||||
* @brief Add extension of key/value format to device info, Only valid for NNRT.
|
||||
* @param device_info Device info object handle.
|
||||
* @param name The content of key as a C string.
|
||||
* @param value The pointer to the value, which is a byte array.
|
||||
* @param value_size The size of the value, which is a byte array.
|
||||
* @return OH_AI_STATUS_SUCCESS if success, or detail error code if failed.
|
||||
* @since 10
|
||||
*/
|
||||
OH_AI_API OH_AI_Status OH_AI_DeviceInfoAddExtension(OH_AI_DeviceInfoHandle device_info, const char *name, const char *value, size_t value_size);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif // MINDSPORE_INCLUDE_C_API_CONTEXT_C_H
|
||||
/**
|
||||
* Copyright 2021 Huawei Technologies 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @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
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include "mindspore/types.h"
|
||||
#include "mindspore/status.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef void *OH_AI_ContextHandle;
|
||||
typedef void *OH_AI_DeviceInfoHandle;
|
||||
|
||||
/**
|
||||
* @brief Create a context object.
|
||||
* @return Context object handle.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API OH_AI_ContextHandle OH_AI_ContextCreate();
|
||||
|
||||
/**
|
||||
* @brief Destroy the context object.
|
||||
* @param context Context object handle address.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API void OH_AI_ContextDestroy(OH_AI_ContextHandle *context);
|
||||
|
||||
/**
|
||||
* @brief Set the number of threads at runtime.
|
||||
* @param context Context object handle.
|
||||
* @param thread_num the number of threads at runtime.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API void OH_AI_ContextSetThreadNum(OH_AI_ContextHandle context, int32_t thread_num);
|
||||
|
||||
/**
|
||||
* @brief Obtain the current thread number setting.
|
||||
* @param context Context object handle.
|
||||
* @return The current thread number setting.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API int32_t OH_AI_ContextGetThreadNum(const OH_AI_ContextHandle context);
|
||||
|
||||
/**
|
||||
* @brief Set the thread affinity to CPU cores.
|
||||
* @param context Context object handle.
|
||||
* @param mode: 0: no affinities, 1: big cores first, 2: little cores first
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API void OH_AI_ContextSetThreadAffinityMode(OH_AI_ContextHandle context, int mode);
|
||||
|
||||
/**
|
||||
* @brief Obtain the thread affinity of CPU cores.
|
||||
* @param context Context object handle.
|
||||
* @return Thread affinity to CPU cores. 0: no affinities, 1: big cores first, 2: little cores first
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API int OH_AI_ContextGetThreadAffinityMode(const OH_AI_ContextHandle context);
|
||||
|
||||
/**
|
||||
* @brief Set the thread lists to CPU cores.
|
||||
*
|
||||
* If core_list and mode are set by OH_AI_ContextSetThreadAffinityMode at the same time,
|
||||
* the core_list is effective, but the mode is not effective. \n
|
||||
*
|
||||
* @param context Context object handle.
|
||||
* @param core_list: a array of thread core lists.
|
||||
* @param core_num The number of core.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API void OH_AI_ContextSetThreadAffinityCoreList(OH_AI_ContextHandle context, const int32_t *core_list,
|
||||
size_t core_num);
|
||||
|
||||
/**
|
||||
* @brief Obtain the thread lists of CPU cores.
|
||||
* @param context Context object handle.
|
||||
* @param core_num The number of core.
|
||||
* @return a array of thread core lists.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API const int32_t *OH_AI_ContextGetThreadAffinityCoreList(const OH_AI_ContextHandle context, size_t *core_num);
|
||||
|
||||
/**
|
||||
* @brief Set the status whether to perform model inference or training in parallel.
|
||||
* @param context Context object handle.
|
||||
* @param is_parallel: true, parallel; false, not in parallel.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API void OH_AI_ContextSetEnableParallel(OH_AI_ContextHandle context, bool is_parallel);
|
||||
|
||||
/**
|
||||
* @brief Obtain the status whether to perform model inference or training in parallel.
|
||||
* @param context Context object handle.
|
||||
* @return Bool value that indicates whether in parallel.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API bool OH_AI_ContextGetEnableParallel(const OH_AI_ContextHandle context);
|
||||
|
||||
/**
|
||||
* @brief Add device info to context object.
|
||||
* @param context Context object handle.
|
||||
* @param device_info Device info object handle.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API void OH_AI_ContextAddDeviceInfo(OH_AI_ContextHandle context, OH_AI_DeviceInfoHandle device_info);
|
||||
|
||||
/**
|
||||
* @brief Create a device info object.
|
||||
* @param device_info Device info object handle.
|
||||
* @return Device info object handle.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API OH_AI_DeviceInfoHandle OH_AI_DeviceInfoCreate(OH_AI_DeviceType device_type);
|
||||
|
||||
/**
|
||||
* @brief Destroy the device info object.
|
||||
* @param device_info Device info object handle address.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API void OH_AI_DeviceInfoDestroy(OH_AI_DeviceInfoHandle *device_info);
|
||||
|
||||
/**
|
||||
* @brief Set provider's name.
|
||||
* @param device_info Device info object handle.
|
||||
* @param provider define the provider's name.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API void OH_AI_DeviceInfoSetProvider(OH_AI_DeviceInfoHandle device_info, const char *provider);
|
||||
|
||||
/**
|
||||
* @brief Obtain provider's name
|
||||
* @param device_info Device info object handle.
|
||||
* @return provider's name.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API const char *OH_AI_DeviceInfoGetProvider(const OH_AI_DeviceInfoHandle device_info);
|
||||
|
||||
/**
|
||||
* @brief Set provider's device type.
|
||||
* @param device_info Device info object handle.
|
||||
* @param device define the provider's device type. EG: CPU.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API void OH_AI_DeviceInfoSetProviderDevice(OH_AI_DeviceInfoHandle device_info, const char *device);
|
||||
|
||||
/**
|
||||
* @brief Obtain provider's device type.
|
||||
* @param device_info Device info object handle.
|
||||
* @return provider's device type.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API const char *OH_AI_DeviceInfoGetProviderDevice(const OH_AI_DeviceInfoHandle device_info);
|
||||
|
||||
/**
|
||||
* @brief Obtain the device type of the device info.
|
||||
* @param device_info Device info object handle.
|
||||
* @return Device Type of the device info.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API OH_AI_DeviceType OH_AI_DeviceInfoGetDeviceType(const OH_AI_DeviceInfoHandle device_info);
|
||||
|
||||
/**
|
||||
* @brief Set enables to perform the float16 inference, Only valid for CPU/GPU.
|
||||
* @param device_info Device info object handle.
|
||||
* @param is_fp16 Enable float16 inference or not.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API void OH_AI_DeviceInfoSetEnableFP16(OH_AI_DeviceInfoHandle device_info, bool is_fp16);
|
||||
|
||||
/**
|
||||
* @brief Obtain enables to perform the float16 inference, Only valid for CPU/GPU.
|
||||
* @param device_info Device info object handle.
|
||||
* @return Whether enable float16 inference.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API bool OH_AI_DeviceInfoGetEnableFP16(const OH_AI_DeviceInfoHandle device_info);
|
||||
|
||||
/**
|
||||
* @brief Set the NPU frequency, Only valid for NPU.
|
||||
* @param device_info Device info object handle.
|
||||
* @param frequency Can be set to 1 (low power consumption), 2 (balanced), 3 (high performance), 4 (extreme
|
||||
* performance), default as 3.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API void OH_AI_DeviceInfoSetFrequency(OH_AI_DeviceInfoHandle device_info, int frequency);
|
||||
|
||||
/**
|
||||
* @brief Obtain the NPU frequency, Only valid for NPU.
|
||||
* @param device_info Device info object handle.
|
||||
* @return NPU frequency
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API int OH_AI_DeviceInfoGetFrequency(const OH_AI_DeviceInfoHandle device_info);
|
||||
|
||||
/**
|
||||
* @brief Obtain the all device descriptions in NNRT.
|
||||
* @param num Number of NNRT device description.
|
||||
* @return NNRT device description array.
|
||||
* @since 10
|
||||
*/
|
||||
OH_AI_API NNRTDeviceDesc *OH_AI_GetAllNNRTDeviceDescs(size_t *num);
|
||||
|
||||
/**
|
||||
* @brief Obtain the specified element in NNRt device description array.
|
||||
* @param descs NNRT device description array.
|
||||
* @param index Element index.
|
||||
* @return NNRT device description.
|
||||
* @since 10
|
||||
*/
|
||||
OH_AI_API NNRTDeviceDesc *OH_AI_GetElementOfNNRTDeviceDescs(NNRTDeviceDesc *descs, size_t index);
|
||||
|
||||
/**
|
||||
* @brief Destroy the NNRT device descriptions returned by OH_AI_NNRTGetAllDeviceDescs().
|
||||
* @param desc NNRT device description array.
|
||||
* @since 10
|
||||
*/
|
||||
OH_AI_API void OH_AI_DestroyAllNNRTDeviceDescs(NNRTDeviceDesc **desc);
|
||||
|
||||
/**
|
||||
* @brief Obtain the device id in NNRT device description.
|
||||
* @param desc pointer to the NNRT device description instance.
|
||||
* @return NNRT device id.
|
||||
* @since 10
|
||||
*/
|
||||
OH_AI_API size_t OH_AI_GetDeviceIdFromNNRTDeviceDesc(const NNRTDeviceDesc *desc);
|
||||
|
||||
/**
|
||||
* @brief Obtain the device name in NNRT device description.
|
||||
* @param desc pointer to the NNRT device description instance.
|
||||
* @return NNRT device name.
|
||||
* @since 10
|
||||
*/
|
||||
OH_AI_API const char *OH_AI_GetNameFromNNRTDeviceDesc(const NNRTDeviceDesc *desc);
|
||||
|
||||
/**
|
||||
* @brief Obtain the device type in NNRT device description.
|
||||
* @param desc pointer to the NNRT device description instance.
|
||||
* @return NNRT device type.
|
||||
* @since 10
|
||||
*/
|
||||
OH_AI_API OH_AI_NNRTDeviceType OH_AI_GetTypeFromNNRTDeviceDesc(const NNRTDeviceDesc *desc);
|
||||
|
||||
/**
|
||||
* @brief Create the NNRT device info by exactly matching the specific device name.
|
||||
* @param name NNRt device name.
|
||||
* @return Device info object handle.
|
||||
* @since 10
|
||||
*/
|
||||
OH_AI_API OH_AI_DeviceInfoHandle OH_AI_CreateNNRTDeviceInfoByName(const char *name);
|
||||
|
||||
/**
|
||||
* @brief Create the NNRT device info by finding the first device with the specific device type.
|
||||
* @param name NNRt device type.
|
||||
* @return Device info object handle.
|
||||
* @since 10
|
||||
*/
|
||||
OH_AI_API OH_AI_DeviceInfoHandle OH_AI_CreateNNRTDeviceInfoByType(OH_AI_NNRTDeviceType type);
|
||||
|
||||
/**
|
||||
* @brief Set the NNRT device id, Only valid for NNRT.
|
||||
* @param device_info Device info object handle.
|
||||
* @param device_id NNRT device id.
|
||||
* @since 10
|
||||
*/
|
||||
OH_AI_API void OH_AI_DeviceInfoSetDeviceId(OH_AI_DeviceInfoHandle device_info, size_t device_id);
|
||||
|
||||
/**
|
||||
* @brief Obtain the NNRT device id, Only valid for NNRT.
|
||||
* @param device_info Device info object handle.
|
||||
* @return NNRT device id.
|
||||
* @since 10
|
||||
*/
|
||||
OH_AI_API size_t OH_AI_DeviceInfoGetDeviceId(const OH_AI_DeviceInfoHandle device_info);
|
||||
|
||||
/**
|
||||
* @brief Set the NNRT performance mode, Only valid for NNRT.
|
||||
* @param device_info Device info object handle.
|
||||
* @param device_id NNRT performance mode.
|
||||
* @since 10
|
||||
*/
|
||||
OH_AI_API void OH_AI_DeviceInfoSetPerformanceMode(OH_AI_DeviceInfoHandle device_info, OH_AI_PerformanceMode mode);
|
||||
|
||||
/**
|
||||
* @brief Obtain the NNRT performance mode, Only valid for NNRT.
|
||||
* @param device_info Device info object handle.
|
||||
* @return NNRT performance mode.
|
||||
* @since 10
|
||||
*/
|
||||
OH_AI_API OH_AI_PerformanceMode OH_AI_DeviceInfoGetPerformanceMode(const OH_AI_DeviceInfoHandle device_info);
|
||||
|
||||
/**
|
||||
* @brief Set the NNRT priority, Only valid for NNRT.
|
||||
* @param device_info Device info object handle.
|
||||
* @param device_id NNRT priority.
|
||||
* @since 10
|
||||
*/
|
||||
OH_AI_API void OH_AI_DeviceInfoSetPriority(OH_AI_DeviceInfoHandle device_info, OH_AI_Priority priority);
|
||||
|
||||
/**
|
||||
* @brief Obtain the NNRT priority, Only valid for NNRT.
|
||||
* @param device_info Device info object handle.
|
||||
* @return NNRT priority.
|
||||
* @since 10
|
||||
*/
|
||||
OH_AI_API OH_AI_Priority OH_AI_DeviceInfoGetPriority(const OH_AI_DeviceInfoHandle device_info);
|
||||
|
||||
/**
|
||||
* @brief Add extension of key/value format to device info, Only valid for NNRT.
|
||||
* @param device_info Device info object handle.
|
||||
* @param name The content of key as a C string.
|
||||
* @param value The pointer to the value, which is a byte array.
|
||||
* @param value_size The size of the value, which is a byte array.
|
||||
* @return OH_AI_STATUS_SUCCESS if success, or detail error code if failed.
|
||||
* @since 10
|
||||
*/
|
||||
OH_AI_API OH_AI_Status OH_AI_DeviceInfoAddExtension(OH_AI_DeviceInfoHandle device_info, const char *name, const char *value, size_t value_size);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif // MINDSPORE_INCLUDE_C_API_CONTEXT_C_H
|
@ -1,52 +1,71 @@
|
||||
/**
|
||||
* Copyright 2021 Huawei Technologies 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 MINDSPORE_INCLUDE_C_API_DATA_TYPE_C_H
|
||||
#define MINDSPORE_INCLUDE_C_API_DATA_TYPE_C_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef enum OH_AI_DataType {
|
||||
OH_AI_DATATYPE_UNKNOWN = 0,
|
||||
OH_AI_DATATYPE_OBJECTTYPE_STRING = 12,
|
||||
OH_AI_DATATYPE_OBJECTTYPE_LIST = 13,
|
||||
OH_AI_DATATYPE_OBJECTTYPE_TUPLE = 14,
|
||||
OH_AI_DATATYPE_OBJECTTYPE_TENSOR = 17,
|
||||
OH_AI_DATATYPE_NUMBERTYPE_BEGIN = 29,
|
||||
OH_AI_DATATYPE_NUMBERTYPE_BOOL = 30,
|
||||
OH_AI_DATATYPE_NUMBERTYPE_INT8 = 32,
|
||||
OH_AI_DATATYPE_NUMBERTYPE_INT16 = 33,
|
||||
OH_AI_DATATYPE_NUMBERTYPE_INT32 = 34,
|
||||
OH_AI_DATATYPE_NUMBERTYPE_INT64 = 35,
|
||||
OH_AI_DATATYPE_NUMBERTYPE_UINT8 = 37,
|
||||
OH_AI_DATATYPE_NUMBERTYPE_UINT16 = 38,
|
||||
OH_AI_DATATYPE_NUMBERTYPE_UINT32 = 39,
|
||||
OH_AI_DATATYPE_NUMBERTYPE_UINT64 = 40,
|
||||
OH_AI_DATATYPE_NUMBERTYPE_FLOAT16 = 42,
|
||||
OH_AI_DATATYPE_NUMBERTYPE_FLOAT32 = 43,
|
||||
OH_AI_DATATYPE_NUMBERTYPE_FLOAT64 = 44,
|
||||
OH_AI_DATATYPE_NUMBERTYPE_END = 46,
|
||||
// add new enum here
|
||||
OH_AI_DataTypeInvalid = INT32_MAX,
|
||||
} OH_AI_DataType;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif // MINDSPORE_INCLUDE_C_API_DATA_TYPE_C_H
|
||||
/**
|
||||
* Copyright 2021 Huawei Technologies 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @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
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef enum OH_AI_DataType {
|
||||
OH_AI_DATATYPE_UNKNOWN = 0,
|
||||
OH_AI_DATATYPE_OBJECTTYPE_STRING = 12,
|
||||
OH_AI_DATATYPE_OBJECTTYPE_LIST = 13,
|
||||
OH_AI_DATATYPE_OBJECTTYPE_TUPLE = 14,
|
||||
OH_AI_DATATYPE_OBJECTTYPE_TENSOR = 17,
|
||||
OH_AI_DATATYPE_NUMBERTYPE_BEGIN = 29,
|
||||
OH_AI_DATATYPE_NUMBERTYPE_BOOL = 30,
|
||||
OH_AI_DATATYPE_NUMBERTYPE_INT8 = 32,
|
||||
OH_AI_DATATYPE_NUMBERTYPE_INT16 = 33,
|
||||
OH_AI_DATATYPE_NUMBERTYPE_INT32 = 34,
|
||||
OH_AI_DATATYPE_NUMBERTYPE_INT64 = 35,
|
||||
OH_AI_DATATYPE_NUMBERTYPE_UINT8 = 37,
|
||||
OH_AI_DATATYPE_NUMBERTYPE_UINT16 = 38,
|
||||
OH_AI_DATATYPE_NUMBERTYPE_UINT32 = 39,
|
||||
OH_AI_DATATYPE_NUMBERTYPE_UINT64 = 40,
|
||||
OH_AI_DATATYPE_NUMBERTYPE_FLOAT16 = 42,
|
||||
OH_AI_DATATYPE_NUMBERTYPE_FLOAT32 = 43,
|
||||
OH_AI_DATATYPE_NUMBERTYPE_FLOAT64 = 44,
|
||||
OH_AI_DATATYPE_NUMBERTYPE_END = 46,
|
||||
// add new enum here
|
||||
OH_AI_DataTypeInvalid = INT32_MAX,
|
||||
} OH_AI_DataType;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif // MINDSPORE_INCLUDE_C_API_DATA_TYPE_C_H
|
@ -1,46 +1,65 @@
|
||||
/**
|
||||
* Copyright 2021 Huawei Technologies 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 MINDSPORE_INCLUDE_C_API_FORMAT_C_H
|
||||
#define MINDSPORE_INCLUDE_C_API_FORMAT_C_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef enum OH_AI_Format {
|
||||
OH_AI_FORMAT_NCHW = 0,
|
||||
OH_AI_FORMAT_NHWC = 1,
|
||||
OH_AI_FORMAT_NHWC4 = 2,
|
||||
OH_AI_FORMAT_HWKC = 3,
|
||||
OH_AI_FORMAT_HWCK = 4,
|
||||
OH_AI_FORMAT_KCHW = 5,
|
||||
OH_AI_FORMAT_CKHW = 6,
|
||||
OH_AI_FORMAT_KHWC = 7,
|
||||
OH_AI_FORMAT_CHWK = 8,
|
||||
OH_AI_FORMAT_HW = 9,
|
||||
OH_AI_FORMAT_HW4 = 10,
|
||||
OH_AI_FORMAT_NC = 11,
|
||||
OH_AI_FORMAT_NC4 = 12,
|
||||
OH_AI_FORMAT_NC4HW4 = 13,
|
||||
OH_AI_FORMAT_NCDHW = 15,
|
||||
OH_AI_FORMAT_NWC = 16,
|
||||
OH_AI_FORMAT_NCW = 17
|
||||
} OH_AI_Format;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif // MINDSPORE_INCLUDE_C_API_FORMAT_C_H
|
||||
/**
|
||||
* Copyright 2021 Huawei Technologies 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @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
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef enum OH_AI_Format {
|
||||
OH_AI_FORMAT_NCHW = 0,
|
||||
OH_AI_FORMAT_NHWC = 1,
|
||||
OH_AI_FORMAT_NHWC4 = 2,
|
||||
OH_AI_FORMAT_HWKC = 3,
|
||||
OH_AI_FORMAT_HWCK = 4,
|
||||
OH_AI_FORMAT_KCHW = 5,
|
||||
OH_AI_FORMAT_CKHW = 6,
|
||||
OH_AI_FORMAT_KHWC = 7,
|
||||
OH_AI_FORMAT_CHWK = 8,
|
||||
OH_AI_FORMAT_HW = 9,
|
||||
OH_AI_FORMAT_HW4 = 10,
|
||||
OH_AI_FORMAT_NC = 11,
|
||||
OH_AI_FORMAT_NC4 = 12,
|
||||
OH_AI_FORMAT_NC4HW4 = 13,
|
||||
OH_AI_FORMAT_NCDHW = 15,
|
||||
OH_AI_FORMAT_NWC = 16,
|
||||
OH_AI_FORMAT_NCW = 17
|
||||
} OH_AI_Format;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif // MINDSPORE_INCLUDE_C_API_FORMAT_C_H
|
254
third_party/mindspore/kits/mindspore_lib.ndk.json
vendored
Normal file
254
third_party/mindspore/kits/mindspore_lib.ndk.json
vendored
Normal file
@ -0,0 +1,254 @@
|
||||
[
|
||||
{
|
||||
"first_introduced": "9",
|
||||
"name": "OH_AI_ContextCreate"
|
||||
},
|
||||
{
|
||||
"first_introduced": "9",
|
||||
"name": "OH_AI_ContextDestroy"
|
||||
},
|
||||
{
|
||||
"first_introduced": "9",
|
||||
"name": "OH_AI_ContextSetThreadNum"
|
||||
},
|
||||
{
|
||||
"first_introduced": "9",
|
||||
"name": "OH_AI_ContextGetThreadNum"
|
||||
},
|
||||
{
|
||||
"first_introduced": "9",
|
||||
"name": "OH_AI_ContextSetThreadAffinityMode"
|
||||
},
|
||||
{
|
||||
"first_introduced": "9",
|
||||
"name": "OH_AI_ContextGetThreadAffinityMode"
|
||||
},
|
||||
{
|
||||
"first_introduced": "9",
|
||||
"name": "OH_AI_ContextSetThreadAffinityCoreList"
|
||||
},
|
||||
{
|
||||
"first_introduced": "9",
|
||||
"name": "OH_AI_ContextGetThreadAffinityCoreList"
|
||||
},
|
||||
{
|
||||
"first_introduced": "9",
|
||||
"name": "OH_AI_ContextSetEnableParallel"
|
||||
},
|
||||
{
|
||||
"first_introduced": "9",
|
||||
"name": "OH_AI_ContextGetEnableParallel"
|
||||
},
|
||||
{
|
||||
"first_introduced": "9",
|
||||
"name": "OH_AI_ContextAddDeviceInfo"
|
||||
},
|
||||
{
|
||||
"first_introduced": "9",
|
||||
"name": "OH_AI_DeviceInfoCreate"
|
||||
},
|
||||
{
|
||||
"first_introduced": "9",
|
||||
"name": "OH_AI_DeviceInfoDestroy"
|
||||
},
|
||||
{
|
||||
"first_introduced": "9",
|
||||
"name": "OH_AI_DeviceInfoSetProvider"
|
||||
},
|
||||
{
|
||||
"first_introduced": "9",
|
||||
"name": "OH_AI_DeviceInfoGetProvider"
|
||||
},
|
||||
{
|
||||
"first_introduced": "9",
|
||||
"name": "OH_AI_DeviceInfoSetProviderDevice"
|
||||
},
|
||||
{
|
||||
"first_introduced": "9",
|
||||
"name": "OH_AI_DeviceInfoGetProviderDevice"
|
||||
},
|
||||
{
|
||||
"first_introduced": "9",
|
||||
"name": "OH_AI_DeviceInfoGetDeviceType"
|
||||
},
|
||||
{
|
||||
"first_introduced": "9",
|
||||
"name": "OH_AI_DeviceInfoSetEnableFP16"
|
||||
},
|
||||
{
|
||||
"first_introduced": "9",
|
||||
"name": "OH_AI_DeviceInfoGetEnableFP16"
|
||||
},
|
||||
{
|
||||
"first_introduced": "9",
|
||||
"name": "OH_AI_DeviceInfoSetFrequency"
|
||||
},
|
||||
{
|
||||
"first_introduced": "9",
|
||||
"name": "OH_AI_DeviceInfoGetFrequency"
|
||||
},
|
||||
{
|
||||
"first_introduced": "9",
|
||||
"name": "OH_AI_ModelCreate"
|
||||
},
|
||||
{
|
||||
"first_introduced": "9",
|
||||
"name": "OH_AI_ModelDestroy"
|
||||
},
|
||||
{
|
||||
"first_introduced": "9",
|
||||
"name": "OH_AI_ModelBuild"
|
||||
},
|
||||
{
|
||||
"first_introduced": "9",
|
||||
"name": "OH_AI_ModelBuildFromFile"
|
||||
},
|
||||
{
|
||||
"first_introduced": "9",
|
||||
"name": "OH_AI_ModelResize"
|
||||
},
|
||||
{
|
||||
"first_introduced": "9",
|
||||
"name": "OH_AI_ModelPredict"
|
||||
},
|
||||
{
|
||||
"first_introduced": "9",
|
||||
"name": "OH_AI_ModelGetInputs"
|
||||
},
|
||||
{
|
||||
"first_introduced": "9",
|
||||
"name": "OH_AI_ModelGetOutputs"
|
||||
},
|
||||
{
|
||||
"first_introduced": "9",
|
||||
"name": "OH_AI_ModelGetInputByTensorName"
|
||||
},
|
||||
{
|
||||
"first_introduced": "9",
|
||||
"name": "OH_AI_ModelGetOutputByTensorName"
|
||||
},
|
||||
{
|
||||
"first_introduced": "9",
|
||||
"name": "OH_AI_TensorCreate"
|
||||
},
|
||||
{
|
||||
"first_introduced": "9",
|
||||
"name": "OH_AI_TensorDestroy"
|
||||
},
|
||||
{
|
||||
"first_introduced": "9",
|
||||
"name": "OH_AI_TensorClone"
|
||||
},
|
||||
{
|
||||
"first_introduced": "9",
|
||||
"name": "OH_AI_TensorSetName"
|
||||
},
|
||||
{
|
||||
"first_introduced": "9",
|
||||
"name": "OH_AI_TensorGetName"
|
||||
},
|
||||
{
|
||||
"first_introduced": "9",
|
||||
"name": "OH_AI_TensorSetDataType"
|
||||
},
|
||||
{
|
||||
"first_introduced": "9",
|
||||
"name": "OH_AI_TensorGetDataType"
|
||||
},
|
||||
{
|
||||
"first_introduced": "9",
|
||||
"name": "OH_AI_TensorSetShape"
|
||||
},
|
||||
{
|
||||
"first_introduced": "9",
|
||||
"name": "OH_AI_TensorGetShape"
|
||||
},
|
||||
{
|
||||
"first_introduced": "9",
|
||||
"name": "OH_AI_TensorSetFormat"
|
||||
},
|
||||
{
|
||||
"first_introduced": "9",
|
||||
"name": "OH_AI_TensorGetFormat"
|
||||
},
|
||||
{
|
||||
"first_introduced": "9",
|
||||
"name": "OH_AI_TensorSetData"
|
||||
},
|
||||
{
|
||||
"first_introduced": "9",
|
||||
"name": "OH_AI_TensorGetData"
|
||||
},
|
||||
{
|
||||
"first_introduced": "9",
|
||||
"name": "OH_AI_TensorGetMutableData"
|
||||
},
|
||||
{
|
||||
"first_introduced": "9",
|
||||
"name": "OH_AI_TensorGetElementNum"
|
||||
},
|
||||
{
|
||||
"first_introduced": "9",
|
||||
"name": "OH_AI_TensorGetDataSize"
|
||||
},
|
||||
{
|
||||
"first_introduced": "10",
|
||||
"name": "OH_AI_GetAllNNRTDeviceDescs"
|
||||
},
|
||||
{
|
||||
"first_introduced": "10",
|
||||
"name": "OH_AI_DestroyAllNNRTDeviceDescs"
|
||||
},
|
||||
{
|
||||
"first_introduced": "10",
|
||||
"name": "OH_AI_GetDeviceIdFromNNRTDeviceDesc"
|
||||
},
|
||||
{
|
||||
"first_introduced": "10",
|
||||
"name": "OH_AI_GetNameFromNNRTDeviceDesc"
|
||||
},
|
||||
{
|
||||
"first_introduced": "10",
|
||||
"name": "OH_AI_GetTypeFromNNRTDeviceDesc"
|
||||
},
|
||||
{
|
||||
"first_introduced": "10",
|
||||
"name": "OH_AI_CreateNNRTDeviceInfoByName"
|
||||
},
|
||||
{
|
||||
"first_introduced": "10",
|
||||
"name": "OH_AI_CreateNNRTDeviceInfoByType"
|
||||
},
|
||||
{
|
||||
"first_introduced": "10",
|
||||
"name": "OH_AI_DeviceInfoSetDeviceId"
|
||||
},
|
||||
{
|
||||
"first_introduced": "10",
|
||||
"name": "OH_AI_DeviceInfoGetDeviceId"
|
||||
},
|
||||
{
|
||||
"first_introduced": "10",
|
||||
"name": "OH_AI_DeviceInfoSetPerformanceMode"
|
||||
},
|
||||
{
|
||||
"first_introduced": "10",
|
||||
"name": "OH_AI_DeviceInfoGetPerformanceMode"
|
||||
},
|
||||
{
|
||||
"first_introduced": "10",
|
||||
"name": "OH_AI_DeviceInfoSetPriority"
|
||||
},
|
||||
{
|
||||
"first_introduced": "10",
|
||||
"name": "OH_AI_GetElementOfNNRTDeviceDescs"
|
||||
},
|
||||
{
|
||||
"first_introduced": "10",
|
||||
"name": "OH_AI_DeviceInfoAddExtension"
|
||||
},
|
||||
{
|
||||
"first_introduced": "10",
|
||||
"name": "OH_AI_TensorSetUserData"
|
||||
}
|
||||
]
|
@ -1,150 +1,169 @@
|
||||
/**
|
||||
* Copyright 2021 Huawei Technologies 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 MINDSPORE_INCLUDE_C_API_MODEL_C_H
|
||||
#define MINDSPORE_INCLUDE_C_API_MODEL_C_H
|
||||
|
||||
#include "mindspore/tensor.h"
|
||||
#include "mindspore/context.h"
|
||||
#include "mindspore/status.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef void *OH_AI_ModelHandle;
|
||||
|
||||
typedef struct OH_AI_TensorHandleArray {
|
||||
size_t handle_num;
|
||||
OH_AI_TensorHandle *handle_list;
|
||||
} OH_AI_TensorHandleArray;
|
||||
|
||||
#define OH_AI_MAX_SHAPE_NUM 32
|
||||
typedef struct OH_AI_ShapeInfo {
|
||||
size_t shape_num;
|
||||
int64_t shape[OH_AI_MAX_SHAPE_NUM];
|
||||
} OH_AI_ShapeInfo;
|
||||
|
||||
typedef struct OH_AI_CallBackParam {
|
||||
char *node_name;
|
||||
char *node_type;
|
||||
} OH_AI_CallBackParam;
|
||||
|
||||
typedef bool (*OH_AI_KernelCallBack)(const OH_AI_TensorHandleArray inputs, const OH_AI_TensorHandleArray outputs,
|
||||
const OH_AI_CallBackParam kernel_Info);
|
||||
|
||||
/**
|
||||
* @brief Create a model object.
|
||||
* @return Model object handle.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API OH_AI_ModelHandle OH_AI_ModelCreate();
|
||||
|
||||
/**
|
||||
* @brief Destroy the model object.
|
||||
* @param model Model object handle address.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API void OH_AI_ModelDestroy(OH_AI_ModelHandle *model);
|
||||
|
||||
/**
|
||||
* @brief Build the model from model file buffer so that it can run on a device.
|
||||
* @param model Model object handle.
|
||||
* @param model_data Define the buffer read from a model file.
|
||||
* @param data_size Define bytes number of model file buffer.
|
||||
* @param model_type Define The type of model file.
|
||||
* @param model_context Define the context used to store options during execution.
|
||||
* @return OH_AI_Status.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API OH_AI_Status OH_AI_ModelBuild(OH_AI_ModelHandle model, const void *model_data, size_t data_size,
|
||||
OH_AI_ModelType model_type, const OH_AI_ContextHandle model_context);
|
||||
|
||||
/**
|
||||
* @brief Load and build the model from model path so that it can run on a device.
|
||||
* @param model Model object handle.
|
||||
* @param model_path Define the model file path.
|
||||
* @param model_type Define The type of model file.
|
||||
* @param model_context Define the context used to store options during execution.
|
||||
* @return OH_AI_Status.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API OH_AI_Status OH_AI_ModelBuildFromFile(OH_AI_ModelHandle model, const char *model_path,
|
||||
OH_AI_ModelType model_type, const OH_AI_ContextHandle model_context);
|
||||
|
||||
/**
|
||||
* @brief Resizes the shapes of inputs.
|
||||
* @param model Model object handle.
|
||||
* @param inputs The array that includes all input tensor handles.
|
||||
* @param shape_infos Defines the new shapes of inputs, should be consistent with inputs.
|
||||
* @param shape_info_num The num of shape_infos.
|
||||
* @return OH_AI_Status.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API OH_AI_Status OH_AI_ModelResize(OH_AI_ModelHandle model, const OH_AI_TensorHandleArray inputs,
|
||||
OH_AI_ShapeInfo *shape_infos, size_t shape_info_num);
|
||||
|
||||
/**
|
||||
* @brief Inference model.
|
||||
* @param model Model object handle.
|
||||
* @param inputs The array that includes all input tensor handles.
|
||||
* @param outputs The array that includes all output tensor handles.
|
||||
* @param before CallBack before predict.
|
||||
* @param after CallBack after predict.
|
||||
* @return OH_AI_Status.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API OH_AI_Status OH_AI_ModelPredict(OH_AI_ModelHandle model, const OH_AI_TensorHandleArray inputs,
|
||||
OH_AI_TensorHandleArray *outputs, const OH_AI_KernelCallBack before,
|
||||
const OH_AI_KernelCallBack after);
|
||||
|
||||
/**
|
||||
* @brief Obtains all input tensor handles of the model.
|
||||
* @param model Model object handle.
|
||||
* @return The array that includes all input tensor handles.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API OH_AI_TensorHandleArray OH_AI_ModelGetInputs(const OH_AI_ModelHandle model);
|
||||
|
||||
/**
|
||||
* @brief Obtains all output tensor handles of the model.
|
||||
* @param model Model object handle.
|
||||
* @return The array that includes all output tensor handles.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API OH_AI_TensorHandleArray OH_AI_ModelGetOutputs(const OH_AI_ModelHandle model);
|
||||
|
||||
/**
|
||||
* @brief Obtains the input tensor handle of the model by name.
|
||||
* @param model Model object handle.
|
||||
* @param tensor_name The name of tensor.
|
||||
* @return The input tensor handle with the given name, if the name is not found, an NULL is returned.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API OH_AI_TensorHandle OH_AI_ModelGetInputByTensorName(const OH_AI_ModelHandle model, const char *tensor_name);
|
||||
|
||||
/**
|
||||
* @brief Obtains the output tensor handle of the model by name.
|
||||
* @param model Model object handle.
|
||||
* @param tensor_name The name of tensor.
|
||||
* @return The output tensor handle with the given name, if the name is not found, an NULL is returned.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API OH_AI_TensorHandle OH_AI_ModelGetOutputByTensorName(const OH_AI_ModelHandle model, const char *tensor_name);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif // MINDSPORE_INCLUDE_C_API_MODEL_C_H
|
||||
/**
|
||||
* Copyright 2021 Huawei Technologies 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @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
|
||||
|
||||
#include "mindspore/tensor.h"
|
||||
#include "mindspore/context.h"
|
||||
#include "mindspore/status.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef void *OH_AI_ModelHandle;
|
||||
|
||||
typedef struct OH_AI_TensorHandleArray {
|
||||
size_t handle_num;
|
||||
OH_AI_TensorHandle *handle_list;
|
||||
} OH_AI_TensorHandleArray;
|
||||
|
||||
#define OH_AI_MAX_SHAPE_NUM 32
|
||||
typedef struct OH_AI_ShapeInfo {
|
||||
size_t shape_num;
|
||||
int64_t shape[OH_AI_MAX_SHAPE_NUM];
|
||||
} OH_AI_ShapeInfo;
|
||||
|
||||
typedef struct OH_AI_CallBackParam {
|
||||
char *node_name;
|
||||
char *node_type;
|
||||
} OH_AI_CallBackParam;
|
||||
|
||||
typedef bool (*OH_AI_KernelCallBack)(const OH_AI_TensorHandleArray inputs, const OH_AI_TensorHandleArray outputs,
|
||||
const OH_AI_CallBackParam kernel_Info);
|
||||
|
||||
/**
|
||||
* @brief Create a model object.
|
||||
* @return Model object handle.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API OH_AI_ModelHandle OH_AI_ModelCreate();
|
||||
|
||||
/**
|
||||
* @brief Destroy the model object.
|
||||
* @param model Model object handle address.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API void OH_AI_ModelDestroy(OH_AI_ModelHandle *model);
|
||||
|
||||
/**
|
||||
* @brief Build the model from model file buffer so that it can run on a device.
|
||||
* @param model Model object handle.
|
||||
* @param model_data Define the buffer read from a model file.
|
||||
* @param data_size Define bytes number of model file buffer.
|
||||
* @param model_type Define The type of model file.
|
||||
* @param model_context Define the context used to store options during execution.
|
||||
* @return OH_AI_Status.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API OH_AI_Status OH_AI_ModelBuild(OH_AI_ModelHandle model, const void *model_data, size_t data_size,
|
||||
OH_AI_ModelType model_type, const OH_AI_ContextHandle model_context);
|
||||
|
||||
/**
|
||||
* @brief Load and build the model from model path so that it can run on a device.
|
||||
* @param model Model object handle.
|
||||
* @param model_path Define the model file path.
|
||||
* @param model_type Define The type of model file.
|
||||
* @param model_context Define the context used to store options during execution.
|
||||
* @return OH_AI_Status.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API OH_AI_Status OH_AI_ModelBuildFromFile(OH_AI_ModelHandle model, const char *model_path,
|
||||
OH_AI_ModelType model_type, const OH_AI_ContextHandle model_context);
|
||||
|
||||
/**
|
||||
* @brief Resizes the shapes of inputs.
|
||||
* @param model Model object handle.
|
||||
* @param inputs The array that includes all input tensor handles.
|
||||
* @param shape_infos Defines the new shapes of inputs, should be consistent with inputs.
|
||||
* @param shape_info_num The num of shape_infos.
|
||||
* @return OH_AI_Status.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API OH_AI_Status OH_AI_ModelResize(OH_AI_ModelHandle model, const OH_AI_TensorHandleArray inputs,
|
||||
OH_AI_ShapeInfo *shape_infos, size_t shape_info_num);
|
||||
|
||||
/**
|
||||
* @brief Inference model.
|
||||
* @param model Model object handle.
|
||||
* @param inputs The array that includes all input tensor handles.
|
||||
* @param outputs The array that includes all output tensor handles.
|
||||
* @param before CallBack before predict.
|
||||
* @param after CallBack after predict.
|
||||
* @return OH_AI_Status.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API OH_AI_Status OH_AI_ModelPredict(OH_AI_ModelHandle model, const OH_AI_TensorHandleArray inputs,
|
||||
OH_AI_TensorHandleArray *outputs, const OH_AI_KernelCallBack before,
|
||||
const OH_AI_KernelCallBack after);
|
||||
|
||||
/**
|
||||
* @brief Obtains all input tensor handles of the model.
|
||||
* @param model Model object handle.
|
||||
* @return The array that includes all input tensor handles.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API OH_AI_TensorHandleArray OH_AI_ModelGetInputs(const OH_AI_ModelHandle model);
|
||||
|
||||
/**
|
||||
* @brief Obtains all output tensor handles of the model.
|
||||
* @param model Model object handle.
|
||||
* @return The array that includes all output tensor handles.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API OH_AI_TensorHandleArray OH_AI_ModelGetOutputs(const OH_AI_ModelHandle model);
|
||||
|
||||
/**
|
||||
* @brief Obtains the input tensor handle of the model by name.
|
||||
* @param model Model object handle.
|
||||
* @param tensor_name The name of tensor.
|
||||
* @return The input tensor handle with the given name, if the name is not found, an NULL is returned.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API OH_AI_TensorHandle OH_AI_ModelGetInputByTensorName(const OH_AI_ModelHandle model, const char *tensor_name);
|
||||
|
||||
/**
|
||||
* @brief Obtains the output tensor handle of the model by name.
|
||||
* @param model Model object handle.
|
||||
* @param tensor_name The name of tensor.
|
||||
* @return The output tensor handle with the given name, if the name is not found, an NULL is returned.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API OH_AI_TensorHandle OH_AI_ModelGetOutputByTensorName(const OH_AI_ModelHandle model, const char *tensor_name);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif // MINDSPORE_INCLUDE_C_API_MODEL_C_H
|
@ -1,80 +1,99 @@
|
||||
/**
|
||||
* Copyright 2021 Huawei Technologies 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 MINDSPORE_INCLUDE_C_API_STATUS_C_H
|
||||
#define MINDSPORE_INCLUDE_C_API_STATUS_C_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
enum OH_AI_CompCode {
|
||||
OH_AI_COMPCODE_CORE = 0x00000000u,
|
||||
OH_AI_COMPCODE_MD = 0x10000000u,
|
||||
OH_AI_COMPCODE_ME = 0x20000000u,
|
||||
OH_AI_COMPCODE_MC = 0x30000000u,
|
||||
OH_AI_COMPCODE_LITE = 0xF0000000u,
|
||||
};
|
||||
|
||||
typedef enum OH_AI_Status {
|
||||
OH_AI_STATUS_SUCCESS = 0,
|
||||
// Core
|
||||
OH_AI_STATUS_CORE_FAILED = OH_AI_COMPCODE_CORE | 0x1,
|
||||
|
||||
// Lite // Common error code, range: [-1, -100)
|
||||
OH_AI_STATUS_LITE_ERROR = OH_AI_COMPCODE_LITE | (0x0FFFFFFF & -1), /**< Common error code. */
|
||||
OH_AI_STATUS_LITE_NULLPTR = OH_AI_COMPCODE_LITE | (0x0FFFFFFF & -2), /**< NULL pointer returned.*/
|
||||
OH_AI_STATUS_LITE_PARAM_INVALID = OH_AI_COMPCODE_LITE | (0x0FFFFFFF & -3), /**< Invalid parameter.*/
|
||||
OH_AI_STATUS_LITE_NO_CHANGE = OH_AI_COMPCODE_LITE | (0x0FFFFFFF & -4), /**< No change. */
|
||||
OH_AI_STATUS_LITE_SUCCESS_EXIT = OH_AI_COMPCODE_LITE | (0x0FFFFFFF & -5), /**< No error but exit. */
|
||||
OH_AI_STATUS_LITE_MEMORY_FAILED = OH_AI_COMPCODE_LITE | (0x0FFFFFFF & -6), /**< Fail to create memory. */
|
||||
OH_AI_STATUS_LITE_NOT_SUPPORT = OH_AI_COMPCODE_LITE | (0x0FFFFFFF & -7), /**< Fail to support. */
|
||||
OH_AI_STATUS_LITE_THREADPOOL_ERROR = OH_AI_COMPCODE_LITE | (0x0FFFFFFF & -8), /**< Error occur in thread pool. */
|
||||
OH_AI_STATUS_LITE_UNINITIALIZED_OBJ = OH_AI_COMPCODE_LITE | (0x0FFFFFFF & -9), /**< Object is not initialized. */
|
||||
|
||||
// Executor error code, range: [-100,-200)
|
||||
OH_AI_STATUS_LITE_OUT_OF_TENSOR_RANGE = OH_AI_COMPCODE_LITE | (0x0FFFFFFF & -100), /**< Failed to check range. */
|
||||
OH_AI_STATUS_LITE_INPUT_TENSOR_ERROR =
|
||||
OH_AI_COMPCODE_LITE | (0x0FFFFFFF & -101), /**< Failed to check input tensor. */
|
||||
OH_AI_STATUS_LITE_REENTRANT_ERROR = OH_AI_COMPCODE_LITE | (0x0FFFFFFF & -102), /**< Exist executor running. */
|
||||
|
||||
// Graph error code, range: [-200,-300)
|
||||
OH_AI_STATUS_LITE_GRAPH_FILE_ERROR = OH_AI_COMPCODE_LITE | (0x0FFFFFFF & -200), /**< Failed to verify graph file. */
|
||||
|
||||
// Node error code, range: [-300,-400)
|
||||
OH_AI_STATUS_LITE_NOT_FIND_OP = OH_AI_COMPCODE_LITE | (0x0FFFFFFF & -300), /**< Failed to find operator. */
|
||||
OH_AI_STATUS_LITE_INVALID_OP_NAME = OH_AI_COMPCODE_LITE | (0x0FFFFFFF & -301), /**< Invalid operator name. */
|
||||
OH_AI_STATUS_LITE_INVALID_OP_ATTR = OH_AI_COMPCODE_LITE | (0x0FFFFFFF & -302), /**< Invalid operator attr. */
|
||||
OH_AI_STATUS_LITE_OP_EXECUTE_FAILURE =
|
||||
OH_AI_COMPCODE_LITE | (0x0FFFFFFF & -303), /**< Failed to execution operator. */
|
||||
|
||||
// Tensor error code, range: [-400,-500)
|
||||
OH_AI_STATUS_LITE_FORMAT_ERROR = OH_AI_COMPCODE_LITE | (0x0FFFFFFF & -400), /**< Failed to checking tensor format. */
|
||||
|
||||
// InferShape error code, range: [-500,-600)
|
||||
OH_AI_STATUS_LITE_INFER_ERROR = OH_AI_COMPCODE_LITE | (0x0FFFFFFF & -500), /**< Failed to infer shape. */
|
||||
OH_AI_STATUS_LITE_INFER_INVALID =
|
||||
OH_AI_COMPCODE_LITE | (0x0FFFFFFF & -501), /**< Invalid infer shape before runtime. */
|
||||
|
||||
// User input param error code, range: [-600, 700)
|
||||
OH_AI_STATUS_LITE_INPUT_PARAM_INVALID =
|
||||
OH_AI_COMPCODE_LITE | (0x0FFFFFFF & -600), /**< Invalid input param by user. */
|
||||
} OH_AI_Status;
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif // MINDSPORE_INCLUDE_C_API_STATUS_C_H
|
||||
/**
|
||||
* Copyright 2021 Huawei Technologies 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @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
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
enum OH_AI_CompCode {
|
||||
OH_AI_COMPCODE_CORE = 0x00000000u,
|
||||
OH_AI_COMPCODE_MD = 0x10000000u,
|
||||
OH_AI_COMPCODE_ME = 0x20000000u,
|
||||
OH_AI_COMPCODE_MC = 0x30000000u,
|
||||
OH_AI_COMPCODE_LITE = 0xF0000000u,
|
||||
};
|
||||
|
||||
typedef enum OH_AI_Status {
|
||||
OH_AI_STATUS_SUCCESS = 0,
|
||||
// Core
|
||||
OH_AI_STATUS_CORE_FAILED = OH_AI_COMPCODE_CORE | 0x1,
|
||||
|
||||
// Lite // Common error code, range: [-1, -100)
|
||||
OH_AI_STATUS_LITE_ERROR = OH_AI_COMPCODE_LITE | (0x0FFFFFFF & -1), /**< Common error code. */
|
||||
OH_AI_STATUS_LITE_NULLPTR = OH_AI_COMPCODE_LITE | (0x0FFFFFFF & -2), /**< NULL pointer returned.*/
|
||||
OH_AI_STATUS_LITE_PARAM_INVALID = OH_AI_COMPCODE_LITE | (0x0FFFFFFF & -3), /**< Invalid parameter.*/
|
||||
OH_AI_STATUS_LITE_NO_CHANGE = OH_AI_COMPCODE_LITE | (0x0FFFFFFF & -4), /**< No change. */
|
||||
OH_AI_STATUS_LITE_SUCCESS_EXIT = OH_AI_COMPCODE_LITE | (0x0FFFFFFF & -5), /**< No error but exit. */
|
||||
OH_AI_STATUS_LITE_MEMORY_FAILED = OH_AI_COMPCODE_LITE | (0x0FFFFFFF & -6), /**< Fail to create memory. */
|
||||
OH_AI_STATUS_LITE_NOT_SUPPORT = OH_AI_COMPCODE_LITE | (0x0FFFFFFF & -7), /**< Fail to support. */
|
||||
OH_AI_STATUS_LITE_THREADPOOL_ERROR = OH_AI_COMPCODE_LITE | (0x0FFFFFFF & -8), /**< Error occur in thread pool. */
|
||||
OH_AI_STATUS_LITE_UNINITIALIZED_OBJ = OH_AI_COMPCODE_LITE | (0x0FFFFFFF & -9), /**< Object is not initialized. */
|
||||
|
||||
// Executor error code, range: [-100,-200)
|
||||
OH_AI_STATUS_LITE_OUT_OF_TENSOR_RANGE = OH_AI_COMPCODE_LITE | (0x0FFFFFFF & -100), /**< Failed to check range. */
|
||||
OH_AI_STATUS_LITE_INPUT_TENSOR_ERROR =
|
||||
OH_AI_COMPCODE_LITE | (0x0FFFFFFF & -101), /**< Failed to check input tensor. */
|
||||
OH_AI_STATUS_LITE_REENTRANT_ERROR = OH_AI_COMPCODE_LITE | (0x0FFFFFFF & -102), /**< Exist executor running. */
|
||||
|
||||
// Graph error code, range: [-200,-300)
|
||||
OH_AI_STATUS_LITE_GRAPH_FILE_ERROR = OH_AI_COMPCODE_LITE | (0x0FFFFFFF & -200), /**< Failed to verify graph file. */
|
||||
|
||||
// Node error code, range: [-300,-400)
|
||||
OH_AI_STATUS_LITE_NOT_FIND_OP = OH_AI_COMPCODE_LITE | (0x0FFFFFFF & -300), /**< Failed to find operator. */
|
||||
OH_AI_STATUS_LITE_INVALID_OP_NAME = OH_AI_COMPCODE_LITE | (0x0FFFFFFF & -301), /**< Invalid operator name. */
|
||||
OH_AI_STATUS_LITE_INVALID_OP_ATTR = OH_AI_COMPCODE_LITE | (0x0FFFFFFF & -302), /**< Invalid operator attr. */
|
||||
OH_AI_STATUS_LITE_OP_EXECUTE_FAILURE =
|
||||
OH_AI_COMPCODE_LITE | (0x0FFFFFFF & -303), /**< Failed to execution operator. */
|
||||
|
||||
// Tensor error code, range: [-400,-500)
|
||||
OH_AI_STATUS_LITE_FORMAT_ERROR = OH_AI_COMPCODE_LITE | (0x0FFFFFFF & -400), /**< Failed to checking tensor format. */
|
||||
|
||||
// InferShape error code, range: [-500,-600)
|
||||
OH_AI_STATUS_LITE_INFER_ERROR = OH_AI_COMPCODE_LITE | (0x0FFFFFFF & -500), /**< Failed to infer shape. */
|
||||
OH_AI_STATUS_LITE_INFER_INVALID =
|
||||
OH_AI_COMPCODE_LITE | (0x0FFFFFFF & -501), /**< Invalid infer shape before runtime. */
|
||||
|
||||
// User input param error code, range: [-600, 700)
|
||||
OH_AI_STATUS_LITE_INPUT_PARAM_INVALID =
|
||||
OH_AI_COMPCODE_LITE | (0x0FFFFFFF & -600), /**< Invalid input param by user. */
|
||||
} OH_AI_Status;
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif // MINDSPORE_INCLUDE_C_API_STATUS_C_H
|
@ -1,185 +1,204 @@
|
||||
/**
|
||||
* Copyright 2021 Huawei Technologies 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 MINDSPORE_INCLUDE_C_API_TENSOE_C_H
|
||||
#define MINDSPORE_INCLUDE_C_API_TENSOE_C_H
|
||||
|
||||
#include <stddef.h>
|
||||
#include "mindspore/status.h"
|
||||
#include "mindspore/types.h"
|
||||
#include "mindspore/data_type.h"
|
||||
#include "mindspore/format.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef void *OH_AI_TensorHandle;
|
||||
|
||||
/**
|
||||
* @brief Create a tensor object.
|
||||
* @param name The name of the tensor.
|
||||
* @param type The data type of the tensor.
|
||||
* @param shape The shape of the tensor.
|
||||
* @param shape_num The num of the shape.
|
||||
* @param data The data pointer that points to allocated memory.
|
||||
* @param data_len The length of the memory, in bytes.
|
||||
* @return Tensor object handle.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API OH_AI_TensorHandle OH_AI_TensorCreate(const char *name, OH_AI_DataType type, const int64_t *shape,
|
||||
size_t shape_num, const void *data, size_t data_len);
|
||||
|
||||
/**
|
||||
* @brief Destroy the tensor object.
|
||||
* @param tensor Tensor object handle address.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API void OH_AI_TensorDestroy(OH_AI_TensorHandle *tensor);
|
||||
|
||||
/**
|
||||
* @brief Obtain a deep copy of the tensor.
|
||||
* @param tensor Tensor object handle.
|
||||
* @return Tensor object handle.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API OH_AI_TensorHandle OH_AI_TensorClone(OH_AI_TensorHandle tensor);
|
||||
|
||||
/**
|
||||
* @brief Set the name for the tensor.
|
||||
* @param tensor Tensor object handle.
|
||||
* @param name The name of the tensor.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API void OH_AI_TensorSetName(OH_AI_TensorHandle tensor, const char *name);
|
||||
|
||||
/**
|
||||
* @brief Obtain the name of the tensor.
|
||||
* @param tensor Tensor object handle.
|
||||
* @return The name of the tensor.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API const char *OH_AI_TensorGetName(const OH_AI_TensorHandle tensor);
|
||||
|
||||
/**
|
||||
* @brief Set the data type for the tensor.
|
||||
* @param tensor Tensor object handle.
|
||||
* @param type The data type of the tensor.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API void OH_AI_TensorSetDataType(OH_AI_TensorHandle tensor, OH_AI_DataType type);
|
||||
|
||||
/**
|
||||
* @brief Obtain the data type of the tensor.
|
||||
* @param tensor Tensor object handle.
|
||||
* @return The date type of the tensor.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API OH_AI_DataType OH_AI_TensorGetDataType(const OH_AI_TensorHandle tensor);
|
||||
|
||||
/**
|
||||
* @brief Set the shape for the tensor.
|
||||
* @param tensor Tensor object handle.
|
||||
* @param shape The shape array.
|
||||
* @param shape_num Dimension of shape.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API void OH_AI_TensorSetShape(OH_AI_TensorHandle tensor, const int64_t *shape, size_t shape_num);
|
||||
|
||||
/**
|
||||
* @brief Obtain the shape of the tensor.
|
||||
* @param tensor Tensor object handle.
|
||||
* @param shape_num Dimension of shape.
|
||||
* @return The shape array of the tensor.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API const int64_t *OH_AI_TensorGetShape(const OH_AI_TensorHandle tensor, size_t *shape_num);
|
||||
|
||||
/**
|
||||
* @brief Set the format for the tensor.
|
||||
* @param tensor Tensor object handle.
|
||||
* @param format The format of the tensor.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API void OH_AI_TensorSetFormat(OH_AI_TensorHandle tensor, OH_AI_Format format);
|
||||
|
||||
/**
|
||||
* @brief Obtain the format of the tensor.
|
||||
* @param tensor Tensor object handle.
|
||||
* @return The format of the tensor.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API OH_AI_Format OH_AI_TensorGetFormat(const OH_AI_TensorHandle tensor);
|
||||
|
||||
/**
|
||||
* @brief Obtain the data for the tensor.
|
||||
* @param tensor Tensor object handle.
|
||||
* @param data A pointer to the data of the tensor.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API void OH_AI_TensorSetData(OH_AI_TensorHandle tensor, void *data);
|
||||
|
||||
/**
|
||||
* @brief Obtain the data pointer of the tensor.
|
||||
* @param tensor Tensor object handle.
|
||||
* @return The data pointer of the tensor.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API const void *OH_AI_TensorGetData(const OH_AI_TensorHandle tensor);
|
||||
|
||||
/**
|
||||
* @brief Obtain the mutable data pointer of the tensor. If the internal data is empty, it will allocate memory.
|
||||
* @param tensor Tensor object handle.
|
||||
* @return The data pointer of the tensor.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API void *OH_AI_TensorGetMutableData(const OH_AI_TensorHandle tensor);
|
||||
|
||||
/**
|
||||
* @brief Obtain the element number of the tensor.
|
||||
* @param tensor Tensor object handle.
|
||||
* @return The element number of the tensor.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API int64_t OH_AI_TensorGetElementNum(const OH_AI_TensorHandle tensor);
|
||||
|
||||
/**
|
||||
* @brief Obtain the data size fo the tensor.
|
||||
* @param tensor Tensor object handle.
|
||||
* @return The data size of the tensor.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API size_t OH_AI_TensorGetDataSize(const OH_AI_TensorHandle tensor);
|
||||
|
||||
/**
|
||||
* @brief Set the data for the tensor with user-allocated data buffer.
|
||||
*
|
||||
* The main purpose of this interface is providing a way of using memory already allocated by user as the Model's
|
||||
* input, but not which allocated inside the Model object. It can reduce one copy. \n
|
||||
* Note: The tensor won't free the data provided by invoker. Invoker has the responsibility to free it. And this
|
||||
* free action should not be preformed before destruction of the tensor. \n
|
||||
*
|
||||
* @param tensor Tensor object handle.
|
||||
* @param data A pointer to the user data buffer.
|
||||
* @param data the byte size of the user data buffer.
|
||||
* @return OH_AI_STATUS_SUCCESS if success, or detail error code if failed.
|
||||
* @since 10
|
||||
*/
|
||||
OH_AI_API OH_AI_Status OH_AI_TensorSetUserData(OH_AI_TensorHandle tensor, void *data, size_t data_size);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif // MINDSPORE_INCLUDE_C_API_TENSOE_C_H
|
||||
/**
|
||||
* Copyright 2021 Huawei Technologies 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @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
|
||||
|
||||
#include <stddef.h>
|
||||
#include "mindspore/status.h"
|
||||
#include "mindspore/types.h"
|
||||
#include "mindspore/data_type.h"
|
||||
#include "mindspore/format.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef void *OH_AI_TensorHandle;
|
||||
|
||||
/**
|
||||
* @brief Create a tensor object.
|
||||
* @param name The name of the tensor.
|
||||
* @param type The data type of the tensor.
|
||||
* @param shape The shape of the tensor.
|
||||
* @param shape_num The num of the shape.
|
||||
* @param data The data pointer that points to allocated memory.
|
||||
* @param data_len The length of the memory, in bytes.
|
||||
* @return Tensor object handle.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API OH_AI_TensorHandle OH_AI_TensorCreate(const char *name, OH_AI_DataType type, const int64_t *shape,
|
||||
size_t shape_num, const void *data, size_t data_len);
|
||||
|
||||
/**
|
||||
* @brief Destroy the tensor object.
|
||||
* @param tensor Tensor object handle address.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API void OH_AI_TensorDestroy(OH_AI_TensorHandle *tensor);
|
||||
|
||||
/**
|
||||
* @brief Obtain a deep copy of the tensor.
|
||||
* @param tensor Tensor object handle.
|
||||
* @return Tensor object handle.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API OH_AI_TensorHandle OH_AI_TensorClone(OH_AI_TensorHandle tensor);
|
||||
|
||||
/**
|
||||
* @brief Set the name for the tensor.
|
||||
* @param tensor Tensor object handle.
|
||||
* @param name The name of the tensor.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API void OH_AI_TensorSetName(OH_AI_TensorHandle tensor, const char *name);
|
||||
|
||||
/**
|
||||
* @brief Obtain the name of the tensor.
|
||||
* @param tensor Tensor object handle.
|
||||
* @return The name of the tensor.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API const char *OH_AI_TensorGetName(const OH_AI_TensorHandle tensor);
|
||||
|
||||
/**
|
||||
* @brief Set the data type for the tensor.
|
||||
* @param tensor Tensor object handle.
|
||||
* @param type The data type of the tensor.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API void OH_AI_TensorSetDataType(OH_AI_TensorHandle tensor, OH_AI_DataType type);
|
||||
|
||||
/**
|
||||
* @brief Obtain the data type of the tensor.
|
||||
* @param tensor Tensor object handle.
|
||||
* @return The date type of the tensor.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API OH_AI_DataType OH_AI_TensorGetDataType(const OH_AI_TensorHandle tensor);
|
||||
|
||||
/**
|
||||
* @brief Set the shape for the tensor.
|
||||
* @param tensor Tensor object handle.
|
||||
* @param shape The shape array.
|
||||
* @param shape_num Dimension of shape.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API void OH_AI_TensorSetShape(OH_AI_TensorHandle tensor, const int64_t *shape, size_t shape_num);
|
||||
|
||||
/**
|
||||
* @brief Obtain the shape of the tensor.
|
||||
* @param tensor Tensor object handle.
|
||||
* @param shape_num Dimension of shape.
|
||||
* @return The shape array of the tensor.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API const int64_t *OH_AI_TensorGetShape(const OH_AI_TensorHandle tensor, size_t *shape_num);
|
||||
|
||||
/**
|
||||
* @brief Set the format for the tensor.
|
||||
* @param tensor Tensor object handle.
|
||||
* @param format The format of the tensor.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API void OH_AI_TensorSetFormat(OH_AI_TensorHandle tensor, OH_AI_Format format);
|
||||
|
||||
/**
|
||||
* @brief Obtain the format of the tensor.
|
||||
* @param tensor Tensor object handle.
|
||||
* @return The format of the tensor.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API OH_AI_Format OH_AI_TensorGetFormat(const OH_AI_TensorHandle tensor);
|
||||
|
||||
/**
|
||||
* @brief Obtain the data for the tensor.
|
||||
* @param tensor Tensor object handle.
|
||||
* @param data A pointer to the data of the tensor.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API void OH_AI_TensorSetData(OH_AI_TensorHandle tensor, void *data);
|
||||
|
||||
/**
|
||||
* @brief Obtain the data pointer of the tensor.
|
||||
* @param tensor Tensor object handle.
|
||||
* @return The data pointer of the tensor.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API const void *OH_AI_TensorGetData(const OH_AI_TensorHandle tensor);
|
||||
|
||||
/**
|
||||
* @brief Obtain the mutable data pointer of the tensor. If the internal data is empty, it will allocate memory.
|
||||
* @param tensor Tensor object handle.
|
||||
* @return The data pointer of the tensor.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API void *OH_AI_TensorGetMutableData(const OH_AI_TensorHandle tensor);
|
||||
|
||||
/**
|
||||
* @brief Obtain the element number of the tensor.
|
||||
* @param tensor Tensor object handle.
|
||||
* @return The element number of the tensor.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API int64_t OH_AI_TensorGetElementNum(const OH_AI_TensorHandle tensor);
|
||||
|
||||
/**
|
||||
* @brief Obtain the data size fo the tensor.
|
||||
* @param tensor Tensor object handle.
|
||||
* @return The data size of the tensor.
|
||||
* @since 9
|
||||
*/
|
||||
OH_AI_API size_t OH_AI_TensorGetDataSize(const OH_AI_TensorHandle tensor);
|
||||
|
||||
/**
|
||||
* @brief Set the data for the tensor with user-allocated data buffer.
|
||||
*
|
||||
* The main purpose of this interface is providing a way of using memory already allocated by user as the Model's
|
||||
* input, but not which allocated inside the Model object. It can reduce one copy. \n
|
||||
* Note: The tensor won't free the data provided by invoker. Invoker has the responsibility to free it. And this
|
||||
* free action should not be preformed before destruction of the tensor. \n
|
||||
*
|
||||
* @param tensor Tensor object handle.
|
||||
* @param data A pointer to the user data buffer.
|
||||
* @param data the byte size of the user data buffer.
|
||||
* @return OH_AI_STATUS_SUCCESS if success, or detail error code if failed.
|
||||
* @since 10
|
||||
*/
|
||||
OH_AI_API OH_AI_Status OH_AI_TensorSetUserData(OH_AI_TensorHandle tensor, void *data, size_t data_size);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif // MINDSPORE_INCLUDE_C_API_TENSOE_C_H
|
@ -1,86 +1,105 @@
|
||||
/**
|
||||
* Copyright 2021 Huawei Technologies 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 MINDSPORE_INCLUDE_C_API_TYPES_C_H
|
||||
#define MINDSPORE_INCLUDE_C_API_TYPES_C_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef OH_AI_API
|
||||
#ifdef _WIN32
|
||||
#define OH_AI_API __declspec(dllexport)
|
||||
#else
|
||||
#define OH_AI_API __attribute__((visibility("default")))
|
||||
#endif
|
||||
#endif
|
||||
|
||||
typedef enum OH_AI_ModelType {
|
||||
OH_AI_MODELTYPE_MINDIR = 0,
|
||||
// insert new data type here
|
||||
OH_AI_MODELTYPE_INVALID = 0xFFFFFFFF
|
||||
} OH_AI_ModelType;
|
||||
|
||||
typedef enum OH_AI_DeviceType {
|
||||
OH_AI_DEVICETYPE_CPU = 0,
|
||||
OH_AI_DEVICETYPE_GPU,
|
||||
OH_AI_DEVICETYPE_KIRIN_NPU,
|
||||
// add new type here
|
||||
// ohos-only device range: [60, 80)
|
||||
OH_AI_DEVICETYPE_NNRT = 60,
|
||||
OH_AI_DEVICETYPE_INVALID = 100,
|
||||
} OH_AI_DeviceType;
|
||||
|
||||
typedef enum OH_AI_NNRTDeviceType {
|
||||
/** Devices that are not CPU, GPU, or dedicated accelerator */
|
||||
OH_AI_NNRTDEVICE_OTHERS = 0,
|
||||
/** CPU device */
|
||||
OH_AI_NNRTDEVICE_CPU = 1,
|
||||
/** GPU device */
|
||||
OH_AI_NNRTDEVICE_GPU = 2,
|
||||
/** Dedicated hardware accelerator */
|
||||
OH_AI_NNRTDEVICE_ACCELERATOR = 3,
|
||||
} OH_AI_NNRTDeviceType;
|
||||
|
||||
typedef enum OH_AI_PerformanceMode {
|
||||
/** No performance mode preference */
|
||||
OH_AI_PERFORMANCE_NONE = 0,
|
||||
/** Low power consumption mode*/
|
||||
OH_AI_PERFORMANCE_LOW = 1,
|
||||
/** Medium performance mode */
|
||||
OH_AI_PERFORMANCE_MEDIUM = 2,
|
||||
/** High performance mode */
|
||||
OH_AI_PERFORMANCE_HIGH = 3,
|
||||
/** Ultimate performance mode */
|
||||
OH_AI_PERFORMANCE_EXTREME = 4
|
||||
} OH_AI_PerformanceMode;
|
||||
|
||||
typedef enum OH_AI_Priority {
|
||||
/** No priority preference */
|
||||
OH_AI_PRIORITY_NONE = 0,
|
||||
/** Low priority */
|
||||
OH_AI_PRIORITY_LOW = 1,
|
||||
/** Medium priority */
|
||||
OH_AI_PRIORITY_MEDIUM = 2,
|
||||
/** High priority */
|
||||
OH_AI_PRIORITY_HIGH = 3
|
||||
} OH_AI_Priority;
|
||||
|
||||
typedef struct NNRTDeviceDesc NNRTDeviceDesc;
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif // MINDSPORE_INCLUDE_C_API_TYPES_C_H
|
||||
/**
|
||||
* Copyright 2021 Huawei Technologies 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @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
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef OH_AI_API
|
||||
#ifdef _WIN32
|
||||
#define OH_AI_API __declspec(dllexport)
|
||||
#else
|
||||
#define OH_AI_API __attribute__((visibility("default")))
|
||||
#endif
|
||||
#endif
|
||||
|
||||
typedef enum OH_AI_ModelType {
|
||||
OH_AI_MODELTYPE_MINDIR = 0,
|
||||
// insert new data type here
|
||||
OH_AI_MODELTYPE_INVALID = 0xFFFFFFFF
|
||||
} OH_AI_ModelType;
|
||||
|
||||
typedef enum OH_AI_DeviceType {
|
||||
OH_AI_DEVICETYPE_CPU = 0,
|
||||
OH_AI_DEVICETYPE_GPU,
|
||||
OH_AI_DEVICETYPE_KIRIN_NPU,
|
||||
// add new type here
|
||||
// ohos-only device range: [60, 80)
|
||||
OH_AI_DEVICETYPE_NNRT = 60,
|
||||
OH_AI_DEVICETYPE_INVALID = 100,
|
||||
} OH_AI_DeviceType;
|
||||
|
||||
typedef enum OH_AI_NNRTDeviceType {
|
||||
/** Devices that are not CPU, GPU, or dedicated accelerator */
|
||||
OH_AI_NNRTDEVICE_OTHERS = 0,
|
||||
/** CPU device */
|
||||
OH_AI_NNRTDEVICE_CPU = 1,
|
||||
/** GPU device */
|
||||
OH_AI_NNRTDEVICE_GPU = 2,
|
||||
/** Dedicated hardware accelerator */
|
||||
OH_AI_NNRTDEVICE_ACCELERATOR = 3,
|
||||
} OH_AI_NNRTDeviceType;
|
||||
|
||||
typedef enum OH_AI_PerformanceMode {
|
||||
/** No performance mode preference */
|
||||
OH_AI_PERFORMANCE_NONE = 0,
|
||||
/** Low power consumption mode*/
|
||||
OH_AI_PERFORMANCE_LOW = 1,
|
||||
/** Medium performance mode */
|
||||
OH_AI_PERFORMANCE_MEDIUM = 2,
|
||||
/** High performance mode */
|
||||
OH_AI_PERFORMANCE_HIGH = 3,
|
||||
/** Ultimate performance mode */
|
||||
OH_AI_PERFORMANCE_EXTREME = 4
|
||||
} OH_AI_PerformanceMode;
|
||||
|
||||
typedef enum OH_AI_Priority {
|
||||
/** No priority preference */
|
||||
OH_AI_PRIORITY_NONE = 0,
|
||||
/** Low priority */
|
||||
OH_AI_PRIORITY_LOW = 1,
|
||||
/** Medium priority */
|
||||
OH_AI_PRIORITY_MEDIUM = 2,
|
||||
/** High priority */
|
||||
OH_AI_PRIORITY_HIGH = 3
|
||||
} OH_AI_Priority;
|
||||
|
||||
typedef struct NNRTDeviceDesc NNRTDeviceDesc;
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif // MINDSPORE_INCLUDE_C_API_TYPES_C_H
|
4
third_party/musl/ndk_musl_include/aio.h
vendored
4
third_party/musl/ndk_musl_include/aio.h
vendored
@ -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
|
||||
|
15
third_party/musl/ndk_musl_include/langinfo.h
vendored
15
third_party/musl/ndk_musl_include/langinfo.h
vendored
@ -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
|
||||
|
||||
|
12
third_party/musl/ndk_musl_include/malloc.h
vendored
12
third_party/musl/ndk_musl_include/malloc.h
vendored
@ -9,16 +9,22 @@ extern "C" {
|
||||
|
||||
#include <bits/alltypes.h>
|
||||
|
||||
#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);
|
||||
|
5
third_party/musl/ndk_musl_include/mqueue.h
vendored
5
third_party/musl/ndk_musl_include/mqueue.h
vendored
@ -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
|
||||
|
15
third_party/musl/ndk_musl_include/pthread.h
vendored
15
third_party/musl/ndk_musl_include/pthread.h
vendored
@ -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
|
||||
|
15
third_party/musl/ndk_musl_include/sys/reboot.h
vendored
15
third_party/musl/ndk_musl_include/sys/reboot.h
vendored
@ -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
|
||||
|
656
third_party/openGLES/GLES2/gl2.h
vendored
Normal file
656
third_party/openGLES/GLES2/gl2.h
vendored
Normal file
@ -0,0 +1,656 @@
|
||||
#ifndef __gles2_gl2_h_
|
||||
#define __gles2_gl2_h_ 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Copyright 2013-2020 The Khronos Group Inc.
|
||||
** SPDX-License-Identifier: MIT
|
||||
**
|
||||
** This header is generated from the Khronos OpenGL / OpenGL ES XML
|
||||
** API Registry. The current version of the Registry, generator scripts
|
||||
** used to make the header, and the header can be found at
|
||||
** https://github.com/KhronosGroup/OpenGL-Registry
|
||||
*/
|
||||
|
||||
#include <GLES2/gl2platform.h>
|
||||
|
||||
#ifndef GL_APIENTRYP
|
||||
#define GL_APIENTRYP GL_APIENTRY*
|
||||
#endif
|
||||
|
||||
#ifndef GL_GLES_PROTOTYPES
|
||||
#define GL_GLES_PROTOTYPES 1
|
||||
#endif
|
||||
|
||||
/* Generated on date 20230220 */
|
||||
|
||||
/* Generated C header for:
|
||||
* API: gles2
|
||||
* Profile: common
|
||||
* Versions considered: 2\.[0-9]
|
||||
* Versions emitted: .*
|
||||
* Default extensions included: None
|
||||
* Additional extensions included: _nomatch_^
|
||||
* Extensions removed: _nomatch_^
|
||||
*/
|
||||
|
||||
#ifndef GL_ES_VERSION_2_0
|
||||
#define GL_ES_VERSION_2_0 1
|
||||
#include <KHR/khrplatform.h>
|
||||
typedef khronos_int8_t GLbyte;
|
||||
typedef khronos_float_t GLclampf;
|
||||
typedef khronos_int32_t GLfixed;
|
||||
typedef khronos_int16_t GLshort;
|
||||
typedef khronos_uint16_t GLushort;
|
||||
typedef void GLvoid;
|
||||
typedef struct __GLsync *GLsync;
|
||||
typedef khronos_int64_t GLint64;
|
||||
typedef khronos_uint64_t GLuint64;
|
||||
typedef unsigned int GLenum;
|
||||
typedef unsigned int GLuint;
|
||||
typedef char GLchar;
|
||||
typedef khronos_float_t GLfloat;
|
||||
typedef khronos_ssize_t GLsizeiptr;
|
||||
typedef khronos_intptr_t GLintptr;
|
||||
typedef unsigned int GLbitfield;
|
||||
typedef int GLint;
|
||||
typedef unsigned char GLboolean;
|
||||
typedef int GLsizei;
|
||||
typedef khronos_uint8_t GLubyte;
|
||||
#define GL_DEPTH_BUFFER_BIT 0x00000100
|
||||
#define GL_STENCIL_BUFFER_BIT 0x00000400
|
||||
#define GL_COLOR_BUFFER_BIT 0x00004000
|
||||
#define GL_FALSE 0
|
||||
#define GL_TRUE 1
|
||||
#define GL_POINTS 0x0000
|
||||
#define GL_LINES 0x0001
|
||||
#define GL_LINE_LOOP 0x0002
|
||||
#define GL_LINE_STRIP 0x0003
|
||||
#define GL_TRIANGLES 0x0004
|
||||
#define GL_TRIANGLE_STRIP 0x0005
|
||||
#define GL_TRIANGLE_FAN 0x0006
|
||||
#define GL_ZERO 0
|
||||
#define GL_ONE 1
|
||||
#define GL_SRC_COLOR 0x0300
|
||||
#define GL_ONE_MINUS_SRC_COLOR 0x0301
|
||||
#define GL_SRC_ALPHA 0x0302
|
||||
#define GL_ONE_MINUS_SRC_ALPHA 0x0303
|
||||
#define GL_DST_ALPHA 0x0304
|
||||
#define GL_ONE_MINUS_DST_ALPHA 0x0305
|
||||
#define GL_DST_COLOR 0x0306
|
||||
#define GL_ONE_MINUS_DST_COLOR 0x0307
|
||||
#define GL_SRC_ALPHA_SATURATE 0x0308
|
||||
#define GL_FUNC_ADD 0x8006
|
||||
#define GL_BLEND_EQUATION 0x8009
|
||||
#define GL_BLEND_EQUATION_RGB 0x8009
|
||||
#define GL_BLEND_EQUATION_ALPHA 0x883D
|
||||
#define GL_FUNC_SUBTRACT 0x800A
|
||||
#define GL_FUNC_REVERSE_SUBTRACT 0x800B
|
||||
#define GL_BLEND_DST_RGB 0x80C8
|
||||
#define GL_BLEND_SRC_RGB 0x80C9
|
||||
#define GL_BLEND_DST_ALPHA 0x80CA
|
||||
#define GL_BLEND_SRC_ALPHA 0x80CB
|
||||
#define GL_CONSTANT_COLOR 0x8001
|
||||
#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
|
||||
#define GL_CONSTANT_ALPHA 0x8003
|
||||
#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
|
||||
#define GL_BLEND_COLOR 0x8005
|
||||
#define GL_ARRAY_BUFFER 0x8892
|
||||
#define GL_ELEMENT_ARRAY_BUFFER 0x8893
|
||||
#define GL_ARRAY_BUFFER_BINDING 0x8894
|
||||
#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895
|
||||
#define GL_STREAM_DRAW 0x88E0
|
||||
#define GL_STATIC_DRAW 0x88E4
|
||||
#define GL_DYNAMIC_DRAW 0x88E8
|
||||
#define GL_BUFFER_SIZE 0x8764
|
||||
#define GL_BUFFER_USAGE 0x8765
|
||||
#define GL_CURRENT_VERTEX_ATTRIB 0x8626
|
||||
#define GL_FRONT 0x0404
|
||||
#define GL_BACK 0x0405
|
||||
#define GL_FRONT_AND_BACK 0x0408
|
||||
#define GL_TEXTURE_2D 0x0DE1
|
||||
#define GL_CULL_FACE 0x0B44
|
||||
#define GL_BLEND 0x0BE2
|
||||
#define GL_DITHER 0x0BD0
|
||||
#define GL_STENCIL_TEST 0x0B90
|
||||
#define GL_DEPTH_TEST 0x0B71
|
||||
#define GL_SCISSOR_TEST 0x0C11
|
||||
#define GL_POLYGON_OFFSET_FILL 0x8037
|
||||
#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
|
||||
#define GL_SAMPLE_COVERAGE 0x80A0
|
||||
#define GL_NO_ERROR 0
|
||||
#define GL_INVALID_ENUM 0x0500
|
||||
#define GL_INVALID_VALUE 0x0501
|
||||
#define GL_INVALID_OPERATION 0x0502
|
||||
#define GL_OUT_OF_MEMORY 0x0505
|
||||
#define GL_CW 0x0900
|
||||
#define GL_CCW 0x0901
|
||||
#define GL_LINE_WIDTH 0x0B21
|
||||
#define GL_ALIASED_POINT_SIZE_RANGE 0x846D
|
||||
#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
|
||||
#define GL_CULL_FACE_MODE 0x0B45
|
||||
#define GL_FRONT_FACE 0x0B46
|
||||
#define GL_DEPTH_RANGE 0x0B70
|
||||
#define GL_DEPTH_WRITEMASK 0x0B72
|
||||
#define GL_DEPTH_CLEAR_VALUE 0x0B73
|
||||
#define GL_DEPTH_FUNC 0x0B74
|
||||
#define GL_STENCIL_CLEAR_VALUE 0x0B91
|
||||
#define GL_STENCIL_FUNC 0x0B92
|
||||
#define GL_STENCIL_FAIL 0x0B94
|
||||
#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95
|
||||
#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96
|
||||
#define GL_STENCIL_REF 0x0B97
|
||||
#define GL_STENCIL_VALUE_MASK 0x0B93
|
||||
#define GL_STENCIL_WRITEMASK 0x0B98
|
||||
#define GL_STENCIL_BACK_FUNC 0x8800
|
||||
#define GL_STENCIL_BACK_FAIL 0x8801
|
||||
#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802
|
||||
#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803
|
||||
#define GL_STENCIL_BACK_REF 0x8CA3
|
||||
#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4
|
||||
#define GL_STENCIL_BACK_WRITEMASK 0x8CA5
|
||||
#define GL_VIEWPORT 0x0BA2
|
||||
#define GL_SCISSOR_BOX 0x0C10
|
||||
#define GL_COLOR_CLEAR_VALUE 0x0C22
|
||||
#define GL_COLOR_WRITEMASK 0x0C23
|
||||
#define GL_UNPACK_ALIGNMENT 0x0CF5
|
||||
#define GL_PACK_ALIGNMENT 0x0D05
|
||||
#define GL_MAX_TEXTURE_SIZE 0x0D33
|
||||
#define GL_MAX_VIEWPORT_DIMS 0x0D3A
|
||||
#define GL_SUBPIXEL_BITS 0x0D50
|
||||
#define GL_RED_BITS 0x0D52
|
||||
#define GL_GREEN_BITS 0x0D53
|
||||
#define GL_BLUE_BITS 0x0D54
|
||||
#define GL_ALPHA_BITS 0x0D55
|
||||
#define GL_DEPTH_BITS 0x0D56
|
||||
#define GL_STENCIL_BITS 0x0D57
|
||||
#define GL_POLYGON_OFFSET_UNITS 0x2A00
|
||||
#define GL_POLYGON_OFFSET_FACTOR 0x8038
|
||||
#define GL_TEXTURE_BINDING_2D 0x8069
|
||||
#define GL_SAMPLE_BUFFERS 0x80A8
|
||||
#define GL_SAMPLES 0x80A9
|
||||
#define GL_SAMPLE_COVERAGE_VALUE 0x80AA
|
||||
#define GL_SAMPLE_COVERAGE_INVERT 0x80AB
|
||||
#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
|
||||
#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
|
||||
#define GL_DONT_CARE 0x1100
|
||||
#define GL_FASTEST 0x1101
|
||||
#define GL_NICEST 0x1102
|
||||
#define GL_GENERATE_MIPMAP_HINT 0x8192
|
||||
#define GL_BYTE 0x1400
|
||||
#define GL_UNSIGNED_BYTE 0x1401
|
||||
#define GL_SHORT 0x1402
|
||||
#define GL_UNSIGNED_SHORT 0x1403
|
||||
#define GL_INT 0x1404
|
||||
#define GL_UNSIGNED_INT 0x1405
|
||||
#define GL_FLOAT 0x1406
|
||||
#define GL_FIXED 0x140C
|
||||
#define GL_DEPTH_COMPONENT 0x1902
|
||||
#define GL_ALPHA 0x1906
|
||||
#define GL_RGB 0x1907
|
||||
#define GL_RGBA 0x1908
|
||||
#define GL_LUMINANCE 0x1909
|
||||
#define GL_LUMINANCE_ALPHA 0x190A
|
||||
#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
|
||||
#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
|
||||
#define GL_UNSIGNED_SHORT_5_6_5 0x8363
|
||||
#define GL_FRAGMENT_SHADER 0x8B30
|
||||
#define GL_VERTEX_SHADER 0x8B31
|
||||
#define GL_MAX_VERTEX_ATTRIBS 0x8869
|
||||
#define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB
|
||||
#define GL_MAX_VARYING_VECTORS 0x8DFC
|
||||
#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D
|
||||
#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C
|
||||
#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872
|
||||
#define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD
|
||||
#define GL_SHADER_TYPE 0x8B4F
|
||||
#define GL_DELETE_STATUS 0x8B80
|
||||
#define GL_LINK_STATUS 0x8B82
|
||||
#define GL_VALIDATE_STATUS 0x8B83
|
||||
#define GL_ATTACHED_SHADERS 0x8B85
|
||||
#define GL_ACTIVE_UNIFORMS 0x8B86
|
||||
#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87
|
||||
#define GL_ACTIVE_ATTRIBUTES 0x8B89
|
||||
#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A
|
||||
#define GL_SHADING_LANGUAGE_VERSION 0x8B8C
|
||||
#define GL_CURRENT_PROGRAM 0x8B8D
|
||||
#define GL_NEVER 0x0200
|
||||
#define GL_LESS 0x0201
|
||||
#define GL_EQUAL 0x0202
|
||||
#define GL_LEQUAL 0x0203
|
||||
#define GL_GREATER 0x0204
|
||||
#define GL_NOTEQUAL 0x0205
|
||||
#define GL_GEQUAL 0x0206
|
||||
#define GL_ALWAYS 0x0207
|
||||
#define GL_KEEP 0x1E00
|
||||
#define GL_REPLACE 0x1E01
|
||||
#define GL_INCR 0x1E02
|
||||
#define GL_DECR 0x1E03
|
||||
#define GL_INVERT 0x150A
|
||||
#define GL_INCR_WRAP 0x8507
|
||||
#define GL_DECR_WRAP 0x8508
|
||||
#define GL_VENDOR 0x1F00
|
||||
#define GL_RENDERER 0x1F01
|
||||
#define GL_VERSION 0x1F02
|
||||
#define GL_EXTENSIONS 0x1F03
|
||||
#define GL_NEAREST 0x2600
|
||||
#define GL_LINEAR 0x2601
|
||||
#define GL_NEAREST_MIPMAP_NEAREST 0x2700
|
||||
#define GL_LINEAR_MIPMAP_NEAREST 0x2701
|
||||
#define GL_NEAREST_MIPMAP_LINEAR 0x2702
|
||||
#define GL_LINEAR_MIPMAP_LINEAR 0x2703
|
||||
#define GL_TEXTURE_MAG_FILTER 0x2800
|
||||
#define GL_TEXTURE_MIN_FILTER 0x2801
|
||||
#define GL_TEXTURE_WRAP_S 0x2802
|
||||
#define GL_TEXTURE_WRAP_T 0x2803
|
||||
#define GL_TEXTURE 0x1702
|
||||
#define GL_TEXTURE_CUBE_MAP 0x8513
|
||||
#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514
|
||||
#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515
|
||||
#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516
|
||||
#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517
|
||||
#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518
|
||||
#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519
|
||||
#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A
|
||||
#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C
|
||||
#define GL_TEXTURE0 0x84C0
|
||||
#define GL_TEXTURE1 0x84C1
|
||||
#define GL_TEXTURE2 0x84C2
|
||||
#define GL_TEXTURE3 0x84C3
|
||||
#define GL_TEXTURE4 0x84C4
|
||||
#define GL_TEXTURE5 0x84C5
|
||||
#define GL_TEXTURE6 0x84C6
|
||||
#define GL_TEXTURE7 0x84C7
|
||||
#define GL_TEXTURE8 0x84C8
|
||||
#define GL_TEXTURE9 0x84C9
|
||||
#define GL_TEXTURE10 0x84CA
|
||||
#define GL_TEXTURE11 0x84CB
|
||||
#define GL_TEXTURE12 0x84CC
|
||||
#define GL_TEXTURE13 0x84CD
|
||||
#define GL_TEXTURE14 0x84CE
|
||||
#define GL_TEXTURE15 0x84CF
|
||||
#define GL_TEXTURE16 0x84D0
|
||||
#define GL_TEXTURE17 0x84D1
|
||||
#define GL_TEXTURE18 0x84D2
|
||||
#define GL_TEXTURE19 0x84D3
|
||||
#define GL_TEXTURE20 0x84D4
|
||||
#define GL_TEXTURE21 0x84D5
|
||||
#define GL_TEXTURE22 0x84D6
|
||||
#define GL_TEXTURE23 0x84D7
|
||||
#define GL_TEXTURE24 0x84D8
|
||||
#define GL_TEXTURE25 0x84D9
|
||||
#define GL_TEXTURE26 0x84DA
|
||||
#define GL_TEXTURE27 0x84DB
|
||||
#define GL_TEXTURE28 0x84DC
|
||||
#define GL_TEXTURE29 0x84DD
|
||||
#define GL_TEXTURE30 0x84DE
|
||||
#define GL_TEXTURE31 0x84DF
|
||||
#define GL_ACTIVE_TEXTURE 0x84E0
|
||||
#define GL_REPEAT 0x2901
|
||||
#define GL_CLAMP_TO_EDGE 0x812F
|
||||
#define GL_MIRRORED_REPEAT 0x8370
|
||||
#define GL_FLOAT_VEC2 0x8B50
|
||||
#define GL_FLOAT_VEC3 0x8B51
|
||||
#define GL_FLOAT_VEC4 0x8B52
|
||||
#define GL_INT_VEC2 0x8B53
|
||||
#define GL_INT_VEC3 0x8B54
|
||||
#define GL_INT_VEC4 0x8B55
|
||||
#define GL_BOOL 0x8B56
|
||||
#define GL_BOOL_VEC2 0x8B57
|
||||
#define GL_BOOL_VEC3 0x8B58
|
||||
#define GL_BOOL_VEC4 0x8B59
|
||||
#define GL_FLOAT_MAT2 0x8B5A
|
||||
#define GL_FLOAT_MAT3 0x8B5B
|
||||
#define GL_FLOAT_MAT4 0x8B5C
|
||||
#define GL_SAMPLER_2D 0x8B5E
|
||||
#define GL_SAMPLER_CUBE 0x8B60
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F
|
||||
#define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A
|
||||
#define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B
|
||||
#define GL_COMPILE_STATUS 0x8B81
|
||||
#define GL_INFO_LOG_LENGTH 0x8B84
|
||||
#define GL_SHADER_SOURCE_LENGTH 0x8B88
|
||||
#define GL_SHADER_COMPILER 0x8DFA
|
||||
#define GL_SHADER_BINARY_FORMATS 0x8DF8
|
||||
#define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9
|
||||
#define GL_LOW_FLOAT 0x8DF0
|
||||
#define GL_MEDIUM_FLOAT 0x8DF1
|
||||
#define GL_HIGH_FLOAT 0x8DF2
|
||||
#define GL_LOW_INT 0x8DF3
|
||||
#define GL_MEDIUM_INT 0x8DF4
|
||||
#define GL_HIGH_INT 0x8DF5
|
||||
#define GL_FRAMEBUFFER 0x8D40
|
||||
#define GL_RENDERBUFFER 0x8D41
|
||||
#define GL_RGBA4 0x8056
|
||||
#define GL_RGB5_A1 0x8057
|
||||
#define GL_RGB565 0x8D62
|
||||
#define GL_DEPTH_COMPONENT16 0x81A5
|
||||
#define GL_STENCIL_INDEX8 0x8D48
|
||||
#define GL_RENDERBUFFER_WIDTH 0x8D42
|
||||
#define GL_RENDERBUFFER_HEIGHT 0x8D43
|
||||
#define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44
|
||||
#define GL_RENDERBUFFER_RED_SIZE 0x8D50
|
||||
#define GL_RENDERBUFFER_GREEN_SIZE 0x8D51
|
||||
#define GL_RENDERBUFFER_BLUE_SIZE 0x8D52
|
||||
#define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53
|
||||
#define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54
|
||||
#define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55
|
||||
#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0
|
||||
#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1
|
||||
#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2
|
||||
#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3
|
||||
#define GL_COLOR_ATTACHMENT0 0x8CE0
|
||||
#define GL_DEPTH_ATTACHMENT 0x8D00
|
||||
#define GL_STENCIL_ATTACHMENT 0x8D20
|
||||
#define GL_NONE 0
|
||||
#define GL_FRAMEBUFFER_COMPLETE 0x8CD5
|
||||
#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6
|
||||
#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7
|
||||
#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS 0x8CD9
|
||||
#define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD
|
||||
#define GL_FRAMEBUFFER_BINDING 0x8CA6
|
||||
#define GL_RENDERBUFFER_BINDING 0x8CA7
|
||||
#define GL_MAX_RENDERBUFFER_SIZE 0x84E8
|
||||
#define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506
|
||||
typedef void (GL_APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture);
|
||||
typedef void (GL_APIENTRYP PFNGLATTACHSHADERPROC) (GLuint program, GLuint shader);
|
||||
typedef void (GL_APIENTRYP PFNGLBINDATTRIBLOCATIONPROC) (GLuint program, GLuint index, const GLchar *name);
|
||||
typedef void (GL_APIENTRYP PFNGLBINDBUFFERPROC) (GLenum target, GLuint buffer);
|
||||
typedef void (GL_APIENTRYP PFNGLBINDFRAMEBUFFERPROC) (GLenum target, GLuint framebuffer);
|
||||
typedef void (GL_APIENTRYP PFNGLBINDRENDERBUFFERPROC) (GLenum target, GLuint renderbuffer);
|
||||
typedef void (GL_APIENTRYP PFNGLBINDTEXTUREPROC) (GLenum target, GLuint texture);
|
||||
typedef void (GL_APIENTRYP PFNGLBLENDCOLORPROC) (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
|
||||
typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode);
|
||||
typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONSEPARATEPROC) (GLenum modeRGB, GLenum modeAlpha);
|
||||
typedef void (GL_APIENTRYP PFNGLBLENDFUNCPROC) (GLenum sfactor, GLenum dfactor);
|
||||
typedef void (GL_APIENTRYP PFNGLBLENDFUNCSEPARATEPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
|
||||
typedef void (GL_APIENTRYP PFNGLBUFFERDATAPROC) (GLenum target, GLsizeiptr size, const void *data, GLenum usage);
|
||||
typedef void (GL_APIENTRYP PFNGLBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, const void *data);
|
||||
typedef GLenum (GL_APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSPROC) (GLenum target);
|
||||
typedef void (GL_APIENTRYP PFNGLCLEARPROC) (GLbitfield mask);
|
||||
typedef void (GL_APIENTRYP PFNGLCLEARCOLORPROC) (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
|
||||
typedef void (GL_APIENTRYP PFNGLCLEARDEPTHFPROC) (GLfloat d);
|
||||
typedef void (GL_APIENTRYP PFNGLCLEARSTENCILPROC) (GLint s);
|
||||
typedef void (GL_APIENTRYP PFNGLCOLORMASKPROC) (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
|
||||
typedef void (GL_APIENTRYP PFNGLCOMPILESHADERPROC) (GLuint shader);
|
||||
typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data);
|
||||
typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);
|
||||
typedef void (GL_APIENTRYP PFNGLCOPYTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
|
||||
typedef void (GL_APIENTRYP PFNGLCOPYTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
typedef GLuint (GL_APIENTRYP PFNGLCREATEPROGRAMPROC) (void);
|
||||
typedef GLuint (GL_APIENTRYP PFNGLCREATESHADERPROC) (GLenum type);
|
||||
typedef void (GL_APIENTRYP PFNGLCULLFACEPROC) (GLenum mode);
|
||||
typedef void (GL_APIENTRYP PFNGLDELETEBUFFERSPROC) (GLsizei n, const GLuint *buffers);
|
||||
typedef void (GL_APIENTRYP PFNGLDELETEFRAMEBUFFERSPROC) (GLsizei n, const GLuint *framebuffers);
|
||||
typedef void (GL_APIENTRYP PFNGLDELETEPROGRAMPROC) (GLuint program);
|
||||
typedef void (GL_APIENTRYP PFNGLDELETERENDERBUFFERSPROC) (GLsizei n, const GLuint *renderbuffers);
|
||||
typedef void (GL_APIENTRYP PFNGLDELETESHADERPROC) (GLuint shader);
|
||||
typedef void (GL_APIENTRYP PFNGLDELETETEXTURESPROC) (GLsizei n, const GLuint *textures);
|
||||
typedef void (GL_APIENTRYP PFNGLDEPTHFUNCPROC) (GLenum func);
|
||||
typedef void (GL_APIENTRYP PFNGLDEPTHMASKPROC) (GLboolean flag);
|
||||
typedef void (GL_APIENTRYP PFNGLDEPTHRANGEFPROC) (GLfloat n, GLfloat f);
|
||||
typedef void (GL_APIENTRYP PFNGLDETACHSHADERPROC) (GLuint program, GLuint shader);
|
||||
typedef void (GL_APIENTRYP PFNGLDISABLEPROC) (GLenum cap);
|
||||
typedef void (GL_APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYPROC) (GLuint index);
|
||||
typedef void (GL_APIENTRYP PFNGLDRAWARRAYSPROC) (GLenum mode, GLint first, GLsizei count);
|
||||
typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices);
|
||||
typedef void (GL_APIENTRYP PFNGLENABLEPROC) (GLenum cap);
|
||||
typedef void (GL_APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint index);
|
||||
typedef void (GL_APIENTRYP PFNGLFINISHPROC) (void);
|
||||
typedef void (GL_APIENTRYP PFNGLFLUSHPROC) (void);
|
||||
typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFERPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
|
||||
typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
|
||||
typedef void (GL_APIENTRYP PFNGLFRONTFACEPROC) (GLenum mode);
|
||||
typedef void (GL_APIENTRYP PFNGLGENBUFFERSPROC) (GLsizei n, GLuint *buffers);
|
||||
typedef void (GL_APIENTRYP PFNGLGENERATEMIPMAPPROC) (GLenum target);
|
||||
typedef void (GL_APIENTRYP PFNGLGENFRAMEBUFFERSPROC) (GLsizei n, GLuint *framebuffers);
|
||||
typedef void (GL_APIENTRYP PFNGLGENRENDERBUFFERSPROC) (GLsizei n, GLuint *renderbuffers);
|
||||
typedef void (GL_APIENTRYP PFNGLGENTEXTURESPROC) (GLsizei n, GLuint *textures);
|
||||
typedef void (GL_APIENTRYP PFNGLGETACTIVEATTRIBPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
|
||||
typedef void (GL_APIENTRYP PFNGLGETACTIVEUNIFORMPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
|
||||
typedef void (GL_APIENTRYP PFNGLGETATTACHEDSHADERSPROC) (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders);
|
||||
typedef GLint (GL_APIENTRYP PFNGLGETATTRIBLOCATIONPROC) (GLuint program, const GLchar *name);
|
||||
typedef void (GL_APIENTRYP PFNGLGETBOOLEANVPROC) (GLenum pname, GLboolean *data);
|
||||
typedef void (GL_APIENTRYP PFNGLGETBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
|
||||
typedef GLenum (GL_APIENTRYP PFNGLGETERRORPROC) (void);
|
||||
typedef void (GL_APIENTRYP PFNGLGETFLOATVPROC) (GLenum pname, GLfloat *data);
|
||||
typedef void (GL_APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params);
|
||||
typedef void (GL_APIENTRYP PFNGLGETINTEGERVPROC) (GLenum pname, GLint *data);
|
||||
typedef void (GL_APIENTRYP PFNGLGETPROGRAMIVPROC) (GLuint program, GLenum pname, GLint *params);
|
||||
typedef void (GL_APIENTRYP PFNGLGETPROGRAMINFOLOGPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
|
||||
typedef void (GL_APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
|
||||
typedef void (GL_APIENTRYP PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint *params);
|
||||
typedef void (GL_APIENTRYP PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
|
||||
typedef void (GL_APIENTRYP PFNGLGETSHADERPRECISIONFORMATPROC) (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision);
|
||||
typedef void (GL_APIENTRYP PFNGLGETSHADERSOURCEPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source);
|
||||
typedef const GLubyte *(GL_APIENTRYP PFNGLGETSTRINGPROC) (GLenum name);
|
||||
typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
|
||||
typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
|
||||
typedef void (GL_APIENTRYP PFNGLGETUNIFORMFVPROC) (GLuint program, GLint location, GLfloat *params);
|
||||
typedef void (GL_APIENTRYP PFNGLGETUNIFORMIVPROC) (GLuint program, GLint location, GLint *params);
|
||||
typedef GLint (GL_APIENTRYP PFNGLGETUNIFORMLOCATIONPROC) (GLuint program, const GLchar *name);
|
||||
typedef void (GL_APIENTRYP PFNGLGETVERTEXATTRIBFVPROC) (GLuint index, GLenum pname, GLfloat *params);
|
||||
typedef void (GL_APIENTRYP PFNGLGETVERTEXATTRIBIVPROC) (GLuint index, GLenum pname, GLint *params);
|
||||
typedef void (GL_APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVPROC) (GLuint index, GLenum pname, void **pointer);
|
||||
typedef void (GL_APIENTRYP PFNGLHINTPROC) (GLenum target, GLenum mode);
|
||||
typedef GLboolean (GL_APIENTRYP PFNGLISBUFFERPROC) (GLuint buffer);
|
||||
typedef GLboolean (GL_APIENTRYP PFNGLISENABLEDPROC) (GLenum cap);
|
||||
typedef GLboolean (GL_APIENTRYP PFNGLISFRAMEBUFFERPROC) (GLuint framebuffer);
|
||||
typedef GLboolean (GL_APIENTRYP PFNGLISPROGRAMPROC) (GLuint program);
|
||||
typedef GLboolean (GL_APIENTRYP PFNGLISRENDERBUFFERPROC) (GLuint renderbuffer);
|
||||
typedef GLboolean (GL_APIENTRYP PFNGLISSHADERPROC) (GLuint shader);
|
||||
typedef GLboolean (GL_APIENTRYP PFNGLISTEXTUREPROC) (GLuint texture);
|
||||
typedef void (GL_APIENTRYP PFNGLLINEWIDTHPROC) (GLfloat width);
|
||||
typedef void (GL_APIENTRYP PFNGLLINKPROGRAMPROC) (GLuint program);
|
||||
typedef void (GL_APIENTRYP PFNGLPIXELSTOREIPROC) (GLenum pname, GLint param);
|
||||
typedef void (GL_APIENTRYP PFNGLPOLYGONOFFSETPROC) (GLfloat factor, GLfloat units);
|
||||
typedef void (GL_APIENTRYP PFNGLREADPIXELSPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels);
|
||||
typedef void (GL_APIENTRYP PFNGLRELEASESHADERCOMPILERPROC) (void);
|
||||
typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
|
||||
typedef void (GL_APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLfloat value, GLboolean invert);
|
||||
typedef void (GL_APIENTRYP PFNGLSCISSORPROC) (GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
typedef void (GL_APIENTRYP PFNGLSHADERBINARYPROC) (GLsizei count, const GLuint *shaders, GLenum binaryFormat, const void *binary, GLsizei length);
|
||||
typedef void (GL_APIENTRYP PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length);
|
||||
typedef void (GL_APIENTRYP PFNGLSTENCILFUNCPROC) (GLenum func, GLint ref, GLuint mask);
|
||||
typedef void (GL_APIENTRYP PFNGLSTENCILFUNCSEPARATEPROC) (GLenum face, GLenum func, GLint ref, GLuint mask);
|
||||
typedef void (GL_APIENTRYP PFNGLSTENCILMASKPROC) (GLuint mask);
|
||||
typedef void (GL_APIENTRYP PFNGLSTENCILMASKSEPARATEPROC) (GLenum face, GLuint mask);
|
||||
typedef void (GL_APIENTRYP PFNGLSTENCILOPPROC) (GLenum fail, GLenum zfail, GLenum zpass);
|
||||
typedef void (GL_APIENTRYP PFNGLSTENCILOPSEPARATEPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
|
||||
typedef void (GL_APIENTRYP PFNGLTEXIMAGE2DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels);
|
||||
typedef void (GL_APIENTRYP PFNGLTEXPARAMETERFPROC) (GLenum target, GLenum pname, GLfloat param);
|
||||
typedef void (GL_APIENTRYP PFNGLTEXPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params);
|
||||
typedef void (GL_APIENTRYP PFNGLTEXPARAMETERIPROC) (GLenum target, GLenum pname, GLint param);
|
||||
typedef void (GL_APIENTRYP PFNGLTEXPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);
|
||||
typedef void (GL_APIENTRYP PFNGLTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
|
||||
typedef void (GL_APIENTRYP PFNGLUNIFORM1FPROC) (GLint location, GLfloat v0);
|
||||
typedef void (GL_APIENTRYP PFNGLUNIFORM1FVPROC) (GLint location, GLsizei count, const GLfloat *value);
|
||||
typedef void (GL_APIENTRYP PFNGLUNIFORM1IPROC) (GLint location, GLint v0);
|
||||
typedef void (GL_APIENTRYP PFNGLUNIFORM1IVPROC) (GLint location, GLsizei count, const GLint *value);
|
||||
typedef void (GL_APIENTRYP PFNGLUNIFORM2FPROC) (GLint location, GLfloat v0, GLfloat v1);
|
||||
typedef void (GL_APIENTRYP PFNGLUNIFORM2FVPROC) (GLint location, GLsizei count, const GLfloat *value);
|
||||
typedef void (GL_APIENTRYP PFNGLUNIFORM2IPROC) (GLint location, GLint v0, GLint v1);
|
||||
typedef void (GL_APIENTRYP PFNGLUNIFORM2IVPROC) (GLint location, GLsizei count, const GLint *value);
|
||||
typedef void (GL_APIENTRYP PFNGLUNIFORM3FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
|
||||
typedef void (GL_APIENTRYP PFNGLUNIFORM3FVPROC) (GLint location, GLsizei count, const GLfloat *value);
|
||||
typedef void (GL_APIENTRYP PFNGLUNIFORM3IPROC) (GLint location, GLint v0, GLint v1, GLint v2);
|
||||
typedef void (GL_APIENTRYP PFNGLUNIFORM3IVPROC) (GLint location, GLsizei count, const GLint *value);
|
||||
typedef void (GL_APIENTRYP PFNGLUNIFORM4FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
|
||||
typedef void (GL_APIENTRYP PFNGLUNIFORM4FVPROC) (GLint location, GLsizei count, const GLfloat *value);
|
||||
typedef void (GL_APIENTRYP PFNGLUNIFORM4IPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
|
||||
typedef void (GL_APIENTRYP PFNGLUNIFORM4IVPROC) (GLint location, GLsizei count, const GLint *value);
|
||||
typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
|
||||
typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
|
||||
typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
|
||||
typedef void (GL_APIENTRYP PFNGLUSEPROGRAMPROC) (GLuint program);
|
||||
typedef void (GL_APIENTRYP PFNGLVALIDATEPROGRAMPROC) (GLuint program);
|
||||
typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB1FPROC) (GLuint index, GLfloat x);
|
||||
typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB1FVPROC) (GLuint index, const GLfloat *v);
|
||||
typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB2FPROC) (GLuint index, GLfloat x, GLfloat y);
|
||||
typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB2FVPROC) (GLuint index, const GLfloat *v);
|
||||
typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB3FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);
|
||||
typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB3FVPROC) (GLuint index, const GLfloat *v);
|
||||
typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB4FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
|
||||
typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB4FVPROC) (GLuint index, const GLfloat *v);
|
||||
typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);
|
||||
typedef void (GL_APIENTRYP PFNGLVIEWPORTPROC) (GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
#if GL_GLES_PROTOTYPES
|
||||
GL_APICALL void GL_APIENTRY glActiveTexture (GLenum texture);
|
||||
GL_APICALL void GL_APIENTRY glAttachShader (GLuint program, GLuint shader);
|
||||
GL_APICALL void GL_APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar *name);
|
||||
GL_APICALL void GL_APIENTRY glBindBuffer (GLenum target, GLuint buffer);
|
||||
GL_APICALL void GL_APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer);
|
||||
GL_APICALL void GL_APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer);
|
||||
GL_APICALL void GL_APIENTRY glBindTexture (GLenum target, GLuint texture);
|
||||
GL_APICALL void GL_APIENTRY glBlendColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
|
||||
GL_APICALL void GL_APIENTRY glBlendEquation (GLenum mode);
|
||||
GL_APICALL void GL_APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha);
|
||||
GL_APICALL void GL_APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor);
|
||||
GL_APICALL void GL_APIENTRY glBlendFuncSeparate (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
|
||||
GL_APICALL void GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const void *data, GLenum usage);
|
||||
GL_APICALL void GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const void *data);
|
||||
GL_APICALL GLenum GL_APIENTRY glCheckFramebufferStatus (GLenum target);
|
||||
GL_APICALL void GL_APIENTRY glClear (GLbitfield mask);
|
||||
GL_APICALL void GL_APIENTRY glClearColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
|
||||
GL_APICALL void GL_APIENTRY glClearDepthf (GLfloat d);
|
||||
GL_APICALL void GL_APIENTRY glClearStencil (GLint s);
|
||||
GL_APICALL void GL_APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
|
||||
GL_APICALL void GL_APIENTRY glCompileShader (GLuint shader);
|
||||
GL_APICALL void GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data);
|
||||
GL_APICALL void GL_APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);
|
||||
GL_APICALL void GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
|
||||
GL_APICALL void GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
GL_APICALL GLuint GL_APIENTRY glCreateProgram (void);
|
||||
GL_APICALL GLuint GL_APIENTRY glCreateShader (GLenum type);
|
||||
GL_APICALL void GL_APIENTRY glCullFace (GLenum mode);
|
||||
GL_APICALL void GL_APIENTRY glDeleteBuffers (GLsizei n, const GLuint *buffers);
|
||||
GL_APICALL void GL_APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint *framebuffers);
|
||||
GL_APICALL void GL_APIENTRY glDeleteProgram (GLuint program);
|
||||
GL_APICALL void GL_APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint *renderbuffers);
|
||||
GL_APICALL void GL_APIENTRY glDeleteShader (GLuint shader);
|
||||
GL_APICALL void GL_APIENTRY glDeleteTextures (GLsizei n, const GLuint *textures);
|
||||
GL_APICALL void GL_APIENTRY glDepthFunc (GLenum func);
|
||||
GL_APICALL void GL_APIENTRY glDepthMask (GLboolean flag);
|
||||
GL_APICALL void GL_APIENTRY glDepthRangef (GLfloat n, GLfloat f);
|
||||
GL_APICALL void GL_APIENTRY glDetachShader (GLuint program, GLuint shader);
|
||||
GL_APICALL void GL_APIENTRY glDisable (GLenum cap);
|
||||
GL_APICALL void GL_APIENTRY glDisableVertexAttribArray (GLuint index);
|
||||
GL_APICALL void GL_APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count);
|
||||
GL_APICALL void GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const void *indices);
|
||||
GL_APICALL void GL_APIENTRY glEnable (GLenum cap);
|
||||
GL_APICALL void GL_APIENTRY glEnableVertexAttribArray (GLuint index);
|
||||
GL_APICALL void GL_APIENTRY glFinish (void);
|
||||
GL_APICALL void GL_APIENTRY glFlush (void);
|
||||
GL_APICALL void GL_APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
|
||||
GL_APICALL void GL_APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
|
||||
GL_APICALL void GL_APIENTRY glFrontFace (GLenum mode);
|
||||
GL_APICALL void GL_APIENTRY glGenBuffers (GLsizei n, GLuint *buffers);
|
||||
GL_APICALL void GL_APIENTRY glGenerateMipmap (GLenum target);
|
||||
GL_APICALL void GL_APIENTRY glGenFramebuffers (GLsizei n, GLuint *framebuffers);
|
||||
GL_APICALL void GL_APIENTRY glGenRenderbuffers (GLsizei n, GLuint *renderbuffers);
|
||||
GL_APICALL void GL_APIENTRY glGenTextures (GLsizei n, GLuint *textures);
|
||||
GL_APICALL void GL_APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
|
||||
GL_APICALL void GL_APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
|
||||
GL_APICALL void GL_APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders);
|
||||
GL_APICALL GLint GL_APIENTRY glGetAttribLocation (GLuint program, const GLchar *name);
|
||||
GL_APICALL void GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean *data);
|
||||
GL_APICALL void GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params);
|
||||
GL_APICALL GLenum GL_APIENTRY glGetError (void);
|
||||
GL_APICALL void GL_APIENTRY glGetFloatv (GLenum pname, GLfloat *data);
|
||||
GL_APICALL void GL_APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint *params);
|
||||
GL_APICALL void GL_APIENTRY glGetIntegerv (GLenum pname, GLint *data);
|
||||
GL_APICALL void GL_APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint *params);
|
||||
GL_APICALL void GL_APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
|
||||
GL_APICALL void GL_APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint *params);
|
||||
GL_APICALL void GL_APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint *params);
|
||||
GL_APICALL void GL_APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
|
||||
GL_APICALL void GL_APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision);
|
||||
GL_APICALL void GL_APIENTRY glGetShaderSource (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source);
|
||||
GL_APICALL const GLubyte *GL_APIENTRY glGetString (GLenum name);
|
||||
GL_APICALL void GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat *params);
|
||||
GL_APICALL void GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint *params);
|
||||
GL_APICALL void GL_APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat *params);
|
||||
GL_APICALL void GL_APIENTRY glGetUniformiv (GLuint program, GLint location, GLint *params);
|
||||
GL_APICALL GLint GL_APIENTRY glGetUniformLocation (GLuint program, const GLchar *name);
|
||||
GL_APICALL void GL_APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat *params);
|
||||
GL_APICALL void GL_APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint *params);
|
||||
GL_APICALL void GL_APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, void **pointer);
|
||||
GL_APICALL void GL_APIENTRY glHint (GLenum target, GLenum mode);
|
||||
GL_APICALL GLboolean GL_APIENTRY glIsBuffer (GLuint buffer);
|
||||
GL_APICALL GLboolean GL_APIENTRY glIsEnabled (GLenum cap);
|
||||
GL_APICALL GLboolean GL_APIENTRY glIsFramebuffer (GLuint framebuffer);
|
||||
GL_APICALL GLboolean GL_APIENTRY glIsProgram (GLuint program);
|
||||
GL_APICALL GLboolean GL_APIENTRY glIsRenderbuffer (GLuint renderbuffer);
|
||||
GL_APICALL GLboolean GL_APIENTRY glIsShader (GLuint shader);
|
||||
GL_APICALL GLboolean GL_APIENTRY glIsTexture (GLuint texture);
|
||||
GL_APICALL void GL_APIENTRY glLineWidth (GLfloat width);
|
||||
GL_APICALL void GL_APIENTRY glLinkProgram (GLuint program);
|
||||
GL_APICALL void GL_APIENTRY glPixelStorei (GLenum pname, GLint param);
|
||||
GL_APICALL void GL_APIENTRY glPolygonOffset (GLfloat factor, GLfloat units);
|
||||
GL_APICALL void GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels);
|
||||
GL_APICALL void GL_APIENTRY glReleaseShaderCompiler (void);
|
||||
GL_APICALL void GL_APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
|
||||
GL_APICALL void GL_APIENTRY glSampleCoverage (GLfloat value, GLboolean invert);
|
||||
GL_APICALL void GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
GL_APICALL void GL_APIENTRY glShaderBinary (GLsizei count, const GLuint *shaders, GLenum binaryFormat, const void *binary, GLsizei length);
|
||||
GL_APICALL void GL_APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length);
|
||||
GL_APICALL void GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask);
|
||||
GL_APICALL void GL_APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask);
|
||||
GL_APICALL void GL_APIENTRY glStencilMask (GLuint mask);
|
||||
GL_APICALL void GL_APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask);
|
||||
GL_APICALL void GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass);
|
||||
GL_APICALL void GL_APIENTRY glStencilOpSeparate (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
|
||||
GL_APICALL void GL_APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels);
|
||||
GL_APICALL void GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param);
|
||||
GL_APICALL void GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat *params);
|
||||
GL_APICALL void GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param);
|
||||
GL_APICALL void GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint *params);
|
||||
GL_APICALL void GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
|
||||
GL_APICALL void GL_APIENTRY glUniform1f (GLint location, GLfloat v0);
|
||||
GL_APICALL void GL_APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat *value);
|
||||
GL_APICALL void GL_APIENTRY glUniform1i (GLint location, GLint v0);
|
||||
GL_APICALL void GL_APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint *value);
|
||||
GL_APICALL void GL_APIENTRY glUniform2f (GLint location, GLfloat v0, GLfloat v1);
|
||||
GL_APICALL void GL_APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat *value);
|
||||
GL_APICALL void GL_APIENTRY glUniform2i (GLint location, GLint v0, GLint v1);
|
||||
GL_APICALL void GL_APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint *value);
|
||||
GL_APICALL void GL_APIENTRY glUniform3f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
|
||||
GL_APICALL void GL_APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat *value);
|
||||
GL_APICALL void GL_APIENTRY glUniform3i (GLint location, GLint v0, GLint v1, GLint v2);
|
||||
GL_APICALL void GL_APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint *value);
|
||||
GL_APICALL void GL_APIENTRY glUniform4f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
|
||||
GL_APICALL void GL_APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat *value);
|
||||
GL_APICALL void GL_APIENTRY glUniform4i (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
|
||||
GL_APICALL void GL_APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint *value);
|
||||
GL_APICALL void GL_APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
|
||||
GL_APICALL void GL_APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
|
||||
GL_APICALL void GL_APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
|
||||
GL_APICALL void GL_APIENTRY glUseProgram (GLuint program);
|
||||
GL_APICALL void GL_APIENTRY glValidateProgram (GLuint program);
|
||||
GL_APICALL void GL_APIENTRY glVertexAttrib1f (GLuint index, GLfloat x);
|
||||
GL_APICALL void GL_APIENTRY glVertexAttrib1fv (GLuint index, const GLfloat *v);
|
||||
GL_APICALL void GL_APIENTRY glVertexAttrib2f (GLuint index, GLfloat x, GLfloat y);
|
||||
GL_APICALL void GL_APIENTRY glVertexAttrib2fv (GLuint index, const GLfloat *v);
|
||||
GL_APICALL void GL_APIENTRY glVertexAttrib3f (GLuint index, GLfloat x, GLfloat y, GLfloat z);
|
||||
GL_APICALL void GL_APIENTRY glVertexAttrib3fv (GLuint index, const GLfloat *v);
|
||||
GL_APICALL void GL_APIENTRY glVertexAttrib4f (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
|
||||
GL_APICALL void GL_APIENTRY glVertexAttrib4fv (GLuint index, const GLfloat *v);
|
||||
GL_APICALL void GL_APIENTRY glVertexAttribPointer (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);
|
||||
GL_APICALL void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
#endif
|
||||
#endif /* GL_ES_VERSION_2_0 */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
4050
third_party/openGLES/GLES2/gl2ext.h
vendored
Normal file
4050
third_party/openGLES/GLES2/gl2ext.h
vendored
Normal file
File diff suppressed because it is too large
Load Diff
27
third_party/openGLES/GLES2/gl2platform.h
vendored
Normal file
27
third_party/openGLES/GLES2/gl2platform.h
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
#ifndef __gl2platform_h_
|
||||
#define __gl2platform_h_
|
||||
|
||||
/*
|
||||
** Copyright 2017-2020 The Khronos Group Inc.
|
||||
** SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/* Platform-specific types and definitions for OpenGL ES 2.X gl2.h
|
||||
*
|
||||
* Adopters may modify khrplatform.h and this file to suit their platform.
|
||||
* Please contribute modifications back to Khronos as pull requests on the
|
||||
* public github repository:
|
||||
* https://github.com/KhronosGroup/OpenGL-Registry
|
||||
*/
|
||||
|
||||
#include <KHR/khrplatform.h>
|
||||
|
||||
#ifndef GL_APICALL
|
||||
#define GL_APICALL KHRONOS_APICALL
|
||||
#endif
|
||||
|
||||
#ifndef GL_APIENTRY
|
||||
#define GL_APIENTRY KHRONOS_APIENTRY
|
||||
#endif
|
||||
|
||||
#endif /* __gl2platform_h_ */
|
2
third_party/openGLES/GLES3/gl3.h
vendored
2
third_party/openGLES/GLES3/gl3.h
vendored
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user