summaryrefslogtreecommitdiff
path: root/runtime/neurun/backend/srcn/kernel/OperationUtils.h
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/neurun/backend/srcn/kernel/OperationUtils.h')
-rw-r--r--runtime/neurun/backend/srcn/kernel/OperationUtils.h84
1 files changed, 0 insertions, 84 deletions
diff --git a/runtime/neurun/backend/srcn/kernel/OperationUtils.h b/runtime/neurun/backend/srcn/kernel/OperationUtils.h
deleted file mode 100644
index aa163a1f3..000000000
--- a/runtime/neurun/backend/srcn/kernel/OperationUtils.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd. All Rights Reserved
- *
- * 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 __NEURUN_BACKEND_SRCN_OPERATION_UTILS_H__
-#define __NEURUN_BACKEND_SRCN_OPERATION_UTILS_H__
-
-#include <iostream>
-#include <limits>
-#include <vector>
-
-#include "ir/Operand.h"
-#include "ir/DataType.h"
-#include <ir/InternalType.h>
-#include <ncnn/srcn/conv_type.h>
-
-using OperandType = neurun::ir::DataType;
-using neurun::util::Coordinates;
-
-namespace neurun
-{
-namespace backend
-{
-namespace srcn
-{
-namespace kernel
-{
-
-struct TensorDescriptor
-{
- OperandType type;
- std::vector<uint32_t> dimensions;
- float scale;
- int32_t offset;
-};
-
-union DataPtr {
- uint8_t *u8;
- int8_t *i8;
- int32_t *i32;
- float *f;
- void *v;
-};
-
-enum FilterLayout
-{
- OHWI = 0, // TfLite Kernel Layout when using NHWC image layout
- HWOI, // SRCN Transpose Conv Kernel Layout when using NHWC image layout
- OIHW, // SRCN Conv Kernel Layout when using NCHW image layout
- HWIO, // SRCN Conv Kernel Layout when using NHWC image layout
- IOHW, // SRCN Transpose Conv Kernel Layout when using NCHW image layout
-};
-
-uint32_t MatchingDim(const TensorDescriptor &shape1, int index1, const TensorDescriptor &shape2,
- int index2);
-
-std::vector<int32_t> getFilterPermutation(FilterLayout from_layout, FilterLayout to_layout);
-
-Coordinates convertCoordinates(const Coordinates &from_coordinates, FilterLayout from_layout,
- FilterLayout to_layout);
-
-nnfw::srcn::convType_t convertLayout(ir::Layout layout);
-
-TensorDescriptor getTensorDescriptor(const ir::Operand &o, ir::Layout frontend_layout,
- ir::Layout backend_layout);
-
-} // namespace kernel
-} // namespace srcn
-} // namespace backend
-} // namespace neurun
-
-#endif // __NEURUN_BACKEND_SRCN_OPERATION_UTILS_H__