From 25f23680b211b6dd27c006cb9575e816e8f80bb5 Mon Sep 17 00:00:00 2001 From: John Richardson Date: Mon, 27 Nov 2017 14:35:09 +0000 Subject: COMPMID-589: Port HOGDescriptor to new validation Change-Id: I2021612e61de1b82aaeb49249d06929c7fceb15f Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/115216 Reviewed-by: Pablo Tello Tested-by: Jenkins --- tests/SimpleTensor.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'tests/SimpleTensor.h') diff --git a/tests/SimpleTensor.h b/tests/SimpleTensor.h index 6091991e66..902f5b51b5 100644 --- a/tests/SimpleTensor.h +++ b/tests/SimpleTensor.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 ARM Limited. + * Copyright (c) 2017, 2018 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -191,7 +191,8 @@ SimpleTensor::SimpleTensor(TensorShape shape, Format format, int fixed_point_ _fixed_point_position(fixed_point_position), _quantization_info() { - _buffer = support::cpp14::make_unique(num_elements() * num_channels()); + _num_channels = num_channels(); + _buffer = support::cpp14::make_unique(num_elements() * _num_channels); } template @@ -338,13 +339,13 @@ T *SimpleTensor::data() template const void *SimpleTensor::operator()(const Coordinates &coord) const { - return _buffer.get() + coord2index(_shape, coord); + return _buffer.get() + coord2index(_shape, coord) * _num_channels; } template void *SimpleTensor::operator()(const Coordinates &coord) { - return _buffer.get() + coord2index(_shape, coord); + return _buffer.get() + coord2index(_shape, coord) * _num_channels; } template -- cgit v1.2.1