aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPrzemyslaw Szczepaniak <pszczepaniak@google.com>2023-12-05 15:34:38 +0000
committerPrzemyslaw Szczepaniak <pszczepaniak@google.com>2023-12-08 10:49:12 +0000
commitb3637ac58188f4b45a021e198dbc59e35bcd5993 (patch)
tree8cf98417956aecece580d5c2a43813a732a11d50
parent0a71af544b2a92f3b64cc76895a0de22b05ef4a6 (diff)
downloadNeuralNetworks-b3637ac58188f4b45a021e198dbc59e35bcd5993.tar.gz
Deprecate NNAPI functions.
Bug: 283927643 Test: built the image. Change-Id: Ib86aa395b70510773aeebb18445332cdb373ab92
-rw-r--r--runtime/include/NeuralNetworks.h208
1 files changed, 208 insertions, 0 deletions
diff --git a/runtime/include/NeuralNetworks.h b/runtime/include/NeuralNetworks.h
index 4e54f8568..cfa871c7d 100644
--- a/runtime/include/NeuralNetworks.h
+++ b/runtime/include/NeuralNetworks.h
@@ -87,6 +87,10 @@ __BEGIN_DECLS
* Set to NULL if unsuccessful.
*
* @return ANEURALNETWORKS_NO_ERROR if successful.
+ *
+ * @deprecated NNAPI is deprecated. See
+ * <a href="https://source.android.com/docs/core/interaction/neural-networks">this webpage</a>
+ * for more details.
*/
int ANeuralNetworksMemoryDesc_create(ANeuralNetworksMemoryDesc** desc) __NNAPI_INTRODUCED_IN(30);
@@ -102,6 +106,9 @@ int ANeuralNetworksMemoryDesc_create(ANeuralNetworksMemoryDesc** desc) __NNAPI_I
*
* @param desc The memory descriptor to be destroyed. Passing NULL is acceptable and
* results in no operation.
+ * @deprecated NNAPI is deprecated. See
+ * <a href="https://source.android.com/docs/core/interaction/neural-networks">this webpage</a>
+ * for more details.
*/
void ANeuralNetworksMemoryDesc_free(ANeuralNetworksMemoryDesc* desc) __NNAPI_INTRODUCED_IN(30);
@@ -146,6 +153,9 @@ void ANeuralNetworksMemoryDesc_free(ANeuralNetworksMemoryDesc* desc) __NNAPI_INT
* layouts.
*
* @return ANEURALNETWORKS_NO_ERROR if successful.
+ * @deprecated NNAPI is deprecated. See
+ * <a href="https://source.android.com/docs/core/interaction/neural-networks">this webpage</a>
+ * for more details.
*/
int ANeuralNetworksMemoryDesc_addInputRole(ANeuralNetworksMemoryDesc* desc,
const ANeuralNetworksCompilation* compilation,
@@ -193,6 +203,9 @@ int ANeuralNetworksMemoryDesc_addInputRole(ANeuralNetworksMemoryDesc* desc,
* layouts.
*
* @return ANEURALNETWORKS_NO_ERROR if successful.
+ * @deprecated NNAPI is deprecated. See
+ * <a href="https://source.android.com/docs/core/interaction/neural-networks">this webpage</a>
+ * for more details.
*/
int ANeuralNetworksMemoryDesc_addOutputRole(ANeuralNetworksMemoryDesc* desc,
const ANeuralNetworksCompilation* compilation,
@@ -221,6 +234,9 @@ int ANeuralNetworksMemoryDesc_addOutputRole(ANeuralNetworksMemoryDesc* desc,
* corresponding axis has an unknown size.
*
* @return ANEURALNETWORKS_NO_ERROR if successful.
+ * @deprecated NNAPI is deprecated. See
+ * <a href="https://source.android.com/docs/core/interaction/neural-networks">this webpage</a>
+ * for more details.
*/
int ANeuralNetworksMemoryDesc_setDimensions(ANeuralNetworksMemoryDesc* desc, uint32_t rank,
const uint32_t* dimensions) __NNAPI_INTRODUCED_IN(30);
@@ -238,6 +254,9 @@ int ANeuralNetworksMemoryDesc_setDimensions(ANeuralNetworksMemoryDesc* desc, uin
* @param desc The memory descriptor to be finished.
*
* @return ANEURALNETWORKS_NO_ERROR if successful.
+ * @deprecated NNAPI is deprecated. See
+ * <a href="https://source.android.com/docs/core/interaction/neural-networks">this webpage</a>
+ * for more details.
*/
int ANeuralNetworksMemoryDesc_finish(ANeuralNetworksMemoryDesc* desc) __NNAPI_INTRODUCED_IN(30);
@@ -293,6 +312,9 @@ int ANeuralNetworksMemoryDesc_finish(ANeuralNetworksMemoryDesc* desc) __NNAPI_IN
* @return ANEURALNETWORKS_NO_ERROR if successful; ANEURALNETWORKS_OP_FAILED if the memory is
* created with unspecified dimensions or rank and it is not supported for this set of
* roles.
+ * @deprecated NNAPI is deprecated. See
+ * <a href="https://source.android.com/docs/core/interaction/neural-networks">this webpage</a>
+ * for more details.
*/
int ANeuralNetworksMemory_createFromDesc(const ANeuralNetworksMemoryDesc* desc,
ANeuralNetworksMemory** memory) __NNAPI_INTRODUCED_IN(30);
@@ -332,6 +354,9 @@ int ANeuralNetworksMemory_createFromDesc(const ANeuralNetworksMemoryDesc* desc,
* @param dst The destination memory object.
*
* @return ANEURALNETWORKS_NO_ERROR if successful.
+ * @deprecated NNAPI is deprecated. See
+ * <a href="https://source.android.com/docs/core/interaction/neural-networks">this webpage</a>
+ * for more details.
*/
int ANeuralNetworksMemory_copy(const ANeuralNetworksMemory* src, const ANeuralNetworksMemory* dst)
__NNAPI_INTRODUCED_IN(30);
@@ -344,6 +369,9 @@ int ANeuralNetworksMemory_copy(const ANeuralNetworksMemory* src, const ANeuralNe
* @return ANEURALNETWORKS_NO_ERROR if successful.
*
* Available since NNAPI feature level 3.
+ * @deprecated NNAPI is deprecated. See
+ * <a href="https://source.android.com/docs/core/interaction/neural-networks">this webpage</a>
+ * for more details.
*/
int ANeuralNetworks_getDeviceCount(uint32_t* numDevices) __NNAPI_INTRODUCED_IN(29);
@@ -359,6 +387,9 @@ int ANeuralNetworks_getDeviceCount(uint32_t* numDevices) __NNAPI_INTRODUCED_IN(2
* @return ANEURALNETWORKS_NO_ERROR if successful.
*
* Available since NNAPI feature level 3.
+ * @deprecated NNAPI is deprecated. See
+ * <a href="https://source.android.com/docs/core/interaction/neural-networks">this webpage</a>
+ * for more details.
*/
int ANeuralNetworks_getDevice(uint32_t devIndex, ANeuralNetworksDevice** device)
__NNAPI_INTRODUCED_IN(29);
@@ -379,6 +410,9 @@ int ANeuralNetworks_getDevice(uint32_t devIndex, ANeuralNetworksDevice** device)
* @return ANEURALNETWORKS_NO_ERROR if successful.
*
* Available since NNAPI feature level 3.
+ * @deprecated NNAPI is deprecated. See
+ * <a href="https://source.android.com/docs/core/interaction/neural-networks">this webpage</a>
+ * for more details.
*/
int ANeuralNetworksDevice_getName(const ANeuralNetworksDevice* device, const char** name)
__NNAPI_INTRODUCED_IN(29);
@@ -398,6 +432,9 @@ int ANeuralNetworksDevice_getName(const ANeuralNetworksDevice* device, const cha
* @return ANEURALNETWORKS_NO_ERROR if successful.
*
* Available since NNAPI feature level 3.
+ * @deprecated NNAPI is deprecated. See
+ * <a href="https://source.android.com/docs/core/interaction/neural-networks">this webpage</a>
+ * for more details.
*/
int ANeuralNetworksDevice_getType(const ANeuralNetworksDevice* device, int32_t* type)
__NNAPI_INTRODUCED_IN(29);
@@ -428,6 +465,9 @@ int ANeuralNetworksDevice_getType(const ANeuralNetworksDevice* device, int32_t*
* @return ANEURALNETWORKS_NO_ERROR if successful.
*
* Available since NNAPI feature level 3.
+ * @deprecated NNAPI is deprecated. See
+ * <a href="https://source.android.com/docs/core/interaction/neural-networks">this webpage</a>
+ * for more details.
*/
int ANeuralNetworksDevice_getVersion(const ANeuralNetworksDevice* device, const char** version)
__NNAPI_INTRODUCED_IN(29);
@@ -455,6 +495,9 @@ int ANeuralNetworksDevice_getVersion(const ANeuralNetworksDevice* device, const
* @return ANEURALNETWORKS_NO_ERROR if successful.
*
* Available since NNAPI feature level 3.
+ * @deprecated NNAPI is deprecated. See
+ * <a href="https://source.android.com/docs/core/interaction/neural-networks">this webpage</a>
+ * for more details.
*/
int ANeuralNetworksDevice_getFeatureLevel(const ANeuralNetworksDevice* device,
int64_t* featureLevel) __NNAPI_INTRODUCED_IN(29);
@@ -472,6 +515,9 @@ int ANeuralNetworksDevice_getFeatureLevel(const ANeuralNetworksDevice* device,
* @return ANEURALNETWORKS_NO_ERROR if successful.
*
* Available since NNAPI feature level 4.
+ * @deprecated NNAPI is deprecated. See
+ * <a href="https://source.android.com/docs/core/interaction/neural-networks">this webpage</a>
+ * for more details.
*/
int ANeuralNetworksDevice_wait(const ANeuralNetworksDevice* device) __NNAPI_INTRODUCED_IN(30);
@@ -491,6 +537,9 @@ int ANeuralNetworksDevice_wait(const ANeuralNetworksDevice* device) __NNAPI_INTR
* @return ANEURALNETWORKS_NO_ERROR if successful.
*
* Available since NNAPI feature level 3.
+ * @deprecated NNAPI is deprecated. See
+ * <a href="https://source.android.com/docs/core/interaction/neural-networks">this webpage</a>
+ * for more details.
*/
int ANeuralNetworksModel_getSupportedOperationsForDevices(
const ANeuralNetworksModel* model, const ANeuralNetworksDevice* const* devices,
@@ -522,6 +571,9 @@ int ANeuralNetworksModel_getSupportedOperationsForDevices(
* if the model is invalid.
*
* Available since NNAPI feature level 3.
+ * @deprecated NNAPI is deprecated. See
+ * <a href="https://source.android.com/docs/core/interaction/neural-networks">this webpage</a>
+ * for more details.
*/
int ANeuralNetworksCompilation_createForDevices(ANeuralNetworksModel* model,
const ANeuralNetworksDevice* const* devices,
@@ -553,6 +605,9 @@ int ANeuralNetworksCompilation_createForDevices(ANeuralNetworksModel* model,
* @return ANEURALNETWORKS_NO_ERROR if successful.
*
* Available since NNAPI feature level 3.
+ * @deprecated NNAPI is deprecated. See
+ * <a href="https://source.android.com/docs/core/interaction/neural-networks">this webpage</a>
+ * for more details.
*/
int ANeuralNetworksCompilation_setCaching(ANeuralNetworksCompilation* compilation,
const char* cacheDir, const uint8_t* token)
@@ -596,6 +651,9 @@ int ANeuralNetworksCompilation_setCaching(ANeuralNetworksCompilation* compilatio
* @return ANEURALNETWORKS_NO_ERROR if the execution completed normally.
* ANEURALNETWORKS_UNMAPPABLE if the execution input or output memory cannot
* be properly mapped.
+ * @deprecated NNAPI is deprecated. See
+ * <a href="https://source.android.com/docs/core/interaction/neural-networks">this webpage</a>
+ * for more details.
*/
int ANeuralNetworksExecution_compute(ANeuralNetworksExecution* execution) __NNAPI_INTRODUCED_IN(29);
@@ -619,6 +677,9 @@ int ANeuralNetworksExecution_compute(ANeuralNetworksExecution* execution) __NNAP
* ANEURALNETWORKS_BAD_DATA if the index is invalid.
*
* Available since NNAPI feature level 3.
+ * @deprecated NNAPI is deprecated. See
+ * <a href="https://source.android.com/docs/core/interaction/neural-networks">this webpage</a>
+ * for more details.
*/
int ANeuralNetworksExecution_getOutputOperandRank(ANeuralNetworksExecution* execution,
int32_t index, uint32_t* rank)
@@ -645,6 +706,9 @@ int ANeuralNetworksExecution_getOutputOperandRank(ANeuralNetworksExecution* exec
* ANEURALNETWORKS_BAD_DATA if the index is invalid or if the target is a scalar.
*
* Available since NNAPI feature level 3.
+ * @deprecated NNAPI is deprecated. See
+ * <a href="https://source.android.com/docs/core/interaction/neural-networks">this webpage</a>
+ * for more details.
*/
int ANeuralNetworksExecution_getOutputOperandDimensions(ANeuralNetworksExecution* execution,
int32_t index, uint32_t* dimensions)
@@ -665,6 +729,9 @@ int ANeuralNetworksExecution_getOutputOperandDimensions(ANeuralNetworksExecution
*
* @return ANEURALNETWORKS_NO_ERROR if successful, ANEURALNETWORKS_BAD_DATA
* if the compilation is invalid.
+ * @deprecated NNAPI is deprecated. See
+ * <a href="https://source.android.com/docs/core/interaction/neural-networks">this webpage</a>
+ * for more details.
*/
int ANeuralNetworksBurst_create(ANeuralNetworksCompilation* compilation,
ANeuralNetworksBurst** burst) __NNAPI_INTRODUCED_IN(29);
@@ -676,6 +743,9 @@ int ANeuralNetworksBurst_create(ANeuralNetworksCompilation* compilation,
*
* @param burst The burst object to be destroyed. Passing NULL is acceptable and
* results in no operation.
+ * @deprecated NNAPI is deprecated. See
+ * <a href="https://source.android.com/docs/core/interaction/neural-networks">this webpage</a>
+ * for more details.
*/
void ANeuralNetworksBurst_free(ANeuralNetworksBurst* burst) __NNAPI_INTRODUCED_IN(29);
@@ -722,6 +792,9 @@ void ANeuralNetworksBurst_free(ANeuralNetworksBurst* burst) __NNAPI_INTRODUCED_I
* ANeuralNetworksCompilation} as the burst object.
*
* @return ANEURALNETWORKS_NO_ERROR if the execution completed normally.
+ * @deprecated NNAPI is deprecated. See
+ * <a href="https://source.android.com/docs/core/interaction/neural-networks">this webpage</a>
+ * for more details.
*/
int ANeuralNetworksExecution_burstCompute(ANeuralNetworksExecution* execution,
ANeuralNetworksBurst* burst) __NNAPI_INTRODUCED_IN(29);
@@ -758,6 +831,9 @@ int ANeuralNetworksExecution_burstCompute(ANeuralNetworksExecution* execution,
* @return ANEURALNETWORKS_NO_ERROR if the request completed normally.
*
* @see AHardwareBuffer
+ * @deprecated NNAPI is deprecated. See
+ * <a href="https://source.android.com/docs/core/interaction/neural-networks">this webpage</a>
+ * for more details.
*/
#ifdef __ANDROID__
int ANeuralNetworksMemory_createFromAHardwareBuffer(const AHardwareBuffer* ahwb,
@@ -789,6 +865,9 @@ int ANeuralNetworksMemory_createFromAHardwareBuffer(const AHardwareBuffer* ahwb,
* @param measure 'true' if duration is to be measured, 'false' if not.
*
* @return ANEURALNETWORKS_NO_ERROR if successful.
+ * @deprecated NNAPI is deprecated. See
+ * <a href="https://source.android.com/docs/core/interaction/neural-networks">this webpage</a>
+ * for more details.
*/
int ANeuralNetworksExecution_setMeasureTiming(ANeuralNetworksExecution* execution, bool measure)
__NNAPI_INTRODUCED_IN(29);
@@ -814,6 +893,9 @@ int ANeuralNetworksExecution_setMeasureTiming(ANeuralNetworksExecution* executio
* @return ANEURALNETWORKS_NO_ERROR if successful.
*
* Available since NNAPI feature level 3.
+ * @deprecated NNAPI is deprecated. See
+ * <a href="https://source.android.com/docs/core/interaction/neural-networks">this webpage</a>
+ * for more details.
*/
int ANeuralNetworksExecution_getDuration(const ANeuralNetworksExecution* execution,
int32_t durationCode, uint64_t* duration)
@@ -842,6 +924,9 @@ int ANeuralNetworksExecution_getDuration(const ANeuralNetworksExecution* executi
* Set to NULL if unsuccessful.
*
* @return ANEURALNETWORKS_NO_ERROR if the request completed normally.
+ * @deprecated NNAPI is deprecated. See
+ * <a href="https://source.android.com/docs/core/interaction/neural-networks">this webpage</a>
+ * for more details.
*/
int ANeuralNetworksMemory_createFromFd(size_t size, int protect, int fd, size_t offset,
ANeuralNetworksMemory** memory) __NNAPI_INTRODUCED_IN(27);
@@ -857,6 +942,9 @@ int ANeuralNetworksMemory_createFromFd(size_t size, int protect, int fd, size_t
*
* @param memory The memory object to be freed. Passing NULL is acceptable and
* results in no operation.
+ * @deprecated NNAPI is deprecated. See
+ * <a href="https://source.android.com/docs/core/interaction/neural-networks">this webpage</a>
+ * for more details.
*/
void ANeuralNetworksMemory_free(ANeuralNetworksMemory* memory) __NNAPI_INTRODUCED_IN(27);
@@ -885,6 +973,9 @@ void ANeuralNetworksMemory_free(ANeuralNetworksMemory* memory) __NNAPI_INTRODUCE
* Set to NULL if unsuccessful.
*
* @return ANEURALNETWORKS_NO_ERROR if successful.
+ * @deprecated NNAPI is deprecated. See
+ * <a href="https://source.android.com/docs/core/interaction/neural-networks">this webpage</a>
+ * for more details.
*/
int ANeuralNetworksModel_create(ANeuralNetworksModel** model) __NNAPI_INTRODUCED_IN(27);
@@ -900,6 +991,9 @@ int ANeuralNetworksModel_create(ANeuralNetworksModel** model) __NNAPI_INTRODUCED
*
* @param model The model to be destroyed. Passing NULL is acceptable and
* results in no operation.
+ * @deprecated NNAPI is deprecated. See
+ * <a href="https://source.android.com/docs/core/interaction/neural-networks">this webpage</a>
+ * for more details.
*/
void ANeuralNetworksModel_free(ANeuralNetworksModel* model) __NNAPI_INTRODUCED_IN(27);
@@ -920,6 +1014,9 @@ void ANeuralNetworksModel_free(ANeuralNetworksModel* model) __NNAPI_INTRODUCED_I
* @param model The model to be finished.
*
* @return ANEURALNETWORKS_NO_ERROR if successful.
+ * @deprecated NNAPI is deprecated. See
+ * <a href="https://source.android.com/docs/core/interaction/neural-networks">this webpage</a>
+ * for more details.
*/
int ANeuralNetworksModel_finish(ANeuralNetworksModel* model) __NNAPI_INTRODUCED_IN(27);
@@ -972,6 +1069,9 @@ int ANeuralNetworksModel_finish(ANeuralNetworksModel* model) __NNAPI_INTRODUCED_
* {@link ANeuralNetworksModel_addOperand}.
*
* @return ANEURALNETWORKS_NO_ERROR if successful.
+ * @deprecated NNAPI is deprecated. See
+ * <a href="https://source.android.com/docs/core/interaction/neural-networks">this webpage</a>
+ * for more details.
*/
int ANeuralNetworksModel_addOperand(ANeuralNetworksModel* model,
const ANeuralNetworksOperandType* type)
@@ -1011,6 +1111,9 @@ int ANeuralNetworksModel_addOperand(ANeuralNetworksModel* model,
* @param length The size in bytes of the data value.
*
* @return ANEURALNETWORKS_NO_ERROR if successful.
+ * @deprecated NNAPI is deprecated. See
+ * <a href="https://source.android.com/docs/core/interaction/neural-networks">this webpage</a>
+ * for more details.
*/
int ANeuralNetworksModel_setOperandValue(ANeuralNetworksModel* model, int32_t index,
const void* buffer, size_t length)
@@ -1034,6 +1137,9 @@ int ANeuralNetworksModel_setOperandValue(ANeuralNetworksModel* model, int32_t in
* this function.
*
* @return ANEURALNETWORKS_NO_ERROR if successful.
+ * @deprecated NNAPI is deprecated. See
+ * <a href="https://source.android.com/docs/core/interaction/neural-networks">this webpage</a>
+ * for more details.
*/
int ANeuralNetworksModel_setOperandSymmPerChannelQuantParams(
ANeuralNetworksModel* model, int32_t index,
@@ -1076,6 +1182,9 @@ int ANeuralNetworksModel_setOperandSymmPerChannelQuantParams(
* @param length The size in bytes of the data value.
*
* @return ANEURALNETWORKS_NO_ERROR if successful.
+ * @deprecated NNAPI is deprecated. See
+ * <a href="https://source.android.com/docs/core/interaction/neural-networks">this webpage</a>
+ * for more details.
*/
int ANeuralNetworksModel_setOperandValueFromMemory(ANeuralNetworksModel* model, int32_t index,
const ANeuralNetworksMemory* memory,
@@ -1106,6 +1215,9 @@ int ANeuralNetworksModel_setOperandValueFromMemory(ANeuralNetworksModel* model,
* @param value The model to be referenced.
*
* @return ANEURALNETWORKS_NO_ERROR if successful.
+ * @deprecated NNAPI is deprecated. See
+ * <a href="https://source.android.com/docs/core/interaction/neural-networks">this webpage</a>
+ * for more details.
*/
int ANeuralNetworksModel_setOperandValueFromModel(ANeuralNetworksModel* model, int32_t index,
const ANeuralNetworksModel* value)
@@ -1132,6 +1244,9 @@ int ANeuralNetworksModel_setOperandValueFromModel(ANeuralNetworksModel* model, i
* Available since NNAPI feature level 1.
*
* @return ANEURALNETWORKS_NO_ERROR if successful.
+ * @deprecated NNAPI is deprecated. See
+ * <a href="https://source.android.com/docs/core/interaction/neural-networks">this webpage</a>
+ * for more details.
*/
int ANeuralNetworksModel_addOperation(ANeuralNetworksModel* model,
ANeuralNetworksOperationType type, uint32_t inputCount,
@@ -1161,6 +1276,9 @@ int ANeuralNetworksModel_addOperation(ANeuralNetworksModel* model,
*
* Available since NNAPI feature level 1.
*
+ * @deprecated NNAPI is deprecated. See
+ * <a href="https://source.android.com/docs/core/interaction/neural-networks">this webpage</a>
+ * for more details.
*/
int ANeuralNetworksModel_identifyInputsAndOutputs(ANeuralNetworksModel* model, uint32_t inputCount,
const uint32_t* inputs, uint32_t outputCount,
@@ -1191,6 +1309,9 @@ int ANeuralNetworksModel_identifyInputsAndOutputs(ANeuralNetworksModel* model, u
* Available since NNAPI feature level 2.
*
* See {@link ANeuralNetworksModel} for information on multithreaded usage.
+ * @deprecated NNAPI is deprecated. See
+ * <a href="https://source.android.com/docs/core/interaction/neural-networks">this webpage</a>
+ * for more details.
*/
int ANeuralNetworksModel_relaxComputationFloat32toFloat16(ANeuralNetworksModel* model, bool allow)
__NNAPI_INTRODUCED_IN(28);
@@ -1225,6 +1346,9 @@ int ANeuralNetworksModel_relaxComputationFloat32toFloat16(ANeuralNetworksModel*
*
* @return ANEURALNETWORKS_NO_ERROR if successful, ANEURALNETWORKS_BAD_DATA
* if the model is invalid.
+ * @deprecated NNAPI is deprecated. See
+ * <a href="https://source.android.com/docs/core/interaction/neural-networks">this webpage</a>
+ * for more details.
*/
int ANeuralNetworksCompilation_create(ANeuralNetworksModel* model,
ANeuralNetworksCompilation** compilation)
@@ -1242,6 +1366,9 @@ int ANeuralNetworksCompilation_create(ANeuralNetworksModel* model,
*
* @param compilation The compilation to be destroyed. Passing NULL is acceptable and
* results in no operation.
+ * @deprecated NNAPI is deprecated. See
+ * <a href="https://source.android.com/docs/core/interaction/neural-networks">this webpage</a>
+ * for more details.
*/
void ANeuralNetworksCompilation_free(ANeuralNetworksCompilation* compilation)
__NNAPI_INTRODUCED_IN(27);
@@ -1262,6 +1389,9 @@ void ANeuralNetworksCompilation_free(ANeuralNetworksCompilation* compilation)
* {@link ANEURALNETWORKS_PREFER_SUSTAINED_SPEED}.
*
* @return ANEURALNETWORKS_NO_ERROR if successful.
+ * @deprecated NNAPI is deprecated. See
+ * <a href="https://source.android.com/docs/core/interaction/neural-networks">this webpage</a>
+ * for more details.
*/
int ANeuralNetworksCompilation_setPreference(ANeuralNetworksCompilation* compilation,
int32_t preference) __NNAPI_INTRODUCED_IN(27);
@@ -1288,6 +1418,9 @@ int ANeuralNetworksCompilation_setPreference(ANeuralNetworksCompilation* compila
* @param compilation The compilation to be finished.
*
* @return ANEURALNETWORKS_NO_ERROR if successful.
+ * @deprecated NNAPI is deprecated. See
+ * <a href="https://source.android.com/docs/core/interaction/neural-networks">this webpage</a>
+ * for more details.
*/
int ANeuralNetworksCompilation_finish(ANeuralNetworksCompilation* compilation)
__NNAPI_INTRODUCED_IN(27);
@@ -1314,6 +1447,9 @@ int ANeuralNetworksCompilation_finish(ANeuralNetworksCompilation* compilation)
* ANEURALNETWORKS_PRIORITY_*.
*
* @return ANEURALNETWORKS_NO_ERROR if successful.
+ * @deprecated NNAPI is deprecated. See
+ * <a href="https://source.android.com/docs/core/interaction/neural-networks">this webpage</a>
+ * for more details.
*/
int ANeuralNetworksCompilation_setPriority(ANeuralNetworksCompilation* compilation, int priority)
__NNAPI_INTRODUCED_IN(30);
@@ -1357,6 +1493,9 @@ int ANeuralNetworksCompilation_setPriority(ANeuralNetworksCompilation* compilati
* @return ANEURALNETWORKS_NO_ERROR if successful.
*
* Available since NNAPI feature level 4.
+ * @deprecated NNAPI is deprecated. See
+ * <a href="https://source.android.com/docs/core/interaction/neural-networks">this webpage</a>
+ * for more details.
*/
int ANeuralNetworksCompilation_setTimeout(ANeuralNetworksCompilation* compilation,
uint64_t duration) __NNAPI_INTRODUCED_IN(30);
@@ -1380,6 +1519,9 @@ int ANeuralNetworksCompilation_setTimeout(ANeuralNetworksCompilation* compilatio
*
* @return ANEURALNETWORKS_NO_ERROR if successful, ANEURALNETWORKS_BAD_DATA
* if the compilation is invalid.
+ * @deprecated NNAPI is deprecated. See
+ * <a href="https://source.android.com/docs/core/interaction/neural-networks">this webpage</a>
+ * for more details.
*/
int ANeuralNetworksExecution_create(ANeuralNetworksCompilation* compilation,
ANeuralNetworksExecution** execution) __NNAPI_INTRODUCED_IN(27);
@@ -1404,6 +1546,9 @@ int ANeuralNetworksExecution_create(ANeuralNetworksCompilation* compilation,
*
* @param execution The execution to be destroyed. Passing NULL is acceptable and
* results in no operation.
+ * @deprecated NNAPI is deprecated. See
+ * <a href="https://source.android.com/docs/core/interaction/neural-networks">this webpage</a>
+ * for more details.
*/
void ANeuralNetworksExecution_free(ANeuralNetworksExecution* execution) __NNAPI_INTRODUCED_IN(27);
@@ -1462,6 +1607,9 @@ void ANeuralNetworksExecution_free(ANeuralNetworksExecution* execution) __NNAPI_
*
* @return ANEURALNETWORKS_NO_ERROR if successful, ANEURALNETWORKS_BAD_DATA if the
* name is not recognized or the buffer is too small for the input.
+ * @deprecated NNAPI is deprecated. See
+ * <a href="https://source.android.com/docs/core/interaction/neural-networks">this webpage</a>
+ * for more details.
*/
int ANeuralNetworksExecution_setInput(ANeuralNetworksExecution* execution, int32_t index,
const ANeuralNetworksOperandType* type, const void* buffer,
@@ -1532,6 +1680,9 @@ int ANeuralNetworksExecution_setInput(ANeuralNetworksExecution* execution, int32
*
* @return ANEURALNETWORKS_NO_ERROR if successful, ANEURALNETWORKS_BAD_DATA if the
* name is not recognized or the buffer is too small for the input.
+ * @deprecated NNAPI is deprecated. See
+ * <a href="https://source.android.com/docs/core/interaction/neural-networks">this webpage</a>
+ * for more details.
*/
int ANeuralNetworksExecution_setInputFromMemory(ANeuralNetworksExecution* execution, int32_t index,
const ANeuralNetworksOperandType* type,
@@ -1597,6 +1748,9 @@ int ANeuralNetworksExecution_setInputFromMemory(ANeuralNetworksExecution* execut
*
* @return ANEURALNETWORKS_NO_ERROR if successful, ANEURALNETWORKS_BAD_DATA if the
* name is not recognized or the buffer is too small for the output.
+ * @deprecated NNAPI is deprecated. See
+ * <a href="https://source.android.com/docs/core/interaction/neural-networks">this webpage</a>
+ * for more details.
*/
int ANeuralNetworksExecution_setOutput(ANeuralNetworksExecution* execution, int32_t index,
const ANeuralNetworksOperandType* type, void* buffer,
@@ -1672,6 +1826,9 @@ int ANeuralNetworksExecution_setOutput(ANeuralNetworksExecution* execution, int3
*
* @return ANEURALNETWORKS_NO_ERROR if successful, ANEURALNETWORKS_BAD_DATA if the
* name is not recognized or the buffer is too small for the output.
+ * @deprecated NNAPI is deprecated. See
+ * <a href="https://source.android.com/docs/core/interaction/neural-networks">this webpage</a>
+ * for more details.
*/
int ANeuralNetworksExecution_setOutputFromMemory(ANeuralNetworksExecution* execution, int32_t index,
const ANeuralNetworksOperandType* type,
@@ -1729,6 +1886,9 @@ int ANeuralNetworksExecution_setOutputFromMemory(ANeuralNetworksExecution* execu
* NULL if there's an error.
*
* @return ANEURALNETWORKS_NO_ERROR if the evaluation is successfully scheduled.
+ * @deprecated NNAPI is deprecated. See
+ * <a href="https://source.android.com/docs/core/interaction/neural-networks">this webpage</a>
+ * for more details.
*/
int ANeuralNetworksExecution_startCompute(ANeuralNetworksExecution* execution,
ANeuralNetworksEvent** event) __NNAPI_INTRODUCED_IN(27);
@@ -1778,6 +1938,9 @@ int ANeuralNetworksExecution_startCompute(ANeuralNetworksExecution* execution,
* @return ANEURALNETWORKS_NO_ERROR if successful.
*
* Available since NNAPI feature level 4.
+ * @deprecated NNAPI is deprecated. See
+ * <a href="https://source.android.com/docs/core/interaction/neural-networks">this webpage</a>
+ * for more details.
*/
int ANeuralNetworksExecution_setTimeout(ANeuralNetworksExecution* execution, uint64_t duration)
__NNAPI_INTRODUCED_IN(30);
@@ -1809,6 +1972,9 @@ int ANeuralNetworksExecution_setTimeout(ANeuralNetworksExecution* execution, uin
* ANEURALNETWORKS_UNEXPECTED_NULL if execution is NULL.
*
* Available since NNAPI feature level 4.
+ * @deprecated NNAPI is deprecated. See
+ * <a href="https://source.android.com/docs/core/interaction/neural-networks">this webpage</a>
+ * for more details.
*/
int ANeuralNetworksExecution_setLoopTimeout(ANeuralNetworksExecution* execution, uint64_t duration)
__NNAPI_INTRODUCED_IN(30);
@@ -1819,6 +1985,9 @@ int ANeuralNetworksExecution_setLoopTimeout(ANeuralNetworksExecution* execution,
* @return The default timeout value in nanoseconds.
*
* Available since NNAPI feature level 4.
+ * @deprecated NNAPI is deprecated. See
+ * <a href="https://source.android.com/docs/core/interaction/neural-networks">this webpage</a>
+ * for more details.
*/
uint64_t ANeuralNetworks_getDefaultLoopTimeout() __NNAPI_INTRODUCED_IN(30);
@@ -1828,6 +1997,9 @@ uint64_t ANeuralNetworks_getDefaultLoopTimeout() __NNAPI_INTRODUCED_IN(30);
* @return The maximum timeout value in nanoseconds.
*
* Available since NNAPI feature level 4.
+ * @deprecated NNAPI is deprecated. See
+ * <a href="https://source.android.com/docs/core/interaction/neural-networks">this webpage</a>
+ * for more details.
*/
uint64_t ANeuralNetworks_getMaximumLoopTimeout() __NNAPI_INTRODUCED_IN(30);
@@ -1855,6 +2027,9 @@ uint64_t ANeuralNetworks_getMaximumLoopTimeout() __NNAPI_INTRODUCED_IN(30);
* @return ANEURALNETWORKS_NO_ERROR if the execution completed normally.
* ANEURALNETWORKS_UNMAPPABLE if the execution input or output memory cannot
* be properly mapped.
+ * @deprecated NNAPI is deprecated. See
+ * <a href="https://source.android.com/docs/core/interaction/neural-networks">this webpage</a>
+ * for more details.
*/
int ANeuralNetworksEvent_wait(ANeuralNetworksEvent* event) __NNAPI_INTRODUCED_IN(27);
@@ -1867,6 +2042,9 @@ int ANeuralNetworksEvent_wait(ANeuralNetworksEvent* event) __NNAPI_INTRODUCED_IN
*
* @param event The event object to be destroyed. Passing NULL is acceptable and
* results in no operation.
+ * @deprecated NNAPI is deprecated. See
+ * <a href="https://source.android.com/docs/core/interaction/neural-networks">this webpage</a>
+ * for more details.
*/
void ANeuralNetworksEvent_free(ANeuralNetworksEvent* event) __NNAPI_INTRODUCED_IN(27);
@@ -1882,6 +2060,9 @@ void ANeuralNetworksEvent_free(ANeuralNetworksEvent* event) __NNAPI_INTRODUCED_I
* @return ANEURALNETWORKS_NO_ERROR if successful.
*
* Available since NNAPI feature level 4.
+ * @deprecated NNAPI is deprecated. See
+ * <a href="https://source.android.com/docs/core/interaction/neural-networks">this webpage</a>
+ * for more details.
*/
int ANeuralNetworksEvent_createFromSyncFenceFd(int sync_fence_fd, ANeuralNetworksEvent** event)
__NNAPI_INTRODUCED_IN(30);
@@ -1906,6 +2087,9 @@ int ANeuralNetworksEvent_createFromSyncFenceFd(int sync_fence_fd, ANeuralNetwork
* @return ANEURALNETWORKS_NO_ERROR if successful.
*
* Available since NNAPI feature level 4.
+ * @deprecated NNAPI is deprecated. See
+ * <a href="https://source.android.com/docs/core/interaction/neural-networks">this webpage</a>
+ * for more details.
*/
int ANeuralNetworksEvent_getSyncFenceFd(const ANeuralNetworksEvent* event, int* sync_fence_fd)
__NNAPI_INTRODUCED_IN(30);
@@ -1985,6 +2169,9 @@ int ANeuralNetworksEvent_getSyncFenceFd(const ANeuralNetworksEvent* event, int*
* @return ANEURALNETWORKS_NO_ERROR if the evaluation is successfully scheduled.
*
* Available since NNAPI feature level 4.
+ * @deprecated NNAPI is deprecated. See
+ * <a href="https://source.android.com/docs/core/interaction/neural-networks">this webpage</a>
+ * for more details.
*/
int ANeuralNetworksExecution_startComputeWithDependencies(
ANeuralNetworksExecution* execution, const ANeuralNetworksEvent* const* dependencies,
@@ -2025,6 +2212,9 @@ int ANeuralNetworksExecution_startComputeWithDependencies(
* It is NOT an Android API level.
*
* Available since NNAPI feature level 5.
+ * @deprecated NNAPI is deprecated. See
+ * <a href="https://source.android.com/docs/core/interaction/neural-networks">this webpage</a>
+ * for more details.
*/
int64_t ANeuralNetworks_getRuntimeFeatureLevel() __NNAPI_INTRODUCED_IN(31);
@@ -2061,6 +2251,9 @@ int64_t ANeuralNetworks_getRuntimeFeatureLevel() __NNAPI_INTRODUCED_IN(31);
* {@link ANeuralNetworksExecution_setOutputFromMemory} has been called on the execution.
*
* Available since NNAPI feature level 5.
+ * @deprecated NNAPI is deprecated. See
+ * <a href="https://source.android.com/docs/core/interaction/neural-networks">this webpage</a>
+ * for more details.
*/
int ANeuralNetworksExecution_enableInputAndOutputPadding(ANeuralNetworksExecution* execution,
bool enable) __NNAPI_INTRODUCED_IN(31);
@@ -2092,6 +2285,9 @@ int ANeuralNetworksExecution_enableInputAndOutputPadding(ANeuralNetworksExecutio
* ANEURALNETWORKS_BAD_DATA if the index is out of range.
*
* Available since NNAPI feature level 5.
+ * @deprecated NNAPI is deprecated. See
+ * <a href="https://source.android.com/docs/core/interaction/neural-networks">this webpage</a>
+ * for more details.
*/
int ANeuralNetworksCompilation_getPreferredMemoryAlignmentForInput(
const ANeuralNetworksCompilation* compilation, uint32_t index, uint32_t* alignment)
@@ -2130,6 +2326,9 @@ int ANeuralNetworksCompilation_getPreferredMemoryAlignmentForInput(
* ANEURALNETWORKS_BAD_DATA if the index is out of range.
*
* Available since NNAPI feature level 5.
+ * @deprecated NNAPI is deprecated. See
+ * <a href="https://source.android.com/docs/core/interaction/neural-networks">this webpage</a>
+ * for more details.
*/
int ANeuralNetworksCompilation_getPreferredMemoryPaddingForInput(
const ANeuralNetworksCompilation* compilation, uint32_t index, uint32_t* padding)
@@ -2162,6 +2361,9 @@ int ANeuralNetworksCompilation_getPreferredMemoryPaddingForInput(
* ANEURALNETWORKS_BAD_DATA if the index is out of range.
*
* Available since NNAPI feature level 5.
+ * @deprecated NNAPI is deprecated. See
+ * <a href="https://source.android.com/docs/core/interaction/neural-networks">this webpage</a>
+ * for more details.
*/
int ANeuralNetworksCompilation_getPreferredMemoryAlignmentForOutput(
const ANeuralNetworksCompilation* compilation, uint32_t index, uint32_t* alignment)
@@ -2200,6 +2402,9 @@ int ANeuralNetworksCompilation_getPreferredMemoryAlignmentForOutput(
* ANEURALNETWORKS_BAD_DATA if the index is out of range.
*
* Available since NNAPI feature level 5.
+ * @deprecated NNAPI is deprecated. See
+ * <a href="https://source.android.com/docs/core/interaction/neural-networks">this webpage</a>
+ * for more details.
*/
int ANeuralNetworksCompilation_getPreferredMemoryPaddingForOutput(
const ANeuralNetworksCompilation* compilation, uint32_t index, uint32_t* padding)
@@ -2229,6 +2434,9 @@ int ANeuralNetworksCompilation_getPreferredMemoryPaddingForOutput(
* ANEURALNETWORKS_BAD_STATE if the execution is not in the preparation state.
*
* Available since NNAPI feature level 5.
+ * @deprecated NNAPI is deprecated. See
+ * <a href="https://source.android.com/docs/core/interaction/neural-networks">this webpage</a>
+ * for more details.
*/
int ANeuralNetworksExecution_setReusable(ANeuralNetworksExecution* execution, bool reusable)
__NNAPI_INTRODUCED_IN(31);