aboutsummaryrefslogtreecommitdiff
path: root/src/armnn/layers/LayerCloneBase.hpp
blob: 348b1f3bf6cc435553851c3cd4ebe3e2ef6eb288 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
//
// Copyright © 2017 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
#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->BackendSelectionHint(GetBackendHint());
    layer->SetBackendId(GetBackendId());
    layer->SetGuid(GetGuid());
    layer->SetShapeInferenceMethod(m_ShapeInferenceMethod);

    return layer;
}

} // namespace