ONE - On-device Neural Engine
Loading...
Searching...
No Matches
CircleExporterImpl.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved
3 *
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
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
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.
15 */
16
17#ifndef __CIRCLE_EXPORTER_IMPL_H__
18#define __CIRCLE_EXPORTER_IMPL_H__
19
20#include "luci/CircleExporter.h"
21#include "luci/IR/Module.h"
22
23#include "SerializedData.h"
24
25#include <mio/circle/schema_generated.h>
26
27#include <loco.h>
28
29namespace luci
30{
31
36{
37public:
40
41 explicit CircleExporterImpl(Module *module);
42
46 const char *getBufferPointer() const;
47
51 size_t getBufferSize() const;
52
53private:
60
65 void exportModule(Module *module);
66
70 bool exportModuleData(Module *module, SerializedModelData &md);
71
75 void finalizeWithExtendedBuffer(SerializedModelData &md);
76
77private:
79 bool _ext_buffer = false;
80 std::string _fb_data_with_ext;
81};
82
83} // namespace luci
84
85#endif // __CIRCLE_EXPORTER_IMPL_H__
Helper class to hold data needed in creation of a FlatBuffer. To serialize data, you typically call o...
const char * getBufferPointer() const
Collection of 'loco::Graph's.
Definition Module.h:33