aboutsummaryrefslogtreecommitdiff
path: root/tests/validation/fixtures/WarpPerspectiveFixture.h
diff options
context:
space:
mode:
authorIsabella Gottardi <isabella.gottardi@arm.com>2017-11-09 11:27:14 +0000
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:35:24 +0000
commit764f39e3d64da8a5002b220e1f9044f15e68a613 (patch)
treef59f681b19db3dc6738950b54d1560dbd740edd3 /tests/validation/fixtures/WarpPerspectiveFixture.h
parenteed841c6df92b8d8e3137af260d1f5faf6167159 (diff)
downloadComputeLibrary-764f39e3d64da8a5002b220e1f9044f15e68a613.tar.gz
COMPMID-556 - Fix Warp Perspective validation
Change-Id: I6504fb1e2d3d2b454a043d7157112891cef272a3 Reviewed-on: http://mpd-gerrit.cambridge.arm.com/95045 Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com> Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Diffstat (limited to 'tests/validation/fixtures/WarpPerspectiveFixture.h')
-rw-r--r--tests/validation/fixtures/WarpPerspectiveFixture.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/tests/validation/fixtures/WarpPerspectiveFixture.h b/tests/validation/fixtures/WarpPerspectiveFixture.h
index c77efbdc0d..1a6d6c035e 100644
--- a/tests/validation/fixtures/WarpPerspectiveFixture.h
+++ b/tests/validation/fixtures/WarpPerspectiveFixture.h
@@ -70,9 +70,9 @@ public:
protected:
template <typename U>
- void fill(U &&tensor, int i = 0)
+ void fill(U &&tensor)
{
- library->fill_tensor_uniform(tensor, i);
+ library->fill_tensor_uniform(tensor, 0);
}
TensorType compute_target(const TensorShape &shape, const TensorShape &vmask_shape, const float *matrix, InterpolationPolicy policy, BorderMode border_mode, uint8_t constant_border_value,
@@ -112,19 +112,21 @@ protected:
// Create reference
SimpleTensor<T> src{ shape, data_type };
- SimpleTensor<T> valid_mask{ vmask_shape, data_type };
+
+ // Create the valid mask Tensor
+ _valid_mask = SimpleTensor<T>(shape, data_type);
// Fill reference
- fill(src, 0);
- fill(valid_mask, 1);
+ fill(src);
// Compute reference
- return reference::warp_perspective<T>(src, valid_mask, matrix, policy, border_mode, constant_border_value);
+ return reference::warp_perspective<T>(src, _valid_mask, matrix, policy, border_mode, constant_border_value);
}
TensorType _target{};
SimpleTensor<T> _reference{};
BorderMode _border_mode{};
+ SimpleTensor<T> _valid_mask{};
};
} // namespace validation
} // namespace test