1 /* 2 * Copyright (C) 2021 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 #pragma once 18 19 /****************************************************************** 20 * 21 * IMPORTANT NOTICE: 22 * 23 * This file is part of Android's set of stable system headers 24 * exposed by the Android NDK (Native Development Kit). 25 * 26 * Third-party source AND binary code relies on the definitions 27 * here to be FROZEN ON ALL UPCOMING PLATFORM RELEASES. 28 * 29 * - DO NOT MODIFY ENUMS (EXCEPT IF YOU ADD NEW 32-BIT VALUES) 30 * - DO NOT MODIFY CONSTANTS OR FUNCTIONAL MACROS 31 * - DO NOT CHANGE THE SIGNATURE OF FUNCTIONS IN ANY WAY 32 * - DO NOT CHANGE THE LAYOUT OR SIZE OF STRUCTURES 33 */ 34 35 #include <stdint.h> 36 #include <stdio.h> 37 #include <stdlib.h> 38 39 #include <NeuralNetworksTypes.h> 40 41 __BEGIN_DECLS 42 43 /** 44 * Performance information for the reference workload. 45 * 46 * Used by a driver to report its performance characteristics. 47 */ 48 typedef struct { 49 /** 50 * Ratio of the time taken by the driver to execute the workload compared to the time the CPU 51 * would take for the same workload. A lower number is better. 52 */ 53 float execTime; 54 55 /** 56 * Ratio of the energy used by the driver compared to what the CPU would use for doing the same 57 * workload. A lower number is better. 58 */ 59 float powerUsage; 60 } SL_ANeuralNetworksPerformanceInfo; 61 62 /** 63 * Driver performance when operating on a particular data type. In the case of float32 data, this is 64 * used when the calculations are not relaxed. 65 */ 66 typedef struct { 67 int32_t operandType; 68 SL_ANeuralNetworksPerformanceInfo performanceInfo; 69 } SL_ANeuralNetworksOperandPerformanceInfo; 70 71 /** 72 * Information about NNAPI Vendor extension operand type. 73 */ 74 typedef struct { 75 /** 76 * The byte size of the operand (if scalar) or of a single element (if tensor). 77 */ 78 uint32_t byteSize; 79 80 /** 81 * The extension operand type. 82 */ 83 uint16_t type; 84 85 /** 86 * Indicates whether the extension operand type represents a tensor or a scalar. 87 */ 88 bool isTensor; 89 } SL_ANeuralNetworksExtensionOperandTypeInformation; 90 91 /** 92 * The different performance info kinds. 93 */ 94 typedef enum { 95 /** 96 * Driver performance when operating on float32 data but performing calculations with range 97 * and/or precision as low as that of the IEEE 754 16-bit floating-point format. 98 */ 99 SL_ANEURALNETWORKS_CAPABILITIES_PERFORMANCE_RELAXED_SCALAR = 0, 100 101 /** 102 * Driver performance when operating on float32 data but performing calculations with range 103 * and/or precision as low as that of the IEEE 754 16-bit floating-point format. 104 */ 105 SL_ANEURALNETWORKS_CAPABILITIES_PERFORMANCE_RELAXED_TENSOR = 1, 106 107 /** 108 * Performance of an {@link ANEURALNETWORKS_IF} operation is the sum of {@link 109 * ANEURALNETWORKS_IF}'s performance and the mean of performance for the two branch subgraphs, 110 * where performance for a subgraph is the sum of the performance of all operations within the 111 * subgraph. 112 */ 113 SL_ANEURALNETWORKS_CAPABILITIES_PERFORMANCE_IF = 2, 114 115 /** 116 * Performance of a {@link ANEURALNETWORKS_WHILE} operation is the sum of {@link 117 * ANEURALNETWORKS_WHILE}'s performance, performance for the condition subgraph and performance 118 * for the body subgraph, where performance for a subgraph is the sum of the performance of all 119 * operations within the subgraph. 120 */ 121 SL_ANEURALNETWORKS_CAPABILITIES_PERFORMANCE_WHILE = 3, 122 } SL_ANeuralNetworksPerformanceInfoCode; 123 124 /** 125 * Sets the compilation caching signature and file descriptors. 126 * 127 * Provides optional caching information to the support library driver for 128 * faster repeated compilation. 129 * 130 * See {@link ANeuralNetworksCompilation} for information on multithreaded usage. 131 * 132 * @param compilation The compilation to be modified. 133 * @param modelCacheFds An array of file descriptors for the security-sensitive cache. 134 * The file descriptors will be duplicated. 135 * @param numModelCacheFiles The number of the model cache files. 136 * @param dataCacheFds An array of file descriptors for the constants' cache. 137 * The file descriptors will be duplicated. 138 * @param numDataCacheFiles The number of the data cache files. 139 * @param token The token provided by the user to specify a model must be of length 140 * ANEURALNETWORKS_BYTE_SIZE_OF_CACHE_TOKEN. The user should ensure that 141 * the token is unique to a model within the application. The NNAPI 142 * runtime cannot detect token collisions; a collision will result in a 143 * failed execution or in a successful execution that produces incorrect 144 * output values. 145 * 146 * @return ANEURALNETWORKS_NO_ERROR if successful. 147 * 148 * Available in the compabibility library build only. 149 */ 150 int SL_ANeuralNetworksCompilation_setCachingFromFds(ANeuralNetworksCompilation* compilation, 151 const int* modelCacheFds, 152 const uint32_t numModelCacheFiles, 153 const int* dataCacheFds, 154 const uint32_t numDataCacheFiles, 155 const uint8_t* token); 156 157 /** 158 * Gets the caching requirements of the driver implementation. 159 * 160 * There are two types of cache file descriptors provided to the driver: model cache and data cache. 161 * 162 * The data cache is for caching constant data, possibly including preprocessed and transformed 163 * tensor buffers. Any modification to the data cache should have no worse effect than generating 164 * bad output values at execution time. 165 * 166 * The model cache is for caching security-sensitive data such as compiled executable machine code 167 * in the device's native binary format. A modification to the model cache may affect the driver's 168 * execution behavior, and a malicious client could make use of this to execute beyond the granted 169 * permission. 170 * 171 * ANeuralNetworksDevice_getNumberOfCacheFilesNeeded returns how many of each type of cache files 172 * the driver implementation needs to cache a single compilation. Returning 0 for both types 173 * indicates compilation caching is not supported by this driver. The driver may still choose not to 174 * cache certain compiled models even if it reports that caching is supported. 175 * 176 * @param device The representation of the specified device. 177 * @param numModelCacheFiles The number of the model cache files. A value of 0 is returned on error. 178 * @param numDataCacheFiles The number of the data cache files. A value of 0 is returned on error. 179 * 180 * @return ANEURALNETWORKS_NO_ERROR if successful. 181 * 182 * Available in the compabibility library build only. 183 */ 184 int SL_ANeuralNetworksDevice_getNumberOfCacheFilesNeeded(const ANeuralNetworksDevice* device, 185 uint32_t* numModelCacheFiles, 186 uint32_t* numDataCacheFiles); 187 188 /** 189 * Get NNAPI Device performance/power capabilities. 190 * 191 * This returns performance of non-extension operations. 192 * 193 * Performance of an operation other than {@link ANEURALNETWORKS_IF} and {@link 194 * ANEURALNETWORKS_WHILE} comes from the type of its first operand. 195 * 196 * @param device The representation of the specified device. 197 * @param performanceInfoKind The kind of performance info to be queried. Must be one of the values 198 * from {@link SL_ANeuralNetworksPerformanceInfoCode}. 199 * @return ANEURALNETWORKS_NO_ERROR if successful. 200 * 201 * Available in the compabibility library build only. 202 */ 203 int SL_ANeuralNetworksDevice_getPerformanceInfo(const ANeuralNetworksDevice* device, 204 int32_t performanceInfoKind, 205 SL_ANeuralNetworksPerformanceInfo* performanceInfo); 206 207 /** 208 * Get NNAPI Device operand performance/power capabilities. 209 * 210 * This returns performance of non-extension operations. 211 * 212 * Performance of an operation other than {@link ANEURALNETWORKS_IF} and {@link 213 * ANEURALNETWORKS_WHILE} comes from the type of its first operand. 214 * 215 * @param device The representation of the specified device. 216 * @param context Context to pass to the callback. 217 * @param callback Callback taking operand performance and context. 218 * @return ANEURALNETWORKS_NO_ERROR if successful. 219 * 220 * Available in the compabibility library build only. 221 */ 222 int SL_ANeuralNetworksDevice_forEachOperandPerformanceInfo( 223 const ANeuralNetworksDevice* device, void* context, 224 void (*callback)(SL_ANeuralNetworksOperandPerformanceInfo, void*)); 225 226 /** 227 * Get the number of extensions supported by the driver implementation. 228 * 229 * @param device The representation of the specified device. 230 * @param vendorExtensionCount The number of vendor extensions the device supports. To be used in 231 * {@link ANeuralNetworksDevice_getVendorExtensionName} and {@link 232 * ANeuralNetworksDevice_forEachVendorExtensionOperandTypeInformation}. 233 * @return ANEURALNETWORKS_NO_ERROR if successful. 234 * 235 * Available in the compabibility library build only. 236 */ 237 int SL_ANeuralNetworksDevice_getVendorExtensionCount(const ANeuralNetworksDevice* device, 238 uint32_t* vendorExtensionCount); 239 240 /** 241 * Gets information about a specified extension supported by the driver implementation. 242 * 243 * @param device The representation of the specified device. 244 * @param vendorExtensionIndex The index of the specified vendor extension. Must be less than the 245 * number of available vendor extensions. 246 * @param extensionName Name of the NNAPI HAL Extension. 247 * @return ANEURALNETWORKS_NO_ERROR if successful. 248 * 249 * Available in the compabibility library build only. 250 */ 251 int SL_ANeuralNetworksDevice_getVendorExtensionName(const ANeuralNetworksDevice* device, 252 uint32_t vendorExtensionIndex, 253 const char** extensionName); 254 255 /** 256 * Gets a specified extension's operand type information supported by the driver implementation. 257 * 258 * @param device The representation of the specified device. 259 * @param vendorExtensionIndex The index of the specified vendor extension. Must be less than the 260 * number of available vendor extensions. 261 * @param context Context to pass to the callback. 262 * @param callback Callback taking operand type information and context. 263 * @return ANEURALNETWORKS_NO_ERROR if successful. 264 * 265 * Available in the compabibility library build only. 266 */ 267 int SL_ANeuralNetworksDevice_forEachVendorExtensionOperandTypeInformation( 268 const ANeuralNetworksDevice* device, uint32_t vendorExtensionIndex, void* context, 269 void (*callback)(SL_ANeuralNetworksExtensionOperandTypeInformation, void*)); 270 271 /** 272 * Base version of NnApiSLDriverImpl with version information. 273 * 274 * NnApiSLDriverImpl is non-opaque, versioning struct to make it possible to pass 275 * its instance straight from the SL Driver to the shim registration. The glue code 276 * that loads the SL and calls the shim is non-updatable. An opaque struct would require the 277 * glue code to be updated if we would like to use newer NNAPI Feature Level. 278 * 279 * There's expectation that for M>N, NnApiSLDriverImplFL(M) is 280 * a strict superset of NnApiSLDriverImplFL(N), and NnApiSLDriverImplFL(M)* can 281 * be reinterpret_cast to NnApiSLDriverImplFL(N)* safely. 282 */ 283 typedef struct { 284 /** 285 * Version of the NnApiSLDriverImpl struct. Uses {@link FeatureLevelCode} values 286 * for versioning. 287 */ 288 int64_t implFeatureLevel; 289 } NnApiSLDriverImpl; 290 291 /** 292 * NnApiSLDriverImpl for an Updatable SL Driver implementing {@link 293 * ANEURALNETWORKS_FEATURE_LEVEL_5}. 294 * 295 * This struct must set its implFeatureLevel to {@link ANEURALNETWORKS_FEATURE_LEVEL_5}. 296 */ 297 typedef struct { 298 /** 299 * Base type with version information. Allows to cast a pointer of this type 300 * to NnApiSLDriverImpl* with valid version information. 301 * For this type, its .version fields should be always set to {@link 302 * ANEURALNETWORKS_FEATURE_LEVEL_5}. 303 */ 304 NnApiSLDriverImpl base; 305 306 /** 307 * SL Driver implementation of {@link ANeuralNetworksBurst_create}. 308 * Behavior, arguments, and outputs match NNAPI Runtime function 309 * {@link ANeuralNetworksBurst_create}, 310 * at the feature level of this NnApiSLDriver struct. 311 */ 312 int (*ANeuralNetworksBurst_create)(ANeuralNetworksCompilation* compilation, 313 ANeuralNetworksBurst** burst); 314 315 /** 316 * SL Driver implementation of {@link ANeuralNetworksBurst_free}. 317 * Behavior, arguments, and outputs match NNAPI Runtime function 318 * {@link ANeuralNetworksBurst_free}, 319 * at the feature level of this NnApiSLDriver struct. 320 */ 321 void (*ANeuralNetworksBurst_free)(ANeuralNetworksBurst* burst); 322 323 /** 324 * SL Driver implementation of {@link ANeuralNetworksCompilation_createForDevices}. 325 * Behavior, arguments, and outputs match NNAPI Runtime function 326 * {@link ANeuralNetworksCompilation_createForDevices}, 327 * at the feature level of this NnApiSLDriver struct. 328 */ 329 int (*ANeuralNetworksCompilation_createForDevices)(ANeuralNetworksModel* model, 330 const ANeuralNetworksDevice* const* devices, 331 uint32_t numDevices, 332 ANeuralNetworksCompilation** compilation); 333 334 /** 335 * SL Driver implementation of {@link ANeuralNetworksCompilation_finish}. 336 * Behavior, arguments, and outputs match NNAPI Runtime function 337 * {@link ANeuralNetworksCompilation_finish}, 338 * at the feature level of this NnApiSLDriver struct. 339 */ 340 int (*ANeuralNetworksCompilation_finish)(ANeuralNetworksCompilation* compilation); 341 342 /** 343 * SL Driver implementation of {@link ANeuralNetworksCompilation_free}. 344 * Behavior, arguments, and outputs match NNAPI Runtime function 345 * {@link ANeuralNetworksCompilation_free}, 346 * at the feature level of this NnApiSLDriver struct. 347 */ 348 void (*ANeuralNetworksCompilation_free)(ANeuralNetworksCompilation* compilation); 349 350 /** 351 * SL Driver implementation of {@link 352 * ANeuralNetworksCompilation_getPreferredMemoryAlignmentForInput}. Behavior, arguments, and 353 * outputs match NNAPI Runtime function 354 * {@link ANeuralNetworksCompilation_getPreferredMemoryAlignmentForInput}, 355 * at the feature level of this NnApiSLDriver struct. 356 */ 357 int (*ANeuralNetworksCompilation_getPreferredMemoryAlignmentForInput)( 358 const ANeuralNetworksCompilation* compilation, uint32_t index, uint32_t* alignment); 359 360 /** 361 * SL Driver implementation of {@link 362 * ANeuralNetworksCompilation_getPreferredMemoryAlignmentForOutput}. Behavior, arguments, and 363 * outputs match NNAPI Runtime function 364 * {@link ANeuralNetworksCompilation_getPreferredMemoryAlignmentForOutput}, 365 * at the feature level of this NnApiSLDriver struct. 366 */ 367 int (*ANeuralNetworksCompilation_getPreferredMemoryAlignmentForOutput)( 368 const ANeuralNetworksCompilation* compilation, uint32_t index, uint32_t* alignment); 369 370 /** 371 * SL Driver implementation of {@link 372 * ANeuralNetworksCompilation_getPreferredMemoryPaddingForInput}. Behavior, arguments, and 373 * outputs match NNAPI Runtime function 374 * {@link ANeuralNetworksCompilation_getPreferredMemoryPaddingForInput}, 375 * at the feature level of this NnApiSLDriver struct. 376 */ 377 int (*ANeuralNetworksCompilation_getPreferredMemoryPaddingForInput)( 378 const ANeuralNetworksCompilation* compilation, uint32_t index, uint32_t* padding); 379 380 /** 381 * SL Driver implementation of {@link 382 * ANeuralNetworksCompilation_getPreferredMemoryPaddingForOutput}. Behavior, arguments, and 383 * outputs match NNAPI Runtime function 384 * {@link ANeuralNetworksCompilation_getPreferredMemoryPaddingForOutput}, 385 * at the feature level of this NnApiSLDriver struct. 386 */ 387 int (*ANeuralNetworksCompilation_getPreferredMemoryPaddingForOutput)( 388 const ANeuralNetworksCompilation* compilation, uint32_t index, uint32_t* padding); 389 390 /** 391 * SL Driver implementation of {@link ANeuralNetworksCompilation_setCaching}. 392 * Behavior, arguments, and outputs match NNAPI Runtime function 393 * {@link ANeuralNetworksCompilation_setCaching}, 394 * at the feature level of this NnApiSLDriver struct. 395 */ 396 int (*ANeuralNetworksCompilation_setCaching)(ANeuralNetworksCompilation* compilation, 397 const char* cacheDir, const uint8_t* token); 398 399 /** 400 * SL Driver implementation of {@link ANeuralNetworksCompilation_setPreference}. 401 * Behavior, arguments, and outputs match NNAPI Runtime function 402 * {@link ANeuralNetworksCompilation_setPreference}, 403 * at the feature level of this NnApiSLDriver struct. 404 */ 405 int (*ANeuralNetworksCompilation_setPreference)(ANeuralNetworksCompilation* compilation, 406 int32_t preference); 407 408 /** 409 * SL Driver implementation of {@link ANeuralNetworksCompilation_setPriority}. 410 * Behavior, arguments, and outputs match NNAPI Runtime function 411 * {@link ANeuralNetworksCompilation_setPriority}, 412 * at the feature level of this NnApiSLDriver struct. 413 */ 414 int (*ANeuralNetworksCompilation_setPriority)(ANeuralNetworksCompilation* compilation, 415 int priority); 416 417 /** 418 * SL Driver implementation of {@link ANeuralNetworksCompilation_setTimeout}. 419 * Behavior, arguments, and outputs match NNAPI Runtime function 420 * {@link ANeuralNetworksCompilation_setTimeout}, 421 * at the feature level of this NnApiSLDriver struct. 422 */ 423 int (*ANeuralNetworksCompilation_setTimeout)(ANeuralNetworksCompilation* compilation, 424 uint64_t duration); 425 426 /** 427 * SL Driver implementation of {@link ANeuralNetworksDevice_getExtensionSupport}. 428 * Behavior, arguments, and outputs match NNAPI Runtime function 429 * {@link ANeuralNetworksDevice_getExtensionSupport}, 430 * at the feature level of this NnApiSLDriver struct. 431 */ 432 int (*ANeuralNetworksDevice_getExtensionSupport)(const ANeuralNetworksDevice* device, 433 const char* extensionName, 434 bool* isExtensionSupported); 435 436 /** 437 * SL Driver implementation of {@link ANeuralNetworksDevice_getFeatureLevel}. 438 * Behavior, arguments, and outputs match NNAPI Runtime function 439 * {@link ANeuralNetworksDevice_getFeatureLevel}, 440 * at the feature level of this NnApiSLDriver struct. 441 */ 442 int (*ANeuralNetworksDevice_getFeatureLevel)(const ANeuralNetworksDevice* device, 443 int64_t* featureLevel); 444 445 /** 446 * SL Driver implementation of {@link ANeuralNetworksDevice_getName}. 447 * Behavior, arguments, and outputs match NNAPI Runtime function 448 * {@link ANeuralNetworksDevice_getName}, 449 * at the feature level of this NnApiSLDriver struct. 450 */ 451 int (*ANeuralNetworksDevice_getName)(const ANeuralNetworksDevice* device, const char** name); 452 453 /** 454 * SL Driver implementation of {@link ANeuralNetworksDevice_getType}. 455 * Behavior, arguments, and outputs match NNAPI Runtime function 456 * {@link ANeuralNetworksDevice_getType}, 457 * at the feature level of this NnApiSLDriver struct. 458 */ 459 int (*ANeuralNetworksDevice_getType)(const ANeuralNetworksDevice* device, int32_t* type); 460 461 /** 462 * SL Driver implementation of {@link ANeuralNetworksDevice_getVersion}. 463 * Behavior, arguments, and outputs match NNAPI Runtime function 464 * {@link ANeuralNetworksDevice_getVersion}, 465 * at the feature level of this NnApiSLDriver struct. 466 */ 467 int (*ANeuralNetworksDevice_getVersion)(const ANeuralNetworksDevice* device, 468 const char** version); 469 470 /** 471 * SL Driver implementation of {@link ANeuralNetworksDevice_wait}. 472 * Behavior, arguments, and outputs match NNAPI Runtime function 473 * {@link ANeuralNetworksDevice_wait}, 474 * at the feature level of this NnApiSLDriver struct. 475 */ 476 int (*ANeuralNetworksDevice_wait)(const ANeuralNetworksDevice* device); 477 478 /** 479 * SL Driver implementation of {@link ANeuralNetworksEvent_createFromSyncFenceFd}. 480 * Behavior, arguments, and outputs match NNAPI Runtime function 481 * {@link ANeuralNetworksEvent_createFromSyncFenceFd}, 482 * at the feature level of this NnApiSLDriver struct. 483 */ 484 int (*ANeuralNetworksEvent_createFromSyncFenceFd)(int sync_fence_fd, 485 ANeuralNetworksEvent** event); 486 487 /** 488 * SL Driver implementation of {@link ANeuralNetworksEvent_free}. 489 * Behavior, arguments, and outputs match NNAPI Runtime function 490 * {@link ANeuralNetworksEvent_free}, 491 * at the feature level of this NnApiSLDriver struct. 492 */ 493 void (*ANeuralNetworksEvent_free)(ANeuralNetworksEvent* event); 494 495 /** 496 * SL Driver implementation of {@link ANeuralNetworksEvent_getSyncFenceFd}. 497 * Behavior, arguments, and outputs match NNAPI Runtime function 498 * {@link ANeuralNetworksEvent_getSyncFenceFd}, 499 * at the feature level of this NnApiSLDriver struct. 500 */ 501 int (*ANeuralNetworksEvent_getSyncFenceFd)(const ANeuralNetworksEvent* event, 502 int* sync_fence_fd); 503 504 /** 505 * SL Driver implementation of {@link ANeuralNetworksEvent_wait}. 506 * Behavior, arguments, and outputs match NNAPI Runtime function 507 * {@link ANeuralNetworksEvent_wait}, 508 * at the feature level of this NnApiSLDriver struct. 509 */ 510 int (*ANeuralNetworksEvent_wait)(ANeuralNetworksEvent* event); 511 512 /** 513 * SL Driver implementation of {@link ANeuralNetworksExecution_burstCompute}. 514 * Behavior, arguments, and outputs match NNAPI Runtime function 515 * {@link ANeuralNetworksExecution_burstCompute}, 516 * at the feature level of this NnApiSLDriver struct. 517 */ 518 int (*ANeuralNetworksExecution_burstCompute)(ANeuralNetworksExecution* execution, 519 ANeuralNetworksBurst* burst); 520 521 /** 522 * SL Driver implementation of {@link ANeuralNetworksExecution_compute}. 523 * Behavior, arguments, and outputs match NNAPI Runtime function 524 * {@link ANeuralNetworksExecution_compute}, 525 * at the feature level of this NnApiSLDriver struct. 526 */ 527 int (*ANeuralNetworksExecution_compute)(ANeuralNetworksExecution* execution); 528 529 /** 530 * SL Driver implementation of {@link ANeuralNetworksExecution_create}. 531 * Behavior, arguments, and outputs match NNAPI Runtime function 532 * {@link ANeuralNetworksExecution_create}, 533 * at the feature level of this NnApiSLDriver struct. 534 */ 535 int (*ANeuralNetworksExecution_create)(ANeuralNetworksCompilation* compilation, 536 ANeuralNetworksExecution** execution); 537 538 /** 539 * SL Driver implementation of {@link ANeuralNetworksExecution_enableInputAndOutputPadding}. 540 * Behavior, arguments, and outputs match NNAPI Runtime function 541 * {@link ANeuralNetworksExecution_enableInputAndOutputPadding}, 542 * at the feature level of this NnApiSLDriver struct. 543 */ 544 int (*ANeuralNetworksExecution_enableInputAndOutputPadding)(ANeuralNetworksExecution* execution, 545 bool enable); 546 547 /** 548 * SL Driver implementation of {@link ANeuralNetworksExecution_free}. 549 * Behavior, arguments, and outputs match NNAPI Runtime function 550 * {@link ANeuralNetworksExecution_free}, 551 * at the feature level of this NnApiSLDriver struct. 552 */ 553 void (*ANeuralNetworksExecution_free)(ANeuralNetworksExecution* execution); 554 555 /** 556 * SL Driver implementation of {@link ANeuralNetworksExecution_getDuration}. 557 * Behavior, arguments, and outputs match NNAPI Runtime function 558 * {@link ANeuralNetworksExecution_getDuration}, 559 * at the feature level of this NnApiSLDriver struct. 560 */ 561 int (*ANeuralNetworksExecution_getDuration)(const ANeuralNetworksExecution* execution, 562 int32_t durationCode, uint64_t* duration); 563 564 /** 565 * SL Driver implementation of {@link ANeuralNetworksExecution_getOutputOperandDimensions}. 566 * Behavior, arguments, and outputs match NNAPI Runtime function 567 * {@link ANeuralNetworksExecution_getOutputOperandDimensions}, 568 * at the feature level of this NnApiSLDriver struct. 569 */ 570 int (*ANeuralNetworksExecution_getOutputOperandDimensions)(ANeuralNetworksExecution* execution, 571 int32_t index, uint32_t* dimensions); 572 573 /** 574 * SL Driver implementation of {@link ANeuralNetworksExecution_getOutputOperandRank}. 575 * Behavior, arguments, and outputs match NNAPI Runtime function 576 * {@link ANeuralNetworksExecution_getOutputOperandRank}, 577 * at the feature level of this NnApiSLDriver struct. 578 */ 579 int (*ANeuralNetworksExecution_getOutputOperandRank)(ANeuralNetworksExecution* execution, 580 int32_t index, uint32_t* rank); 581 582 /** 583 * SL Driver implementation of {@link ANeuralNetworksExecution_setInput}. 584 * Behavior, arguments, and outputs match NNAPI Runtime function 585 * {@link ANeuralNetworksExecution_setInput}, 586 * at the feature level of this NnApiSLDriver struct. 587 */ 588 int (*ANeuralNetworksExecution_setInput)(ANeuralNetworksExecution* execution, int32_t index, 589 const ANeuralNetworksOperandType* type, 590 const void* buffer, size_t length); 591 592 /** 593 * SL Driver implementation of {@link ANeuralNetworksExecution_setInputFromMemory}. 594 * Behavior, arguments, and outputs match NNAPI Runtime function 595 * {@link ANeuralNetworksExecution_setInputFromMemory}, 596 * at the feature level of this NnApiSLDriver struct. 597 */ 598 int (*ANeuralNetworksExecution_setInputFromMemory)(ANeuralNetworksExecution* execution, 599 int32_t index, 600 const ANeuralNetworksOperandType* type, 601 const ANeuralNetworksMemory* memory, 602 size_t offset, size_t length); 603 604 /** 605 * SL Driver implementation of {@link ANeuralNetworksExecution_setLoopTimeout}. 606 * Behavior, arguments, and outputs match NNAPI Runtime function 607 * {@link ANeuralNetworksExecution_setLoopTimeout}, 608 * at the feature level of this NnApiSLDriver struct. 609 */ 610 int (*ANeuralNetworksExecution_setLoopTimeout)(ANeuralNetworksExecution* execution, 611 uint64_t duration); 612 613 /** 614 * SL Driver implementation of {@link ANeuralNetworksExecution_setMeasureTiming}. 615 * Behavior, arguments, and outputs match NNAPI Runtime function 616 * {@link ANeuralNetworksExecution_setMeasureTiming}, 617 * at the feature level of this NnApiSLDriver struct. 618 */ 619 int (*ANeuralNetworksExecution_setMeasureTiming)(ANeuralNetworksExecution* execution, 620 bool measure); 621 622 /** 623 * SL Driver implementation of {@link ANeuralNetworksExecution_setOutput}. 624 * Behavior, arguments, and outputs match NNAPI Runtime function 625 * {@link ANeuralNetworksExecution_setOutput}, 626 * at the feature level of this NnApiSLDriver struct. 627 */ 628 int (*ANeuralNetworksExecution_setOutput)(ANeuralNetworksExecution* execution, int32_t index, 629 const ANeuralNetworksOperandType* type, void* buffer, 630 size_t length); 631 632 /** 633 * SL Driver implementation of {@link ANeuralNetworksExecution_setOutputFromMemory}. 634 * Behavior, arguments, and outputs match NNAPI Runtime function 635 * {@link ANeuralNetworksExecution_setOutputFromMemory}, 636 * at the feature level of this NnApiSLDriver struct. 637 */ 638 int (*ANeuralNetworksExecution_setOutputFromMemory)(ANeuralNetworksExecution* execution, 639 int32_t index, 640 const ANeuralNetworksOperandType* type, 641 const ANeuralNetworksMemory* memory, 642 size_t offset, size_t length); 643 644 /** 645 * SL Driver implementation of {@link ANeuralNetworksExecution_setReusable}. 646 * Behavior, arguments, and outputs match NNAPI Runtime function 647 * {@link ANeuralNetworksExecution_setReusable}, 648 * at the feature level of this NnApiSLDriver struct. 649 */ 650 int (*ANeuralNetworksExecution_setReusable)(ANeuralNetworksExecution* execution, bool reusable); 651 652 /** 653 * SL Driver implementation of {@link ANeuralNetworksExecution_setTimeout}. 654 * Behavior, arguments, and outputs match NNAPI Runtime function 655 * {@link ANeuralNetworksExecution_setTimeout}, 656 * at the feature level of this NnApiSLDriver struct. 657 */ 658 int (*ANeuralNetworksExecution_setTimeout)(ANeuralNetworksExecution* execution, 659 uint64_t duration); 660 661 /** 662 * SL Driver implementation of {@link ANeuralNetworksExecution_startComputeWithDependencies}. 663 * Behavior, arguments, and outputs match NNAPI Runtime function 664 * {@link ANeuralNetworksExecution_startComputeWithDependencies}, 665 * at the feature level of this NnApiSLDriver struct. 666 */ 667 int (*ANeuralNetworksExecution_startComputeWithDependencies)( 668 ANeuralNetworksExecution* execution, const ANeuralNetworksEvent* const* dependencies, 669 uint32_t num_dependencies, uint64_t duration, ANeuralNetworksEvent** event); 670 671 /** 672 * SL Driver implementation of {@link ANeuralNetworksMemoryDesc_addInputRole}. 673 * Behavior, arguments, and outputs match NNAPI Runtime function 674 * {@link ANeuralNetworksMemoryDesc_addInputRole}, 675 * at the feature level of this NnApiSLDriver struct. 676 */ 677 int (*ANeuralNetworksMemoryDesc_addInputRole)(ANeuralNetworksMemoryDesc* desc, 678 const ANeuralNetworksCompilation* compilation, 679 uint32_t index, float frequency); 680 681 /** 682 * SL Driver implementation of {@link ANeuralNetworksMemoryDesc_addOutputRole}. 683 * Behavior, arguments, and outputs match NNAPI Runtime function 684 * {@link ANeuralNetworksMemoryDesc_addOutputRole}, 685 * at the feature level of this NnApiSLDriver struct. 686 */ 687 int (*ANeuralNetworksMemoryDesc_addOutputRole)(ANeuralNetworksMemoryDesc* desc, 688 const ANeuralNetworksCompilation* compilation, 689 uint32_t index, float frequency); 690 691 /** 692 * SL Driver implementation of {@link ANeuralNetworksMemoryDesc_create}. 693 * Behavior, arguments, and outputs match NNAPI Runtime function 694 * {@link ANeuralNetworksMemoryDesc_create}, 695 * at the feature level of this NnApiSLDriver struct. 696 */ 697 int (*ANeuralNetworksMemoryDesc_create)(ANeuralNetworksMemoryDesc** desc); 698 699 /** 700 * SL Driver implementation of {@link ANeuralNetworksMemoryDesc_finish}. 701 * Behavior, arguments, and outputs match NNAPI Runtime function 702 * {@link ANeuralNetworksMemoryDesc_finish}, 703 * at the feature level of this NnApiSLDriver struct. 704 */ 705 int (*ANeuralNetworksMemoryDesc_finish)(ANeuralNetworksMemoryDesc* desc); 706 707 /** 708 * SL Driver implementation of {@link ANeuralNetworksMemoryDesc_free}. 709 * Behavior, arguments, and outputs match NNAPI Runtime function 710 * {@link ANeuralNetworksMemoryDesc_free}, 711 * at the feature level of this NnApiSLDriver struct. 712 */ 713 void (*ANeuralNetworksMemoryDesc_free)(ANeuralNetworksMemoryDesc* desc); 714 715 /** 716 * SL Driver implementation of {@link ANeuralNetworksMemoryDesc_setDimensions}. 717 * Behavior, arguments, and outputs match NNAPI Runtime function 718 * {@link ANeuralNetworksMemoryDesc_setDimensions}, 719 * at the feature level of this NnApiSLDriver struct. 720 */ 721 int (*ANeuralNetworksMemoryDesc_setDimensions)(ANeuralNetworksMemoryDesc* desc, uint32_t rank, 722 const uint32_t* dimensions); 723 724 /** 725 * SL Driver implementation of {@link ANeuralNetworksMemory_copy}. 726 * Behavior, arguments, and outputs match NNAPI Runtime function 727 * {@link ANeuralNetworksMemory_copy}, 728 * at the feature level of this NnApiSLDriver struct. 729 */ 730 int (*ANeuralNetworksMemory_copy)(const ANeuralNetworksMemory* src, 731 const ANeuralNetworksMemory* dst); 732 733 /** 734 * SL Driver implementation of {@link ANeuralNetworksMemory_createFromAHardwareBuffer}. 735 * Behavior, arguments, and outputs match NNAPI Runtime function 736 * {@link ANeuralNetworksMemory_createFromAHardwareBuffer}, 737 * at the feature level of this NnApiSLDriver struct. 738 */ 739 int (*ANeuralNetworksMemory_createFromAHardwareBuffer)(const AHardwareBuffer* ahwb, 740 ANeuralNetworksMemory** memory); 741 742 /** 743 * SL Driver implementation of {@link ANeuralNetworksMemory_createFromDesc}. 744 * Behavior, arguments, and outputs match NNAPI Runtime function 745 * {@link ANeuralNetworksMemory_createFromDesc}, 746 * at the feature level of this NnApiSLDriver struct. 747 */ 748 int (*ANeuralNetworksMemory_createFromDesc)(const ANeuralNetworksMemoryDesc* desc, 749 ANeuralNetworksMemory** memory); 750 751 /** 752 * SL Driver implementation of {@link ANeuralNetworksMemory_createFromFd}. 753 * Behavior, arguments, and outputs match NNAPI Runtime function 754 * {@link ANeuralNetworksMemory_createFromFd}, 755 * at the feature level of this NnApiSLDriver struct. 756 */ 757 int (*ANeuralNetworksMemory_createFromFd)(size_t size, int protect, int fd, size_t offset, 758 ANeuralNetworksMemory** memory); 759 760 /** 761 * SL Driver implementation of {@link ANeuralNetworksMemory_free}. 762 * Behavior, arguments, and outputs match NNAPI Runtime function 763 * {@link ANeuralNetworksMemory_free}, 764 * at the feature level of this NnApiSLDriver struct. 765 */ 766 void (*ANeuralNetworksMemory_free)(ANeuralNetworksMemory* memory); 767 768 /** 769 * SL Driver implementation of {@link ANeuralNetworksModel_addOperand}. 770 * Behavior, arguments, and outputs match NNAPI Runtime function 771 * {@link ANeuralNetworksModel_addOperand}, 772 * at the feature level of this NnApiSLDriver struct. 773 */ 774 int (*ANeuralNetworksModel_addOperand)(ANeuralNetworksModel* model, 775 const ANeuralNetworksOperandType* type); 776 777 /** 778 * SL Driver implementation of {@link ANeuralNetworksModel_addOperation}. 779 * Behavior, arguments, and outputs match NNAPI Runtime function 780 * {@link ANeuralNetworksModel_addOperation}, 781 * at the feature level of this NnApiSLDriver struct. 782 */ 783 int (*ANeuralNetworksModel_addOperation)(ANeuralNetworksModel* model, 784 ANeuralNetworksOperationType type, uint32_t inputCount, 785 const uint32_t* inputs, uint32_t outputCount, 786 const uint32_t* outputs); 787 788 /** 789 * SL Driver implementation of {@link ANeuralNetworksModel_create}. 790 * Behavior, arguments, and outputs match NNAPI Runtime function 791 * {@link ANeuralNetworksModel_create}, 792 * at the feature level of this NnApiSLDriver struct. 793 */ 794 int (*ANeuralNetworksModel_create)(ANeuralNetworksModel** model); 795 796 /** 797 * SL Driver implementation of {@link ANeuralNetworksModel_finish}. 798 * Behavior, arguments, and outputs match NNAPI Runtime function 799 * {@link ANeuralNetworksModel_finish}, 800 * at the feature level of this NnApiSLDriver struct. 801 */ 802 int (*ANeuralNetworksModel_finish)(ANeuralNetworksModel* model); 803 804 /** 805 * SL Driver implementation of {@link ANeuralNetworksModel_free}. 806 * Behavior, arguments, and outputs match NNAPI Runtime function 807 * {@link ANeuralNetworksModel_free}, 808 * at the feature level of this NnApiSLDriver struct. 809 */ 810 void (*ANeuralNetworksModel_free)(ANeuralNetworksModel* model); 811 812 /** 813 * SL Driver implementation of {@link ANeuralNetworksModel_getExtensionOperandType}. 814 * Behavior, arguments, and outputs match NNAPI Runtime function 815 * {@link ANeuralNetworksModel_getExtensionOperandType}, 816 * at the feature level of this NnApiSLDriver struct. 817 */ 818 int (*ANeuralNetworksModel_getExtensionOperandType)(ANeuralNetworksModel* model, 819 const char* extensionName, 820 uint16_t operandCodeWithinExtension, 821 int32_t* type); 822 823 /** 824 * SL Driver implementation of {@link ANeuralNetworksModel_getExtensionOperationType}. 825 * Behavior, arguments, and outputs match NNAPI Runtime function 826 * {@link ANeuralNetworksModel_getExtensionOperationType}, 827 * at the feature level of this NnApiSLDriver struct. 828 */ 829 int (*ANeuralNetworksModel_getExtensionOperationType)(ANeuralNetworksModel* model, 830 const char* extensionName, 831 uint16_t operationCodeWithinExtension, 832 ANeuralNetworksOperationType* type); 833 834 /** 835 * SL Driver implementation of {@link ANeuralNetworksModel_getSupportedOperationsForDevices}. 836 * Behavior, arguments, and outputs match NNAPI Runtime function 837 * {@link ANeuralNetworksModel_getSupportedOperationsForDevices}, 838 * at the feature level of this NnApiSLDriver struct. 839 */ 840 int (*ANeuralNetworksModel_getSupportedOperationsForDevices)( 841 const ANeuralNetworksModel* model, const ANeuralNetworksDevice* const* devices, 842 uint32_t numDevices, bool* supportedOps); 843 844 /** 845 * SL Driver implementation of {@link ANeuralNetworksModel_identifyInputsAndOutputs}. 846 * Behavior, arguments, and outputs match NNAPI Runtime function 847 * {@link ANeuralNetworksModel_identifyInputsAndOutputs}, 848 * at the feature level of this NnApiSLDriver struct. 849 */ 850 int (*ANeuralNetworksModel_identifyInputsAndOutputs)(ANeuralNetworksModel* model, 851 uint32_t inputCount, 852 const uint32_t* inputs, 853 uint32_t outputCount, 854 const uint32_t* outputs); 855 856 /** 857 * SL Driver implementation of {@link ANeuralNetworksModel_relaxComputationFloat32toFloat16}. 858 * Behavior, arguments, and outputs match NNAPI Runtime function 859 * {@link ANeuralNetworksModel_relaxComputationFloat32toFloat16}, 860 * at the feature level of this NnApiSLDriver struct. 861 */ 862 int (*ANeuralNetworksModel_relaxComputationFloat32toFloat16)(ANeuralNetworksModel* model, 863 bool allow); 864 865 /** 866 * SL Driver implementation of {@link ANeuralNetworksModel_setOperandExtensionData}. 867 * Behavior, arguments, and outputs match NNAPI Runtime function 868 * {@link ANeuralNetworksModel_setOperandExtensionData}, 869 * at the feature level of this NnApiSLDriver struct. 870 */ 871 int (*ANeuralNetworksModel_setOperandExtensionData)(ANeuralNetworksModel* model, int32_t index, 872 const void* data, size_t length); 873 874 /** 875 * SL Driver implementation of {@link ANeuralNetworksModel_setOperandSymmPerChannelQuantParams}. 876 * Behavior, arguments, and outputs match NNAPI Runtime function 877 * {@link ANeuralNetworksModel_setOperandSymmPerChannelQuantParams}, 878 * at the feature level of this NnApiSLDriver struct. 879 */ 880 int (*ANeuralNetworksModel_setOperandSymmPerChannelQuantParams)( 881 ANeuralNetworksModel* model, int32_t index, 882 const ANeuralNetworksSymmPerChannelQuantParams* channelQuant); 883 884 /** 885 * SL Driver implementation of {@link ANeuralNetworksModel_setOperandValue}. 886 * Behavior, arguments, and outputs match NNAPI Runtime function 887 * {@link ANeuralNetworksModel_setOperandValue}, 888 * at the feature level of this NnApiSLDriver struct. 889 */ 890 int (*ANeuralNetworksModel_setOperandValue)(ANeuralNetworksModel* model, int32_t index, 891 const void* buffer, size_t length); 892 893 /** 894 * SL Driver implementation of {@link ANeuralNetworksModel_setOperandValueFromMemory}. 895 * Behavior, arguments, and outputs match NNAPI Runtime function 896 * {@link ANeuralNetworksModel_setOperandValueFromMemory}, 897 * at the feature level of this NnApiSLDriver struct. 898 */ 899 int (*ANeuralNetworksModel_setOperandValueFromMemory)(ANeuralNetworksModel* model, 900 int32_t index, 901 const ANeuralNetworksMemory* memory, 902 size_t offset, size_t length); 903 904 /** 905 * SL Driver implementation of {@link ANeuralNetworksModel_setOperandValueFromModel}. 906 * Behavior, arguments, and outputs match NNAPI Runtime function 907 * {@link ANeuralNetworksModel_setOperandValueFromModel}, 908 * at the feature level of this NnApiSLDriver struct. 909 */ 910 int (*ANeuralNetworksModel_setOperandValueFromModel)(ANeuralNetworksModel* model, int32_t index, 911 const ANeuralNetworksModel* value); 912 913 /** 914 * SL Driver implementation of {@link ANeuralNetworks_getDefaultLoopTimeout}. 915 * Behavior, arguments, and outputs match NNAPI Runtime function 916 * {@link ANeuralNetworks_getDefaultLoopTimeout}, 917 * at the feature level of this NnApiSLDriver struct. 918 */ 919 uint64_t (*ANeuralNetworks_getDefaultLoopTimeout)(); 920 921 /** 922 * SL Driver implementation of {@link ANeuralNetworks_getDevice}. 923 * Behavior, arguments, and outputs match NNAPI Runtime function 924 * {@link ANeuralNetworks_getDevice}, 925 * at the feature level of this NnApiSLDriver struct. 926 */ 927 int (*ANeuralNetworks_getDevice)(uint32_t devIndex, ANeuralNetworksDevice** device); 928 929 /** 930 * SL Driver implementation of {@link ANeuralNetworks_getDeviceCount}. 931 * Behavior, arguments, and outputs match NNAPI Runtime function 932 * {@link ANeuralNetworks_getDeviceCount}, 933 * at the feature level of this NnApiSLDriver struct. 934 */ 935 int (*ANeuralNetworks_getDeviceCount)(uint32_t* numDevices); 936 937 /** 938 * SL Driver implementation of {@link ANeuralNetworks_getMaximumLoopTimeout}. 939 * Behavior, arguments, and outputs match NNAPI Runtime function 940 * {@link ANeuralNetworks_getMaximumLoopTimeout}, 941 * at the feature level of this NnApiSLDriver struct. 942 */ 943 uint64_t (*ANeuralNetworks_getMaximumLoopTimeout)(); 944 945 /** 946 * SL Driver implementation of {@link ANeuralNetworks_getRuntimeFeatureLevel}. 947 * Behavior, arguments, and outputs match NNAPI Runtime function 948 * {@link ANeuralNetworks_getRuntimeFeatureLevel}, 949 * at the feature level of this NnApiSLDriver struct. 950 */ 951 int64_t (*ANeuralNetworks_getRuntimeFeatureLevel)(); 952 953 /** 954 * SL Driver implementation of a function similar to 955 * {@link ANeuralNetworksCompilation_setCaching} that takes file descriptors 956 * instead of a cache directory. 957 * Behavior and outputs match NNAPI Runtime function 958 * {@link ANeuralNetworksCompilation_setCaching}, 959 * at the feature level of this NnApiSLDriver struct. 960 */ 961 int (*SL_ANeuralNetworksCompilation_setCachingFromFds)(ANeuralNetworksCompilation* compilation, 962 const int* modelCacheFds, 963 const uint32_t numModelCacheFiles, 964 const int* dataCacheFds, 965 const uint32_t numDataCacheFiles, 966 const uint8_t* token); 967 968 /** 969 * SL Driver implementation of {@link SL_ANeuralNetworksDevice_getNumberOfCacheFilesNeeded}. 970 * Behavior, arguments, and outputs match NNAPI Runtime function 971 * {@link SL_ANeuralNetworksDevice_getNumberOfCacheFilesNeeded}, 972 * at the feature level of this NnApiSLDriver struct. 973 */ 974 int (*SL_ANeuralNetworksDevice_getNumberOfCacheFilesNeeded)(const ANeuralNetworksDevice* device, 975 uint32_t* numModelCacheFiles, 976 uint32_t* numDataCacheFiles); 977 978 /** 979 * SL Driver implementation of {@link SL_ANeuralNetworksDevice_getPerformanceInfo}. 980 * Behavior, arguments, and outputs match NNAPI Runtime function 981 * {@link SL_ANeuralNetworksDevice_getPerformanceInfo}, 982 * at the feature level of this NnApiSLDriver struct. 983 */ 984 int (*SL_ANeuralNetworksDevice_getPerformanceInfo)( 985 const ANeuralNetworksDevice* device, int32_t performanceInfoKind, 986 SL_ANeuralNetworksPerformanceInfo* performanceInfo); 987 988 /** 989 * SL Driver implementation of {@link 990 * SL_ANeuralNetworksDevice_forEachOperandPerformanceInfo}. Behavior, arguments, and 991 * outputs match NNAPI Runtime function 992 * {@link SL_ANeuralNetworksDevice_forEachOperandPerformanceInfo}, 993 * at the feature level of this NnApiSLDriver struct. 994 */ 995 int (*SL_ANeuralNetworksDevice_forEachOperandPerformanceInfo)( 996 const ANeuralNetworksDevice* device, void* context, 997 void (*callback)(SL_ANeuralNetworksOperandPerformanceInfo, void*)); 998 999 /** 1000 * SL Driver implementation of {@link SL_ANeuralNetworksDevice_getVendorExtensionCount}. 1001 * Behavior, arguments, and outputs match NNAPI Runtime function 1002 * {@link SL_ANeuralNetworksDevice_getVendorExtensionCount}, 1003 * at the feature level of this NnApiSLDriver struct. 1004 */ 1005 int (*SL_ANeuralNetworksDevice_getVendorExtensionCount)(const ANeuralNetworksDevice* device, 1006 uint32_t* vendorExtensionCount); 1007 1008 /** 1009 * SL Driver implementation of {@link SL_ANeuralNetworksDevice_getVendorExtensionName}. 1010 * Behavior, arguments, and outputs match NNAPI Runtime function 1011 * {@link SL_ANeuralNetworksDevice_getVendorExtensionName}, 1012 * at the feature level of this NnApiSLDriver struct. 1013 */ 1014 int (*SL_ANeuralNetworksDevice_getVendorExtensionName)(const ANeuralNetworksDevice* device, 1015 uint32_t vendorExtensionIndex, 1016 const char** extensionName); 1017 1018 /** 1019 * SL Driver implementation of {@link 1020 * SL_ANeuralNetworksDevice_forEachVendorExtensionOperandTypeInformation}. Behavior, arguments, 1021 * and outputs match NNAPI Runtime function 1022 * {@link SL_ANeuralNetworksDevice_forEachVendorExtensionOperandTypeInformation}, 1023 * at the feature level of this NnApiSLDriver struct. 1024 */ 1025 int (*SL_ANeuralNetworksDevice_forEachVendorExtensionOperandTypeInformation)( 1026 const ANeuralNetworksDevice* device, uint32_t vendorExtensionIndex, void* context, 1027 void (*callback)(SL_ANeuralNetworksExtensionOperandTypeInformation, void*)); 1028 } NnApiSLDriverImplFL5; 1029 1030 __END_DECLS 1031