ArmNN
 20.02
TestNameOnlyLayerVisitor.cpp
Go to the documentation of this file.
1 //
2 // Copyright © 2017 Arm Ltd. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
7 
8 #include <Network.hpp>
9 
10 #include <boost/test/unit_test.hpp>
11 
12 namespace
13 {
14 
15 #define TEST_CASE_CHECK_LAYER_VISITOR_NAME(name) \
16 BOOST_AUTO_TEST_CASE(Check##name##LayerVisitorName) \
17 { \
18  Test##name##LayerVisitor visitor("name##Layer"); \
19  armnn::Network net; \
20  armnn::IConnectableLayer *const layer = net.Add##name##Layer("name##Layer"); \
21  layer->Accept(visitor); \
22 }
23 
24 #define TEST_CASE_CHECK_LAYER_VISITOR_NAME_NULLPTR(name) \
25 BOOST_AUTO_TEST_CASE(Check##name##LayerVisitorNameNullptr) \
26 { \
27  Test##name##LayerVisitor visitor; \
28  armnn::Network net; \
29  armnn::IConnectableLayer *const layer = net.Add##name##Layer(); \
30  layer->Accept(visitor); \
31 }
32 
33 #define TEST_SUITE_NAME_ONLY_LAYER_VISITOR(name) \
34 TEST_CASE_CHECK_LAYER_VISITOR_NAME(name) \
35 TEST_CASE_CHECK_LAYER_VISITOR_NAME_NULLPTR(name)
36 
37 } // anonymous namespace
38 
39 BOOST_AUTO_TEST_SUITE(TestNameOnlyLayerVisitor)
40 
54 
BOOST_AUTO_TEST_SUITE(TensorflowLiteParser)
#define TEST_SUITE_NAME_ONLY_LAYER_VISITOR(name)
float Dequantize(QuantizedType value, float scale, int32_t offset)
Dequantize an 8-bit data type into a floating point data type.
Definition: TypesUtils.cpp:47
QuantizedType Quantize(float value, float scale, int32_t offset)
Quantize a floating point data type into an 8-bit data type.
Definition: TypesUtils.cpp:31
BOOST_AUTO_TEST_SUITE_END()
void Gather(const TensorInfo &paramsInfo, const TensorInfo &indicesInfo, const TensorInfo &outputInfo, Decoder< float > &params, const int32_t *indices, Encoder< float > &output)
Definition: Gather.cpp:18