diff options
author | John Richardson <john.richardson@arm.com> | 2017-11-27 14:35:09 +0000 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-11-02 16:42:33 +0000 |
commit | 25f23680b211b6dd27c006cb9575e816e8f80bb5 (patch) | |
tree | f46132851600739d8d05f7bf8e3b9b0896bd39bf /tests/SimpleTensor.h | |
parent | 1d25ed54a948639d1894c8b021940df70005d519 (diff) | |
download | ComputeLibrary-25f23680b211b6dd27c006cb9575e816e8f80bb5.tar.gz |
COMPMID-589: Port HOGDescriptor to new validation
Change-Id: I2021612e61de1b82aaeb49249d06929c7fceb15f
Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/115216
Reviewed-by: Pablo Tello <pablo.tello@arm.com>
Tested-by: Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'tests/SimpleTensor.h')
-rw-r--r-- | tests/SimpleTensor.h | 9 |
1 files changed, 5 insertions, 4 deletions
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<T>::SimpleTensor(TensorShape shape, Format format, int fixed_point_ _fixed_point_position(fixed_point_position), _quantization_info() { - _buffer = support::cpp14::make_unique<T[]>(num_elements() * num_channels()); + _num_channels = num_channels(); + _buffer = support::cpp14::make_unique<T[]>(num_elements() * _num_channels); } template <typename T> @@ -338,13 +339,13 @@ T *SimpleTensor<T>::data() template <typename T> const void *SimpleTensor<T>::operator()(const Coordinates &coord) const { - return _buffer.get() + coord2index(_shape, coord); + return _buffer.get() + coord2index(_shape, coord) * _num_channels; } template <typename T> void *SimpleTensor<T>::operator()(const Coordinates &coord) { - return _buffer.get() + coord2index(_shape, coord); + return _buffer.get() + coord2index(_shape, coord) * _num_channels; } template <typename U> |