ArmNN
 22.08
TestConstantLayerVisitor Class Reference

#include <ConstTensorLayerVisitor.hpp>

Inheritance diagram for TestConstantLayerVisitor:
TestLayerVisitor StrategyBase< NoThrowStrategy > IStrategy

Public Member Functions

 TestConstantLayerVisitor (const ConstTensor &input, const char *name=nullptr)
 
void ExecuteStrategy (const armnn::IConnectableLayer *layer, const armnn::BaseDescriptor &descriptor, const std::vector< armnn::ConstTensor > &constants, const char *name, const armnn::LayerBindingId id=0) override
 
- Public Member Functions inherited from TestLayerVisitor
 TestLayerVisitor (const char *name)
 
- Public Member Functions inherited from IStrategy
virtual void FinishStrategy ()
 

Additional Inherited Members

- Protected Member Functions inherited from TestLayerVisitor
virtual ~TestLayerVisitor ()
 
void CheckLayerName (const char *name)
 
void CheckLayerPointer (const IConnectableLayer *layer)
 
void CheckConstTensors (const ConstTensor &expected, const ConstTensor &actual)
 
void CheckConstTensors (const ConstTensor &expected, const ConstTensorHandle &actual)
 
void CheckConstTensorPtrs (const std::string &name, const ConstTensor *expected, const ConstTensor *actual)
 
void CheckConstTensorPtrs (const std::string &name, const ConstTensor *expected, const std::shared_ptr< ConstTensorHandle > actual)
 
void CheckOptionalConstTensors (const Optional< ConstTensor > &expected, const Optional< ConstTensor > &actual)
 
- Protected Member Functions inherited from StrategyBase< NoThrowStrategy >
virtual ~StrategyBase ()
 
- Protected Member Functions inherited from IStrategy
 IStrategy ()
 
virtual ~IStrategy ()
 
- Protected Attributes inherited from StrategyBase< NoThrowStrategy >
NoThrowStrategy m_DefaultStrategy
 

Detailed Description

Definition at line 197 of file ConstTensorLayerVisitor.hpp.

Constructor & Destructor Documentation

◆ TestConstantLayerVisitor()

TestConstantLayerVisitor ( const ConstTensor input,
const char *  name = nullptr 
)
inlineexplicit

Definition at line 200 of file ConstTensorLayerVisitor.hpp.

202  : TestLayerVisitor(name)
203  , m_Input(input)
204  {}
TestLayerVisitor(const char *name)

Member Function Documentation

◆ ExecuteStrategy()

void ExecuteStrategy ( const armnn::IConnectableLayer layer,
const armnn::BaseDescriptor descriptor,
const std::vector< armnn::ConstTensor > &  constants,
const char *  name,
const armnn::LayerBindingId  id = 0 
)
inlineoverridevirtual

Reimplemented from StrategyBase< NoThrowStrategy >.

Definition at line 206 of file ConstTensorLayerVisitor.hpp.

References NoThrowStrategy::Apply(), TestLayerVisitor::CheckConstTensors(), TestLayerVisitor::CheckLayerName(), TestLayerVisitor::CheckLayerPointer(), armnn::Constant, armnn::GetLayerTypeAsCString(), IConnectableLayer::GetType(), armnn::IgnoreUnused(), and StrategyBase< NoThrowStrategy >::m_DefaultStrategy.

211  {
212  armnn::IgnoreUnused(descriptor, constants, id);
213  switch (layer->GetType())
214  {
216  {
217  CheckLayerPointer(layer);
218  CheckLayerName(name);
219  CheckConstTensors(m_Input, constants[0]);
220  break;
221  }
222  default:
223  {
225  }
226  }
227  }
void CheckLayerName(const char *name)
void CheckLayerPointer(const IConnectableLayer *layer)
void IgnoreUnused(Ts &&...)
void CheckConstTensors(const ConstTensor &expected, const ConstTensor &actual)
void Apply(const std::string &)
virtual LayerType GetType() const =0
Returns the armnn::LayerType of this layer.
const char * GetLayerTypeAsCString(LayerType type)

The documentation for this class was generated from the following file: