From 49b9e100bfbb3b8da01472a0ff48b2bd92944e01 Mon Sep 17 00:00:00 2001 From: surmeh01 Date: Thu, 17 May 2018 14:11:25 +0100 Subject: Release 18.05 --- test/TestTensor.hpp | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 test/TestTensor.hpp (limited to 'test/TestTensor.hpp') diff --git a/test/TestTensor.hpp b/test/TestTensor.hpp new file mode 100644 index 00000000..974e7b93 --- /dev/null +++ b/test/TestTensor.hpp @@ -0,0 +1,32 @@ +// +// Copyright © 2017 Arm Ltd. All rights reserved. +// See LICENSE file in the project root for full license information. +// +#pragma once + +#include "../ArmnnDriver.hpp" + +namespace driverTestHelpers +{ + +class TestTensor +{ +public: + TestTensor(const armnn::TensorShape & shape, + const std::vector & data) + : m_Shape{shape} + , m_Data{data} + { + BOOST_ASSERT(m_Shape.GetNumElements() == m_Data.size()); + } + + hidl_vec GetDimensions() const; + unsigned int GetNumElements() const; + const float * GetData() const; + +private: + armnn::TensorShape m_Shape; + std::vector m_Data; +}; + +} // driverTestHelpers -- cgit v1.2.1