diff options
author | Matteo Martincigh <matteo.martincigh@arm.com> | 2019-04-17 15:37:30 +0100 |
---|---|---|
committer | Matteo Martincigh <matteo.martincigh@arm.com> | 2019-04-18 08:50:28 +0100 |
commit | 7997a3527218ed821ec933ef3a5e6a3f07409b21 (patch) | |
tree | eeb2db8e8bdebf7f2661b68890ff6d31def7f620 /src/armnn/layers/PreCompiledLayer.hpp | |
parent | c2ebc63baf19ab6c3da6ae7a982c9eba0c0d85be (diff) | |
download | armnn-7997a3527218ed821ec933ef3a5e6a3f07409b21.tar.gz |
IVGCVSW-2980 Build ArmNN with the latest version of the driver stack library
* Changed the pre-compiled object held by the pre-compiled layer into
a unique pointer, so that now the layer has the ownership of it
* Changed the pre-compiled object held by the descriptor and the workload
into a naked pointer, to leave the ownership to the layer
Change-Id: I4a582e45ca0aa3978e8e40b786c743a6eddce852
Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com>
Diffstat (limited to 'src/armnn/layers/PreCompiledLayer.hpp')
-rw-r--r-- | src/armnn/layers/PreCompiledLayer.hpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/armnn/layers/PreCompiledLayer.hpp b/src/armnn/layers/PreCompiledLayer.hpp index 854a78c29a..ec5a9d6478 100644 --- a/src/armnn/layers/PreCompiledLayer.hpp +++ b/src/armnn/layers/PreCompiledLayer.hpp @@ -11,10 +11,14 @@ #include <armnn/Descriptors.hpp> #include <memory> +#include <functional> namespace armnn { +using PreCompiledObjectDeleter = std::function<void(const void*)>; +using PreCompiledObjectPtr = std::unique_ptr<void, PreCompiledObjectDeleter>; + class PreCompiledLayer : public LayerWithParameters<PreCompiledDescriptor> { public: @@ -28,9 +32,7 @@ public: void ValidateTensorShapesFromInputs() override; - std::shared_ptr<void> GetPreCompiledObject() const; - - void SetPreCompiledObject(const std::shared_ptr<void>& preCompiledObject); + void SetPreCompiledObject(PreCompiledObjectPtr preCompiledObject); void Accept(ILayerVisitor& visitor) const override; @@ -38,7 +40,7 @@ private: PreCompiledLayer(const PreCompiledLayer& other) = delete; PreCompiledLayer& operator=(const PreCompiledLayer& other) = delete; - std::shared_ptr<void> m_PreCompiledObject; + PreCompiledObjectPtr m_PreCompiledObject; }; } // namespace armnn |