diff options
author | surmeh01 <surabhi.mehta@arm.com> | 2018-05-18 16:31:43 +0100 |
---|---|---|
committer | telsoa01 <telmo.soares@arm.com> | 2018-05-23 13:09:07 +0100 |
commit | 3537c2ca7ebf31c1673b9ec2bb0c17b0406bbae0 (patch) | |
tree | 5950603ad78ec3fe56fb31ddc7f4d52a19f5bc60 /src/armnn/layers/LayerCloneBase.hpp | |
parent | bceff2fb3fc68bb0aa88b886900c34b77340c826 (diff) | |
download | armnn-3537c2ca7ebf31c1673b9ec2bb0c17b0406bbae0.tar.gz |
Release 18.05
Diffstat (limited to 'src/armnn/layers/LayerCloneBase.hpp')
-rw-r--r-- | src/armnn/layers/LayerCloneBase.hpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/armnn/layers/LayerCloneBase.hpp b/src/armnn/layers/LayerCloneBase.hpp new file mode 100644 index 0000000000..fbd8629c94 --- /dev/null +++ b/src/armnn/layers/LayerCloneBase.hpp @@ -0,0 +1,24 @@ +// +// Copyright © 2017 Arm Ltd. All rights reserved. +// See LICENSE file in the project root for full license information. +// +#pragma once + +#include <Layer.hpp> +#include <Graph.hpp> + +namespace armnn +{ + +template <typename LayerType, typename ... Params> +LayerType* Layer::CloneBase(Graph& graph, Params&& ... params) const +{ + LayerType* const layer = graph.AddLayer<LayerType>(std::forward<Params>(params)...); + + layer->SetComputeDevice(m_ComputeDevice); + layer->SetGuid(GetGuid()); + + return layer; +} + +} // namespace |