blob: e6cb446fda30962828831fbb599d7d0eec8fbd89 [file] [log] [blame]
//
// Copyright © 2017 Arm Ltd. All rights reserved.
// SPDX-License-Identifier: MIT
//
#include "TestTensor.hpp"
namespace driverTestHelpers
{
hidl_vec<uint32_t> TestTensor::GetDimensions() const
{
hidl_vec<uint32_t> dimensions;
dimensions.resize(m_Shape.GetNumDimensions());
for (uint32_t i=0; i<m_Shape.GetNumDimensions(); ++i)
{
dimensions[i] = m_Shape[i];
}
return dimensions;
}
unsigned int TestTensor::GetNumElements() const
{
return m_Shape.GetNumElements();
}
const float * TestTensor::GetData() const
{
ARMNN_ASSERT(m_Data.empty() == false);
return &m_Data[0];
}
} // namespace driverTestHelpers