diff options
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 |