surmeh01 | 49b9e10 | 2018-05-17 14:11:25 +0100 | [diff] [blame] | 1 | // |
| 2 | // Copyright © 2017 Arm Ltd. All rights reserved. |
David Beck | 93e4898 | 2018-09-05 13:05:09 +0100 | [diff] [blame] | 3 | // SPDX-License-Identifier: MIT |
surmeh01 | 49b9e10 | 2018-05-17 14:11:25 +0100 | [diff] [blame] | 4 | // |
| 5 | #pragma once |
| 6 | |
| 7 | #include "../ArmnnDriver.hpp" |
| 8 | |
| 9 | namespace driverTestHelpers |
| 10 | { |
| 11 | |
| 12 | class TestTensor |
| 13 | { |
| 14 | public: |
| 15 | TestTensor(const armnn::TensorShape & shape, |
| 16 | const std::vector<float> & data) |
| 17 | : m_Shape{shape} |
| 18 | , m_Data{data} |
| 19 | { |
| 20 | BOOST_ASSERT(m_Shape.GetNumElements() == m_Data.size()); |
| 21 | } |
| 22 | |
| 23 | hidl_vec<uint32_t> GetDimensions() const; |
| 24 | unsigned int GetNumElements() const; |
| 25 | const float * GetData() const; |
| 26 | |
| 27 | private: |
| 28 | armnn::TensorShape m_Shape; |
| 29 | std::vector<float> m_Data; |
| 30 | }; |
| 31 | |
| 32 | } // driverTestHelpers |