aboutsummaryrefslogtreecommitdiff
path: root/src/armnn/layers/LayerCloneBase.hpp
blob: a8ff52b86a1ea7cc650a6330e7c2f64f29264db7 (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
//
// 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->SetBackendId(GetBackendId());
    layer->SetGuid(GetGuid());
    layer->SetShapeInferenceMethod(m_ShapeInferenceMethod);

    return layer;
}

} // namespace