2 // Copyright © 2017 Arm Ltd. All rights reserved.
3 // SPDX-License-Identifier: MIT
7 #include "armnn/INetwork.hpp"
8 #include "armnn/NetworkFwd.hpp"
9 #include "armnn/Types.hpp"
11 namespace armnnSerializer
15 using ISerializerPtr = std::unique_ptr<ISerializer, void(*)(ISerializer* serializer)>;
20 static ISerializer* CreateRaw();
21 static ISerializerPtr Create();
22 static void Destroy(ISerializer* serializer);
24 /// Serializes the network to ArmNN SerializedGraph.
25 /// @param [in] inNetwork The network to be serialized.
26 void Serialize(const armnn::INetwork& inNetwork);
28 /// Serializes the SerializedGraph to the stream.
29 /// @param [stream] the stream to save to
30 /// @return true if graph is Serialized to the Stream, false otherwise
31 bool SaveSerializedToStream(std::ostream& stream);
38 std::unique_ptr<SerializerImpl> pSerializerImpl;
41 } //namespace armnnSerializer