aboutsummaryrefslogtreecommitdiff
path: root/src/armnnDeserializeParser/DeserializeParser.hpp
diff options
context:
space:
mode:
authorDerek Lamberti <derek.lamberti@arm.com>2019-02-18 16:36:57 +0000
committerMatteo Martincigh <matteo.martincigh@arm.com>2019-02-19 17:07:12 +0000
commit2b183fb359774cbac5d628579ec2b4a7b6b41def (patch)
tree764f4ee3293bc419ee204b1685d17bb59df410ac /src/armnnDeserializeParser/DeserializeParser.hpp
parent263829c2163d79a28f98f24f9dd1e52e1c3cbbef (diff)
downloadarmnn-2b183fb359774cbac5d628579ec2b4a7b6b41def.tar.gz
IVGCVSW-2736 Deserialize using istream instead of filename
Change-Id: I5656b23d9783e7f953e677001d16e41eedeb42b2 Signed-off-by: Derek Lamberti <derek.lamberti@arm.com>
Diffstat (limited to 'src/armnnDeserializeParser/DeserializeParser.hpp')
-rw-r--r--src/armnnDeserializeParser/DeserializeParser.hpp19
1 files changed, 7 insertions, 12 deletions
diff --git a/src/armnnDeserializeParser/DeserializeParser.hpp b/src/armnnDeserializeParser/DeserializeParser.hpp
index 666cbca33c..aee647c636 100644
--- a/src/armnnDeserializeParser/DeserializeParser.hpp
+++ b/src/armnnDeserializeParser/DeserializeParser.hpp
@@ -25,26 +25,25 @@ public:
public:
- /// Create the network from a flatbuffers binary file on disk
- virtual armnn::INetworkPtr CreateNetworkFromBinaryFile(const char* graphFile) override;
+ /// Create an input network from binary file contents
+ armnn::INetworkPtr CreateNetworkFromBinary(const std::vector<uint8_t>& binaryContent) override;
- virtual armnn::INetworkPtr CreateNetworkFromBinary(const std::vector<uint8_t>& binaryContent) override;
+ /// Create an input network from a binary input stream
+ armnn::INetworkPtr CreateNetworkFromBinary(std::istream& binaryContent) override;
/// Retrieve binding info (layer id and tensor info) for the network input identified by the given layer name
- virtual BindingPointInfo GetNetworkInputBindingInfo(unsigned int layerId,
- const std::string& name) const override;
+ BindingPointInfo GetNetworkInputBindingInfo(unsigned int layerId, const std::string& name) const override;
/// Retrieve binding info (layer id and tensor info) for the network output identified by the given layer name
- virtual BindingPointInfo GetNetworkOutputBindingInfo(unsigned int layerId,
- const std::string& name) const override;
+ BindingPointInfo GetNetworkOutputBindingInfo(unsigned int layerId, const std::string& name) const override;
DeserializeParser();
~DeserializeParser() {}
public:
// testable helpers
- static GraphPtr LoadGraphFromFile(const char* fileName, std::string& fileContent);
static GraphPtr LoadGraphFromBinary(const uint8_t* binaryContent, size_t len);
+ static GraphPtr LoadGraphFromBinary(std::istream& binaryContent);
static TensorRawPtrVector GetInputs(const GraphPtr& graph, unsigned int layerIndex);
static TensorRawPtrVector GetOutputs(const GraphPtr& graph, unsigned int layerIndex);
static LayerBaseRawPtrVector GetGraphInputs(const GraphPtr& graphPtr);
@@ -91,10 +90,6 @@ private:
std::vector<LayerParsingFunction> m_ParserFunctions;
std::string m_layerName;
- /// This holds the data of the file that was read in from CreateNetworkFromBinaryFile
- /// Needed for m_Graph to point to
- std::string m_FileContent;
-
/// A mapping of an output slot to each of the input slots it should be connected to
/// The outputSlot is from the layer that creates this tensor as one of its outputs
/// The inputSlots are from the layers that use this tensor as one of their inputs