1 /* 2 * Copyright (C) 2017 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 #ifndef ANDROID_FRAMEWORKS_ML_NN_RUNTIME_NEURAL_NETWORKS_OEM_H 18 #define ANDROID_FRAMEWORKS_ML_NN_RUNTIME_NEURAL_NETWORKS_OEM_H 19 20 /****************************************************************** 21 * 22 * IMPORTANT NOTICE: 23 * 24 * OEM operation and operand types are DEPRECATED. Use Extensions instead. 25 * 26 * This file is not intended for use by general developers -- only 27 * by OEM applications. The semantics of each enum are OEM-specific 28 * and may change at any time. 29 * 30 * OEM source AND binary code relies on the definitions 31 * here to be FROZEN ON ALL UPCOMING PLATFORM RELEASES. 32 * 33 * - DO NOT MODIFY ENUMS (EXCEPT IF YOU ADD NEW 32-BIT VALUES) 34 * - DO NOT MODIFY CONSTANTS OR FUNCTIONAL MACROS 35 * - DO NOT CHANGE THE SIGNATURE OF FUNCTIONS IN ANY WAY 36 * - DO NOT CHANGE THE LAYOUT OR SIZE OF STRUCTURES 37 */ 38 39 #if __ANDROID_API__ >= 27 40 41 enum { 42 /** 43 * DEPRECATED. Use Extensions instead. 44 * 45 * OEM specific scalar value. 46 */ 47 ANEURALNETWORKS_OEM_SCALAR = 10000, 48 49 /** 50 * DEPRECATED. Use Extensions instead. 51 * 52 * A tensor of OEM specific values. 53 */ 54 ANEURALNETWORKS_TENSOR_OEM_BYTE = 10001, 55 }; // extends OperandCode 56 57 /** 58 * If a model contains an {@link ANEURALNETWORKS_OEM_OPERATION}, then 59 * either the model must contain only a single operation, or every 60 * tensor operand type in the model must be fully specified. 61 */ 62 enum { 63 /** 64 * DEPRECATED. Use Extensions instead. 65 * 66 * OEM specific operation. 67 */ 68 ANEURALNETWORKS_OEM_OPERATION = 10000, 69 }; // extends OperationCode 70 71 #endif // __ANDROID_API__ >= 27 72 73 #endif // ANDROID_FRAMEWORKS_ML_NN_RUNTIME_NEURAL_NETWORKS_OEM_H 74