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
29
namespace
luci
30
{
31
35
class
CircleExporterImpl
36
{
37
public
:
38
CircleExporterImpl
() =
delete
;
39
~CircleExporterImpl
() =
default
;
40
41
explicit
CircleExporterImpl
(
Module
*module);
42
46
const
char
*
getBufferPointer
()
const
;
47
51
size_t
getBufferSize
()
const
;
52
53
private
:
59
flatbuffers::Offset<circle::SubGraph>
exportSubgraph(
SerializedGraphData
&gd);
60
65
void
exportModule(
Module
*module);
66
70
bool
exportModuleData(
Module
*module,
SerializedModelData
&md);
71
75
void
finalizeWithExtendedBuffer(
SerializedModelData
&md);
76
77
private
:
78
flatbuffers::FlatBufferBuilder
_builder;
79
bool
_ext_buffer =
false
;
80
std::string _fb_data_with_ext;
81
};
82
83
}
// namespace luci
84
85
#endif
// __CIRCLE_EXPORTER_IMPL_H__
SerializedData.h
flatbuffers::FlatBufferBuilder
Helper class to hold data needed in creation of a FlatBuffer. To serialize data, you typically call o...
Definition
flatbuffers.h:1172
luci::CircleExporterImpl
Definition
CircleExporterImpl.h:36
luci::CircleExporterImpl::CircleExporterImpl
CircleExporterImpl()=delete
luci::CircleExporterImpl::getBufferPointer
const char * getBufferPointer() const
Definition
CircleExporterImpl.cpp:311
luci::CircleExporterImpl::getBufferSize
size_t getBufferSize() const
Definition
CircleExporterImpl.cpp:318
luci::CircleExporterImpl::~CircleExporterImpl
~CircleExporterImpl()=default
luci::Module
Collection of 'loco::Graph's.
Definition
Module.h:33
CircleExporter.h
loco.h
Module.h
luci
Definition
DepthwiseConv2D.h:24
flatbuffers::Offset
Definition
flatbuffers.h:70
luci::SerializedGraphData
Definition
SerializedData.h:155
luci::SerializedModelData
Definition
SerializedData.h:120
compiler
luci
export
src
CircleExporterImpl.h
Generated by
1.9.8