diff options
author | Alex Gilday <alexander.gilday@arm.com> | 2018-01-09 11:40:19 +0000 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-11-02 16:42:33 +0000 |
commit | 345ab188c66017bf80512024a42b8e85ee96c872 (patch) | |
tree | 995d7147444483e8d7c342a9c90e615ca9445bc7 /tests/benchmark/fixtures/HarrisCornersFixture.h | |
parent | 780db4eb6a9e3dee565d14f36d772038cd3253da (diff) | |
download | ComputeLibrary-345ab188c66017bf80512024a42b8e85ee96c872.tar.gz |
COMPMID-742: Add image input support for Harris Corners tests
Change-Id: I4833eec0734776d8683fe867bb4f4d827f1a2fb7
Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/115503
Tested-by: Jenkins <bsgcomp@arm.com>
Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Diffstat (limited to 'tests/benchmark/fixtures/HarrisCornersFixture.h')
-rw-r--r-- | tests/benchmark/fixtures/HarrisCornersFixture.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/benchmark/fixtures/HarrisCornersFixture.h b/tests/benchmark/fixtures/HarrisCornersFixture.h index 1596ede962..c7ce683ab5 100644 --- a/tests/benchmark/fixtures/HarrisCornersFixture.h +++ b/tests/benchmark/fixtures/HarrisCornersFixture.h @@ -41,12 +41,15 @@ class HarrisCornersFixture : public framework::Fixture { public: template <typename...> - void setup(const TensorShape &shape, Format format, float threshold, float min_dist, float sensitivity, + void setup(std::string image, Format format, float threshold, float min_dist, float sensitivity, int32_t gradient_size, int32_t block_size, BorderMode border_mode, bool use_fp16) { + // Load the image (cached by the library if loaded before) + const RawTensor &raw = library->get(image, format); + // Create tensor - src = create_tensor<TensorType>(shape, format); + src = create_tensor<TensorType>(raw.shape(), format); // Create and configure function harris_corners_func.configure(&src, threshold, min_dist, sensitivity, gradient_size, block_size, &out, border_mode, 0, use_fp16); @@ -54,9 +57,8 @@ public: // Allocate tensor src.allocator()->allocate(); - // Fill tensor - std::uniform_int_distribution<int32_t> distribution(100, 100); - library->fill(Accessor(src), distribution, 0); + // Copy image data to tensor + library->fill(Accessor(src), raw); } void run() |