diff options
Diffstat (limited to 'compiler/ann-ref/src/OperationType.h')
-rw-r--r-- | compiler/ann-ref/src/OperationType.h | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/compiler/ann-ref/src/OperationType.h b/compiler/ann-ref/src/OperationType.h new file mode 100644 index 000000000..fc66eeeab --- /dev/null +++ b/compiler/ann-ref/src/OperationType.h @@ -0,0 +1,66 @@ +/* + * Copyright (c) 2018 Samsung Electronics Co., Ltd. All Rights Reserved + * Copyright (C) 2017 The Android Open Source Project + * + * 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 __OPERATION_TYPE_H__ +#define __OPERATION_TYPE_H__ + +#include <cstdint> + +enum class OperationType : int32_t { + ADD = 0, + AVERAGE_POOL_2D = 1, + CONCATENATION = 2, + CONV_2D = 3, + DEPTHWISE_CONV_2D = 4, + DEPTH_TO_SPACE = 5, + DEQUANTIZE = 6, + EMBEDDING_LOOKUP = 7, + FLOOR = 8, + FULLY_CONNECTED = 9, + HASHTABLE_LOOKUP = 10, + L2_NORMALIZATION = 11, + L2_POOL_2D = 12, + LOCAL_RESPONSE_NORMALIZATION = 13, + LOGISTIC = 14, + LSH_PROJECTION = 15, + LSTM = 16, + MAX_POOL_2D = 17, + MUL = 18, + RELU = 19, + RELU1 = 20, + RELU6 = 21, + RESHAPE = 22, + RESIZE_BILINEAR = 23, + RNN = 24, + SOFTMAX = 25, + SPACE_TO_DEPTH = 26, + SVDF = 27, + TANH = 28, + DIV = 30, + PAD = 32, + STRIDED_SLICE = 35, + SUB = 36, + OEM_OPERATION = 10000, +}; + +// The number of operation types (OperationCode) defined in NeuralNetworks.h. +const int kNumberOfOperationTypes = 37; + +// Returns the name of the operation in ASCII. +const char *getOperationName(OperationType opCode); + +#endif // __OPERATION_TYPE_H__ |