ArmNN
 21.02
TestUtils.cpp File Reference

Go to the source code of this file.

Namespaces

 armnn
 Copyright (c) 2021 ARM Limited and Contributors.
 

Functions

void Connect (armnn::IConnectableLayer *from, armnn::IConnectableLayer *to, const armnn::TensorInfo &tensorInfo, unsigned int fromIndex, unsigned int toIndex)
 
GraphGetGraphForTesting (IOptimizedNetwork *optNet)
 
ModelOptionsGetModelOptionsForTesting (IOptimizedNetwork *optNet)
 
profiling::ProfilingServiceGetProfilingService (armnn::RuntimeImpl *runtime)
 

Function Documentation

◆ Connect()

void Connect ( armnn::IConnectableLayer from,
armnn::IConnectableLayer to,
const armnn::TensorInfo tensorInfo,
unsigned int  fromIndex,
unsigned int  toIndex 
)

Definition at line 12 of file TestUtils.cpp.

References ARMNN_ASSERT, IOutputSlot::Connect(), IConnectableLayer::GetInputSlot(), IConnectableLayer::GetOutputSlot(), and IOutputSlot::SetTensorInfo().

Referenced by BOOST_AUTO_TEST_CASE(), OutputSlot::Connect(), CreatePreluLayerHelper(), CreateStackLayerHelper(), OutputSlot::GetOutputHandler(), ICaffeParser::CaffeParserImpl::ParseArgmaxLayer(), ICaffeParser::CaffeParserImpl::ParseBatchNormLayer(), ICaffeParser::CaffeParserImpl::ParseEltwiseLayer(), ICaffeParser::CaffeParserImpl::ParseInnerProductLayer(), ICaffeParser::CaffeParserImpl::ParseLRNLayer(), ICaffeParser::CaffeParserImpl::ParsePoolingLayer(), ICaffeParser::CaffeParserImpl::ParseReluLayer(), ICaffeParser::CaffeParserImpl::ParseScaleLayer(), ICaffeParser::CaffeParserImpl::ParseSoftmaxLayer(), and QLstmEndToEnd().

14 {
15  ARMNN_ASSERT(from);
16  ARMNN_ASSERT(to);
17 
18  from->GetOutputSlot(fromIndex).Connect(to->GetInputSlot(toIndex));
19  from->GetOutputSlot(fromIndex).SetTensorInfo(tensorInfo);
20 }
virtual void SetTensorInfo(const TensorInfo &tensorInfo)=0
#define ARMNN_ASSERT(COND)
Definition: Assert.hpp:14
virtual const IInputSlot & GetInputSlot(unsigned int index) const =0
Get a const input slot handle by slot index.
virtual const IOutputSlot & GetOutputSlot(unsigned int index) const =0
Get the const output slot handle by slot index.
virtual int Connect(IInputSlot &destination)=0