diff options
Diffstat (limited to 'src/backends/backendsCommon/test/CommonTestUtils.hpp')
-rw-r--r-- | src/backends/backendsCommon/test/CommonTestUtils.hpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/backends/backendsCommon/test/CommonTestUtils.hpp b/src/backends/backendsCommon/test/CommonTestUtils.hpp new file mode 100644 index 0000000000..68180fb289 --- /dev/null +++ b/src/backends/backendsCommon/test/CommonTestUtils.hpp @@ -0,0 +1,22 @@ +// +// Copyright © 2017 Arm Ltd. All rights reserved. +// SPDX-License-Identifier: MIT +// +#pragma once + +#include <Graph.hpp> + +using namespace armnn; + +namespace +{ + +// Connects two layers. +void Connect(IConnectableLayer* from, IConnectableLayer* to, const TensorInfo& tensorInfo, + unsigned int fromIndex = 0, unsigned int toIndex = 0) +{ + from->GetOutputSlot(fromIndex).Connect(to->GetInputSlot(toIndex)); + from->GetOutputSlot(fromIndex).SetTensorInfo(tensorInfo); +} + +} |