From f4019872c1134c6fcc1d6993e5746f55c1e79208 Mon Sep 17 00:00:00 2001 From: Nikhil Raj Date: Tue, 8 Mar 2022 20:01:38 +0000 Subject: IVGCVSW-6819 Fix the directory structure and broken link to latest docu Signed-off-by: Nikhil Raj Change-Id: I05b559d15faf92c76ff536719693b361316be4f3 --- ...izer_1_1_i_serializer_1_1_serializer_impl.xhtml | 261 +++++++++++++++++++++ 1 file changed, 261 insertions(+) create mode 100644 22.02/classarmnn_serializer_1_1_i_serializer_1_1_serializer_impl.xhtml (limited to '22.02/classarmnn_serializer_1_1_i_serializer_1_1_serializer_impl.xhtml') diff --git a/22.02/classarmnn_serializer_1_1_i_serializer_1_1_serializer_impl.xhtml b/22.02/classarmnn_serializer_1_1_i_serializer_1_1_serializer_impl.xhtml new file mode 100644 index 0000000000..3fd109000c --- /dev/null +++ b/22.02/classarmnn_serializer_1_1_i_serializer_1_1_serializer_impl.xhtml @@ -0,0 +1,261 @@ + + + + + + + + + + + + + +ArmNN: ISerializer::SerializerImpl Class Reference + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  22.02 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
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 347 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 2411 of file Serializer.cpp.

+ +

References armnn::numeric_cast().

+
2412 {
2413  flatbuffers::FlatBufferBuilder& fbBuilder = m_SerializerStrategy.GetFlatBufferBuilder();
2414 
2415  auto bytesToWrite = armnn::numeric_cast<std::streamsize>(fbBuilder.GetSize());
2416  stream.write(reinterpret_cast<const char*>(fbBuilder.GetBufferPointer()), bytesToWrite);
2417  return !stream.bad();
2418 }
flatbuffers::FlatBufferBuilder & GetFlatBufferBuilder()
Definition: Serializer.hpp:36
+
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 2392 of file Serializer.cpp.

+ +

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

+
2393 {
2394  // Iterate through to network
2395  inNetwork.ExecuteStrategy(m_SerializerStrategy);
2396  flatbuffers::FlatBufferBuilder& fbBuilder = m_SerializerStrategy.GetFlatBufferBuilder();
2397 
2398  // Create FlatBuffer SerializedGraph
2399  auto serializedGraph = serializer::CreateSerializedGraph(
2400  fbBuilder,
2401  fbBuilder.CreateVector(m_SerializerStrategy.GetSerializedLayers()),
2402  fbBuilder.CreateVector(m_SerializerStrategy.GetInputIds()),
2403  fbBuilder.CreateVector(m_SerializerStrategy.GetOutputIds()),
2404  m_SerializerStrategy.GetVersionTable());
2405 
2406  // Serialize the graph
2407  fbBuilder.Finish(serializedGraph);
2408 }
ARMNN_NO_DEPRECATE_WARN_END void ExecuteStrategy(IStrategy &strategy) const
Definition: Network.cpp:482
+
flatbuffers::FlatBufferBuilder & GetFlatBufferBuilder()
Definition: Serializer.hpp:36
+
std::vector< int > & GetInputIds()
Definition: Serializer.hpp:41
+
std::vector< int > & GetOutputIds()
Definition: Serializer.hpp:46
+
std::vector< flatbuffers::Offset< armnnSerializer::AnyLayer > > & GetSerializedLayers()
Definition: Serializer.hpp:51
+
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