From 6c6597c1e17c32c6ad861780eee454a7deecfb75 Mon Sep 17 00:00:00 2001 From: Moritz Pflanzer Date: Sun, 24 Sep 2017 12:09:41 +0100 Subject: COMPMID-500: Move HarrisCorners to new validation Change-Id: I4e21ad98d029e360010c5927f04b716527700a00 Reviewed-on: http://mpd-gerrit.cambridge.arm.com/88888 Reviewed-by: Anthony Barbier Tested-by: Kaizen --- arm_compute/core/CL/ICLArray.h | 4 +++- arm_compute/core/Window.inl | 2 +- arm_compute/runtime/CL/CLArray.h | 11 +++++++++-- 3 files changed, 13 insertions(+), 4 deletions(-) (limited to 'arm_compute') diff --git a/arm_compute/core/CL/ICLArray.h b/arm_compute/core/CL/ICLArray.h index e12695f206..6c3dbcd170 100644 --- a/arm_compute/core/CL/ICLArray.h +++ b/arm_compute/core/CL/ICLArray.h @@ -43,7 +43,9 @@ public: ICLArray(const ICLArray &) = delete; ICLArray &operator=(const ICLArray &) = delete; - virtual ~ICLArray() = default; + ICLArray(ICLArray &&) = default; + ICLArray &operator=(ICLArray &&) = default; + virtual ~ICLArray() = default; /** Interface to be implemented by the child class to return a reference to the OpenCL buffer containing the array's data. * * @return A reference to an OpenCL buffer containing the array's data. diff --git a/arm_compute/core/Window.inl b/arm_compute/core/Window.inl index 6b02128797..e46a0ec8f7 100644 --- a/arm_compute/core/Window.inl +++ b/arm_compute/core/Window.inl @@ -114,7 +114,7 @@ inline void Window::validate() const for(size_t i = 0; i < Coordinates::num_max_dimensions; ++i) { ARM_COMPUTE_ERROR_ON(_dims[i].step() == 0); - ARM_COMPUTE_ERROR_ON(_dims[i].end() <= _dims[i].start()); + ARM_COMPUTE_ERROR_ON(_dims[i].end() < _dims[i].start()); ARM_COMPUTE_ERROR_ON((_dims[i].end() - _dims[i].start()) % _dims[i].step()); } } diff --git a/arm_compute/runtime/CL/CLArray.h b/arm_compute/runtime/CL/CLArray.h index 3dc7f19bc7..dda26e2e89 100644 --- a/arm_compute/runtime/CL/CLArray.h +++ b/arm_compute/runtime/CL/CLArray.h @@ -37,16 +37,23 @@ template class CLArray : public ICLArray { public: + /** Default constructor: empty array */ + CLArray() + : ICLArray(0), _buffer() + { + } /** Prevent instances of this class from being copied (As this class contains pointers) */ CLArray(const CLArray &) = delete; /** Prevent instances of this class from being copied (As this class contains pointers) */ - const CLArray &operator=(const CLArray &) = delete; + CLArray &operator=(const CLArray &) = delete; + CLArray(CLArray &&) = default; + CLArray &operator=(CLArray &&) = default; /** Constructor: initializes an array which can contain up to max_num_points values * * @param[in] max_num_values Maximum number of values the array will be able to stored */ CLArray(size_t max_num_values) - : ICLArray(max_num_values), _buffer(cl::Buffer(CLScheduler::get().context(), CL_MEM_ALLOC_HOST_PTR | CL_MEM_READ_WRITE, max_num_values * sizeof(T))) + : ICLArray(max_num_values), _buffer(CLScheduler::get().context(), CL_MEM_ALLOC_HOST_PTR | CL_MEM_READ_WRITE, max_num_values * sizeof(T)) { } /** Enqueue a map operation of the allocated buffer. -- cgit v1.2.1