diff options
author | Kevin May <kevin.may@arm.com> | 2021-01-29 14:24:57 +0000 |
---|---|---|
committer | Kevin May <kevin.may@arm.com> | 2021-02-04 11:31:51 +0000 |
commit | ef33cb192eef332fb3a26be742b341288421e5bc (patch) | |
tree | 1497367ada6382887baf698b3b8a791abca05d9d /include/armnnCaffeParser | |
parent | 7d96b16acfdbdcef6739d59ba067a37c062aa03f (diff) | |
download | armnn-ef33cb192eef332fb3a26be742b341288421e5bc.tar.gz |
IVGCVSW-5592 Implement Pimpl Idiom for Caffe and Onnx Parsers
Signed-off-by: Kevin May <kevin.may@arm.com>
Change-Id: I760dc4f33c0f87113cda2fa924da70f2e8c19025
Diffstat (limited to 'include/armnnCaffeParser')
-rw-r--r-- | include/armnnCaffeParser/ICaffeParser.hpp | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/include/armnnCaffeParser/ICaffeParser.hpp b/include/armnnCaffeParser/ICaffeParser.hpp index a1ba59fbc6..0e31ad4461 100644 --- a/include/armnnCaffeParser/ICaffeParser.hpp +++ b/include/armnnCaffeParser/ICaffeParser.hpp @@ -29,31 +29,38 @@ public: static void Destroy(ICaffeParser* parser); /// Create the network from a protobuf text file on the disk. - virtual armnn::INetworkPtr CreateNetworkFromTextFile( + armnn::INetworkPtr CreateNetworkFromTextFile( const char* graphFile, const std::map<std::string, armnn::TensorShape>& inputShapes, - const std::vector<std::string>& requestedOutputs) = 0; + const std::vector<std::string>& requestedOutputs); /// Create the network from a protobuf binary file on the disk. - virtual armnn::INetworkPtr CreateNetworkFromBinaryFile( + armnn::INetworkPtr CreateNetworkFromBinaryFile( const char* graphFile, const std::map<std::string, armnn::TensorShape>& inputShapes, - const std::vector<std::string>& requestedOutputs) = 0; + const std::vector<std::string>& requestedOutputs); /// Create the network directly from protobuf text in a string. Useful for debugging/testin.g - virtual armnn::INetworkPtr CreateNetworkFromString( + armnn::INetworkPtr CreateNetworkFromString( const char* protoText, const std::map<std::string, armnn::TensorShape>& inputShapes, - const std::vector<std::string>& requestedOutputs) = 0; + const std::vector<std::string>& requestedOutputs); /// Retrieve binding info (layer id and tensor info) for the network input identified by the given layer name. - virtual BindingPointInfo GetNetworkInputBindingInfo(const std::string& name) const = 0; + BindingPointInfo GetNetworkInputBindingInfo(const std::string& name) const; /// Retrieve binding info (layer id and tensor info) for the network output identified by the given layer name. - virtual BindingPointInfo GetNetworkOutputBindingInfo(const std::string& name) const = 0; + BindingPointInfo GetNetworkOutputBindingInfo(const std::string& name) const; -protected: - virtual ~ICaffeParser() {}; +private: + friend class CaffeParser; + friend class RecordByRecordCaffeParser; + + ICaffeParser(); + ~ICaffeParser(); + + class CaffeParserImpl; + std::unique_ptr<CaffeParserImpl> pCaffeParserImpl; }; }
\ No newline at end of file |