1%% template file for generating OperandTypes.h. 2%% see README.md. 3/* 4 * Copyright (C) 2020 The Android Open Source Project 5 * 6 * Licensed under the Apache License, Version 2.0 (the "License"); 7 * you may not use this file except in compliance with the License. 8 * You may obtain a copy of the License at 9 * 10 * http://www.apache.org/licenses/LICENSE-2.0 11 * 12 * Unless required by applicable law or agreed to in writing, software 13 * distributed under the License is distributed on an "AS IS" BASIS, 14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 * See the License for the specific language governing permissions and 16 * limitations under the License. 17 */ 18 19#ifndef ANDROID_PACKAGES_MODULES_NEURALNETWORKS_COMMON_TYPES_NNAPI_OPERAND_TYPES_H 20#define ANDROID_PACKAGES_MODULES_NEURALNETWORKS_COMMON_TYPES_NNAPI_OPERAND_TYPES_H 21 22namespace android::nn { 23 24%% 25%% The function `getAlignmentForLength` assumes that required (or optimal) 26%% alignment is a function of length (not data type), and assumes that there 27%% is a maximum alignment requirement. If a new operand type is added with a 28%% stricter alignment requirement, then `getAlignmentForLength` may need to 29%% be modified. 30%% 31%insert Operand_1.0_Comment 32enum class OperandType { 33%insert Operand_1.0 34 35%insert Operand_1.2 36 37%insert Operand_1.3 38 39 /** 40 * DEPRECATED. Since HAL version 1.2, extensions are the preferred 41 * alternative to OEM operation and data types. 42 * 43 * OEM specific scalar value. 44 */ 45 OEM = 10000, 46 47 /** 48 * DEPRECATED. Since HAL version 1.2, extensions are the preferred 49 * alternative to OEM operation and data types. 50 * 51 * A tensor of OEM specific values. 52 */ 53 TENSOR_OEM_BYTE = 10001, 54}; 55 56} // namespace android::nn 57 58#endif // ANDROID_PACKAGES_MODULES_NEURALNETWORKS_COMMON_TYPES_NNAPI_OPERAND_TYPES_H 59