blob: 623c9fbd0a6239241abc1bb25af0cbb51346dbf6 [file] [log] [blame]
surmeh0149b9e102018-05-17 14:11:25 +01001//
2// Copyright © 2017 Arm Ltd. All rights reserved.
David Beck93e48982018-09-05 13:05:09 +01003// SPDX-License-Identifier: MIT
surmeh0149b9e102018-05-17 14:11:25 +01004//
5#pragma once
6
7#include "../ArmnnDriver.hpp"
8
9namespace driverTestHelpers
10{
11
12class TestTensor
13{
14public:
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
27private:
28 armnn::TensorShape m_Shape;
29 std::vector<float> m_Data;
30};
31
32} // driverTestHelpers