2 * Copyright (c) 2018 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.
20 #include <tflchef.pb.h>
21 #include <mio/tflite/schema_generated.h>
27 virtual ~OpChef() = default;
29 virtual tflite::BuiltinOperator code(void) const = 0;
30 virtual tflite::BuiltinOptions type(void) const = 0;
31 virtual flatbuffers::Offset<void> value(flatbuffers::FlatBufferBuilder &fbb) const = 0;
33 // TODO Find a way to place this method in a better place
34 virtual flatbuffers::Offset<flatbuffers::Vector<uint8_t>>
35 custom_value(flatbuffers::FlatBufferBuilder &fbb) const
37 return flatbuffers::Offset<flatbuffers::Vector<uint8_t>>();
43 virtual ~OpChefFactory() = default;
45 virtual std::unique_ptr<OpChef> create(const tflchef::Operation *operation) const = 0;
48 #endif // __OP_CHEF_H__