2 * Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 #ifndef __ONERT_IR_PADDIGN_H__
18 #define __ONERT_IR_PADDIGN_H__
21 #include "InternalType.h"
31 enum class PaddingType
39 * @brief Converts a internal padding type to const char*
40 * @param[in] type Padding type to be converted
41 * @return A string holding the converted value
43 inline std::string to_string(const PaddingType type);
45 struct ExplicitPadding
53 // TODO Resolve explicit padding param at frontend and save in value field
57 Padding(PaddingType paddingType);
58 Padding(uint32_t left, uint32_t right, uint32_t top, uint32_t bottom);
60 // TODO Change to private field
62 ExplicitPadding param;
65 // TODO Change to Padding struct's method
66 const ExplicitPadding calculatePadding(const Padding &padding, const FeatureShape &ifm_shape,
67 const FeatureShape &ofm_shape, const Stride &stride,
68 uint32_t kw, uint32_t kh, uint32_t dwf = 1,