22.05.01
TestNameOnlyLayerVisitor.hpp
Go to the documentation of this file.
1
//
2
// Copyright © 2017 Arm Ltd and Contributors. All rights reserved.
3
// SPDX-License-Identifier: MIT
4
//
5
#pragma once
6
7
#include "
TestLayerVisitor.hpp
"
8
9
namespace
10
{
11
12
#define DECLARE_TEST_NAME_ONLY_LAYER_VISITOR_CLASS(name) \
13
class Test##name##LayerVisitor : public armnn::TestLayerVisitor \
14
{ \
15
public: \
16
explicit Test##name##LayerVisitor(const char* layerName = nullptr) : armnn::TestLayerVisitor(layerName) {}; \
17
\
18
void ExecuteStrategy(const armnn::IConnectableLayer* layer, \
19
const armnn::BaseDescriptor& descriptor, \
20
const std::vector<armnn::ConstTensor>& constants, \
21
const char* layerName, \
22
const armnn::LayerBindingId id = 0) override \
23
{ \
24
armnn::IgnoreUnused(descriptor, constants, id); \
25
switch (layer->GetType()) \
26
{ \
27
case armnn::LayerType::name: \
28
{ \
29
CheckLayerPointer(layer); \
30
CheckLayerName(layerName); \
31
break; \
32
} \
33
default: \
34
{ \
35
m_DefaultStrategy.Apply(GetLayerTypeAsCString(layer->GetType())); \
36
} \
37
} \
38
} \
39
\
40
};
41
42
}
// anonymous namespace
43
44
DECLARE_TEST_NAME_ONLY_LAYER_VISITOR_CLASS
(Addition)
45
DECLARE_TEST_NAME_ONLY_LAYER_VISITOR_CLASS
(
Dequantize
)
46
DECLARE_TEST_NAME_ONLY_LAYER_VISITOR_CLASS
(Division)
47
DECLARE_TEST_NAME_ONLY_LAYER_VISITOR_CLASS
(Floor)
48
DECLARE_TEST_NAME_ONLY_LAYER_VISITOR_CLASS
(Maximum)
49
DECLARE_TEST_NAME_ONLY_LAYER_VISITOR_CLASS
(Merge)
50
DECLARE_TEST_NAME_ONLY_LAYER_VISITOR_CLASS
(Minimum)
51
DECLARE_TEST_NAME_ONLY_LAYER_VISITOR_CLASS
(Multiplication)
52
DECLARE_TEST_NAME_ONLY_LAYER_VISITOR_CLASS
(Prelu)
53
DECLARE_TEST_NAME_ONLY_LAYER_VISITOR_CLASS
(
Quantize
)
54
DECLARE_TEST_NAME_ONLY_LAYER_VISITOR_CLASS
(Rank)
55
DECLARE_TEST_NAME_ONLY_LAYER_VISITOR_CLASS
(Subtraction)
56
DECLARE_TEST_NAME_ONLY_LAYER_VISITOR_CLASS
(Switch)
TestLayerVisitor.hpp
armnn::Dequantize
float Dequantize(QuantizedType value, float scale, int32_t offset)
Dequantize an 8-bit data type into a floating point data type.
Definition:
TypesUtils.cpp:46
DECLARE_TEST_NAME_ONLY_LAYER_VISITOR_CLASS
#define DECLARE_TEST_NAME_ONLY_LAYER_VISITOR_CLASS(name)
Definition:
TestNameOnlyLayerVisitor.hpp:12
armnn::Quantize
QuantizedType Quantize(float value, float scale, int32_t offset)
Quantize a floating point data type into an 8-bit data type.
Definition:
TypesUtils.cpp:30
src
armnn
test
TestNameOnlyLayerVisitor.hpp
Generated on Fri Jun 17 2022 13:19:42 for ArmNN by
1.8.13