2 // Copyright © 2017 Arm Ltd. All rights reserved.
3 // SPDX-License-Identifier: MIT
6 #include <boost/test/unit_test.hpp>
7 #include "ParserFlatbuffersSerializeFixture.hpp"
8 #include "../Deserializer.hpp"
13 BOOST_AUTO_TEST_SUITE(Deserializer)
15 struct FloorFixture : public ParserFlatbuffersSerializeFixture
17 explicit FloorFixture(const std::string& shape,
18 const std::string& dataType)
26 layer_type: "InputLayer",
32 layerName: "InputLayer",
36 connection: {sourceLayerIndex:0, outputSlotIndex:0 },
41 dimensions: )" + shape + R"(,
42 dataType: )" + dataType + R"(
47 layer_type: "FloorLayer",
51 layerName: "FloorLayer",
55 connection: {sourceLayerIndex:0, outputSlotIndex:0 },
60 dimensions: )" + shape + R"(,
61 dataType: )" + dataType + R"(
67 layer_type: "OutputLayer",
73 layerName: "OutputLayer",
77 connection: {sourceLayerIndex:1, outputSlotIndex:0 },
82 dimensions: )" + shape + R"(,
83 dataType: )" + dataType + R"(
95 struct SimpleFloorFixture : FloorFixture
97 SimpleFloorFixture() : FloorFixture("[ 1, 3, 3, 1 ]",
101 BOOST_FIXTURE_TEST_CASE(Floor, SimpleFloorFixture)
103 RunTest<4, armnn::DataType::Float32>(
105 {{"InputLayer", { -37.5f, -15.2f, -8.76f, -2.0f, -1.5f, -1.3f, -0.5f, -0.4f, 0.0f}}},
106 {{"OutputLayer",{ -38.0f, -16.0f, -9.0f, -2.0f, -2.0f, -2.0f, -1.0f, -1.0f, 0.0f}}});
110 BOOST_AUTO_TEST_SUITE_END()