ArmNN  NotReleased
ISerializer.hpp
Go to the documentation of this file.
1 //
2 // Copyright © 2017 Arm Ltd. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 #pragma once
6 
7 #include "armnn/INetwork.hpp"
8 #include "armnn/NetworkFwd.hpp"
9 #include "armnn/Types.hpp"
10 
11 namespace armnnSerializer
12 {
13 
14 class ISerializer;
15 using ISerializerPtr = std::unique_ptr<ISerializer, void(*)(ISerializer* serializer)>;
16 
18 {
19 public:
20  static ISerializer* CreateRaw();
21  static ISerializerPtr Create();
22  static void Destroy(ISerializer* serializer);
23 
26  virtual void Serialize(const armnn::INetwork& inNetwork) = 0;
27 
31  virtual bool SaveSerializedToStream(std::ostream& stream) = 0;
32 
33 protected:
34  virtual ~ISerializer() {}
35 };
36 
37 } //namespace armnnSerializer
virtual void Serialize(const armnn::INetwork &inNetwork)=0
std::unique_ptr< ISerializer, void(*)(ISerializer *serializer)> ISerializerPtr
Definition: ISerializer.hpp:15
static void Destroy(ISerializer *serializer)
static ISerializerPtr Create()
static ISerializer * CreateRaw()
virtual bool SaveSerializedToStream(std::ostream &stream)=0