From add078b7f9a658d52ee6e8fe6771ea0517c07674 Mon Sep 17 00:00:00 2001 From: mathad01 Date: Mon, 10 May 2021 16:51:20 +0100 Subject: IVGCVSW-5908 Update 21.05 Doxygen Documents Signed-off-by: mathad01 Change-Id: I95316d4fc5f9d10185492dc835bb2411c1daea7b --- ...izer_1_1_i_serializer_1_1_serializer_impl.xhtml | 261 +++++++++++++++++++++ 1 file changed, 261 insertions(+) create mode 100644 21.05/classarmnn_serializer_1_1_i_serializer_1_1_serializer_impl.xhtml (limited to '21.05/classarmnn_serializer_1_1_i_serializer_1_1_serializer_impl.xhtml') diff --git a/21.05/classarmnn_serializer_1_1_i_serializer_1_1_serializer_impl.xhtml b/21.05/classarmnn_serializer_1_1_i_serializer_1_1_serializer_impl.xhtml new file mode 100644 index 0000000000..46f373d879 --- /dev/null +++ b/21.05/classarmnn_serializer_1_1_i_serializer_1_1_serializer_impl.xhtml @@ -0,0 +1,261 @@ + + + + + + + + + + + + + +ArmNN: ISerializer::SerializerImpl Class Reference + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  21.05 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
ISerializer::SerializerImpl Class Reference
+
+
+ +

#include <Serializer.hpp>

+ + + + + + + + + + + + +

+Public Member Functions

 SerializerImpl ()=default
 
 ~SerializerImpl ()=default
 
void Serialize (const armnn::INetwork &inNetwork)
 Serializes the network to ArmNN SerializedGraph. More...
 
bool SaveSerializedToStream (std::ostream &stream)
 Serializes the SerializedGraph to the stream. More...
 
+

Detailed Description

+
+

Definition at line 350 of file Serializer.hpp.

+

Constructor & Destructor Documentation

+ +

◆ SerializerImpl()

+ +
+
+ + + + + +
+ + + + + + + +
SerializerImpl ()
+
+default
+
+ +
+
+ +

◆ ~SerializerImpl()

+ +
+
+ + + + + +
+ + + + + + + +
~SerializerImpl ()
+
+default
+
+ +
+
+

Member Function Documentation

+ +

◆ SaveSerializedToStream()

+ +
+
+ + + + + + + + +
bool SaveSerializedToStream (std::ostream & stream)
+
+ +

Serializes the SerializedGraph to the stream.

+
Parameters
+ + +
[stream]the stream to save to
+
+
+
Returns
true if graph is Serialized to the Stream, false otherwise
+ +

Definition at line 2249 of file Serializer.cpp.

+ +

References armnn::numeric_cast().

+
2250 {
2251  flatbuffers::FlatBufferBuilder& fbBuilder = m_SerializerStrategy.GetFlatBufferBuilder();
2252 
2253  auto bytesToWrite = armnn::numeric_cast<std::streamsize>(fbBuilder.GetSize());
2254  stream.write(reinterpret_cast<const char*>(fbBuilder.GetBufferPointer()), bytesToWrite);
2255  return !stream.bad();
2256 }
flatbuffers::FlatBufferBuilder & GetFlatBufferBuilder()
Definition: Serializer.hpp:34
+
std::enable_if_t< std::is_unsigned< Source >::value &&std::is_unsigned< Dest >::value, Dest > numeric_cast(Source source)
Definition: NumericCast.hpp:35
+
+
+
+ +

◆ Serialize()

+ +
+
+ + + + + + + + +
void Serialize (const armnn::INetworkinNetwork)
+
+ +

Serializes the network to ArmNN SerializedGraph.

+
Parameters
+ + +
[in]inNetworkThe network to be serialized.
+
+
+ +

Definition at line 2230 of file Serializer.cpp.

+ +

References armnnSerializer::CreateSerializedGraph(), and INetwork::ExecuteStrategy().

+
2231 {
2232  // Iterate through to network
2233  inNetwork.ExecuteStrategy(m_SerializerStrategy);
2234  flatbuffers::FlatBufferBuilder& fbBuilder = m_SerializerStrategy.GetFlatBufferBuilder();
2235 
2236  // Create FlatBuffer SerializedGraph
2237  auto serializedGraph = serializer::CreateSerializedGraph(
2238  fbBuilder,
2239  fbBuilder.CreateVector(m_SerializerStrategy.GetSerializedLayers()),
2240  fbBuilder.CreateVector(m_SerializerStrategy.GetInputIds()),
2241  fbBuilder.CreateVector(m_SerializerStrategy.GetOutputIds()),
2242  m_SerializerStrategy.GetVersionTable());
2243 
2244  // Serialize the graph
2245  fbBuilder.Finish(serializedGraph);
2246 }
void ExecuteStrategy(IStrategy &strategy) const
Definition: Network.cpp:519
+
flatbuffers::FlatBufferBuilder & GetFlatBufferBuilder()
Definition: Serializer.hpp:34
+
std::vector< int > & GetInputIds()
Definition: Serializer.hpp:39
+
std::vector< int > & GetOutputIds()
Definition: Serializer.hpp:44
+
std::vector< flatbuffers::Offset< armnnSerializer::AnyLayer > > & GetSerializedLayers()
Definition: Serializer.hpp:49
+
flatbuffers::Offset< armnnSerializer::FeatureCompatibilityVersions > GetVersionTable()
+
flatbuffers::Offset< SerializedGraph > CreateSerializedGraph(flatbuffers::FlatBufferBuilder &_fbb, flatbuffers::Offset< flatbuffers::Vector< flatbuffers::Offset< armnnSerializer::AnyLayer >>> layers=0, flatbuffers::Offset< flatbuffers::Vector< int32_t >> inputIds=0, flatbuffers::Offset< flatbuffers::Vector< int32_t >> outputIds=0, flatbuffers::Offset< armnnSerializer::FeatureCompatibilityVersions > featureVersions=0)
+
+
+
+
The documentation for this class was generated from the following files: +
+
+ + + + -- cgit v1.2.1