blob: b0613eb29e45fa0706fa7c5221d82dab1ef7ddfe [file] [log] [blame]
//
// Copyright © 2017 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
#pragma once
#include <ArmnnDriver.hpp>
#include "DriverTestHelpers.hpp"
namespace driverTestHelpers
{
class TestTensor
{
public:
TestTensor(const armnn::TensorShape & shape,
const std::vector<float> & data)
: m_Shape{shape}
, m_Data{data}
{
DOCTEST_CHECK(m_Shape.GetNumElements() == m_Data.size());
}
hidl_vec<uint32_t> GetDimensions() const;
unsigned int GetNumElements() const;
const float * GetData() const;
private:
armnn::TensorShape m_Shape;
std::vector<float> m_Data;
};
} // driverTestHelpers