aboutsummaryrefslogtreecommitdiff
path: root/include/armnnDeserializer/IDeserializer.hpp
diff options
context:
space:
mode:
authorDerek Lamberti <derek.lamberti@arm.com>2019-02-20 13:57:42 +0000
committerDerek Lamberti <derek.lamberti@arm.com>2019-02-20 15:41:32 +0000
commit0028d1b0ce5f4c2c6a6eb3c66f38111c21eb47a3 (patch)
tree894d7ac05ef1610bad636e24489248e6c472b313 /include/armnnDeserializer/IDeserializer.hpp
parentbe25fc18f7e55bc39f537601e42a9d5c9d0c111f (diff)
downloadarmnn-0028d1b0ce5f4c2c6a6eb3c66f38111c21eb47a3.tar.gz
IVGSVSW-2736 Rename DeserializeParser => Deserializer & fix namespaces
Change-Id: I4166c0bbb5ba7f8b8884e71134c21f43d1fc27b0 Signed-off-by: Derek Lamberti <derek.lamberti@arm.com>
Diffstat (limited to 'include/armnnDeserializer/IDeserializer.hpp')
-rw-r--r--include/armnnDeserializer/IDeserializer.hpp50
1 files changed, 50 insertions, 0 deletions
diff --git a/include/armnnDeserializer/IDeserializer.hpp b/include/armnnDeserializer/IDeserializer.hpp
new file mode 100644
index 0000000000..11e098a523
--- /dev/null
+++ b/include/armnnDeserializer/IDeserializer.hpp
@@ -0,0 +1,50 @@
+//
+// Copyright © 2017 Arm Ltd. All rights reserved.
+// SPDX-License-Identifier: MIT
+//
+#pragma once
+
+#include "armnn/Types.hpp"
+#include "armnn/NetworkFwd.hpp"
+#include "armnn/Tensor.hpp"
+#include "armnn/INetwork.hpp"
+
+#include <memory>
+#include <map>
+#include <vector>
+
+namespace armnnDeserializer
+{
+using BindingPointInfo = std::pair<armnn::LayerBindingId, armnn::TensorInfo>;
+
+class IDeserializer;
+using IDeserializerPtr = std::unique_ptr<IDeserializer, void(*)(IDeserializer* parser)>;
+
+class IDeserializer
+{
+public:
+ static IDeserializer* CreateRaw();
+ static IDeserializerPtr Create();
+ static void Destroy(IDeserializer* parser);
+
+ /// Create an input network from binary file contents
+ virtual armnn::INetworkPtr CreateNetworkFromBinary(const std::vector<uint8_t>& binaryContent) = 0;
+
+ /// Create an input network from a binary input stream
+ virtual armnn::INetworkPtr CreateNetworkFromBinary(std::istream& binaryContent) = 0;
+
+ /// Retrieve binding info (layer id and tensor info) for the network input identified by
+ /// the given layer name and layers id
+ virtual BindingPointInfo GetNetworkInputBindingInfo(unsigned int layerId,
+ const std::string& name) const = 0;
+
+ /// Retrieve binding info (layer id and tensor info) for the network output identified by
+ /// the given layer name and layers id
+ virtual BindingPointInfo GetNetworkOutputBindingInfo(unsigned int layerId,
+ const std::string& name) const = 0;
+
+protected:
+ virtual ~IDeserializer() {};
+
+};
+} //namespace armnnDeserializer \ No newline at end of file