diff options
author | Moritz Pflanzer <moritz.pflanzer@arm.com> | 2017-09-24 12:09:41 +0100 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-11-02 16:35:24 +0000 |
commit | 6c6597c1e17c32c6ad861780eee454a7deecfb75 (patch) | |
tree | 5df015557262a83e5e84a5fa365544bb1aa66762 /tests/validation/CPP/Utils.cpp | |
parent | c26ecf8ca13205cab2ce43d9f971e1569808e5bc (diff) | |
download | ComputeLibrary-6c6597c1e17c32c6ad861780eee454a7deecfb75.tar.gz |
COMPMID-500: Move HarrisCorners to new validation
Change-Id: I4e21ad98d029e360010c5927f04b716527700a00
Reviewed-on: http://mpd-gerrit.cambridge.arm.com/88888
Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com>
Diffstat (limited to 'tests/validation/CPP/Utils.cpp')
-rw-r--r-- | tests/validation/CPP/Utils.cpp | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/tests/validation/CPP/Utils.cpp b/tests/validation/CPP/Utils.cpp index e27688889d..af3ed9099f 100644 --- a/tests/validation/CPP/Utils.cpp +++ b/tests/validation/CPP/Utils.cpp @@ -31,36 +31,6 @@ namespace test { namespace validation { -// Return a tensor element at a specified coordinate with different border modes -template <typename T> -T tensor_elem_at(const SimpleTensor<T> &in, Coordinates coord, BorderMode border_mode, T constant_border_value) -{ - const int x = coord.x(); - const int y = coord.y(); - const auto width = static_cast<int>(in.shape().x()); - const auto height = static_cast<int>(in.shape().y()); - - // If coordinates beyond range of tensor's width or height - if(x < 0 || y < 0 || x >= width || y >= height) - { - if(border_mode == BorderMode::REPLICATE) - { - coord.set(0, std::max(0, std::min(x, width - 1))); - coord.set(1, std::max(0, std::min(y, height - 1))); - } - else - { - return static_cast<T>(constant_border_value); - } - } - return in[coord2index(in.shape(), coord)]; -} - -template uint8_t tensor_elem_at(const SimpleTensor<uint8_t> &in, Coordinates coord, BorderMode border_mode, uint8_t constant_border_value); -template int16_t tensor_elem_at(const SimpleTensor<int16_t> &in, Coordinates coord, BorderMode border_mode, int16_t constant_border_value); -template half tensor_elem_at(const SimpleTensor<half> &in, Coordinates coord, BorderMode border_mode, half constant_border_value); -template float tensor_elem_at(const SimpleTensor<float> &in, Coordinates coord, BorderMode border_mode, float constant_border_value); - // Return the bilinear value at a specified coordinate with different border modes template <typename T> T bilinear_policy(const SimpleTensor<T> &in, Coordinates id, float xn, float yn, BorderMode border_mode, T constant_border_value) |