2 * Copyright (c) 2019 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_EXEC_IO_DESCRIPTION_H__
18 #define __ONERT_EXEC_IO_DESCRIPTION_H__
21 #include <unordered_map>
23 #include "ir/OperandInfo.h"
33 const ir::OperandInfo info;
36 const ir::Layout layout;
38 InputDesc(void) = delete;
39 InputDesc(const ir::OperandInfo &info, const void *buffer, const size_t size, ir::Layout layout)
40 : info(info), buffer(buffer), size(size), layout(layout)
47 // not `const` because shape should be modified after execution in case when output is
52 const ir::Layout layout;
54 OutputDesc(void) = delete;
55 OutputDesc(const ir::OperandInfo &info, void *buffer, const size_t size, ir::Layout layout)
56 : info(info), buffer(buffer), size(size), layout(layout)
63 std::vector<std::unique_ptr<InputDesc>> inputs;
64 std::vector<std::unique_ptr<OutputDesc>> outputs;
65 // Contains shape of input set by set_input_tensorinfo
66 std::unordered_map<ir::IOIndex, ir::Shape> input_shape_signature;
72 #endif // __ONERT_EXEC_IO_DESCRIPTION_H__