COMPMID-3639: (3RDPARTY_UPDATE) Move CL kernels to src

Change-Id: I10d27db788e5086adae1841e3e2441cd9b76ef84
Signed-off-by: Sang-Hoon Park <sang-hoon.park@arm.com>
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/4310
Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
diff --git a/arm_compute/runtime/CL/functions/CLMinMaxLocation.h b/arm_compute/runtime/CL/functions/CLMinMaxLocation.h
index 04926f7..4e3f28b 100644
--- a/arm_compute/runtime/CL/functions/CLMinMaxLocation.h
+++ b/arm_compute/runtime/CL/functions/CLMinMaxLocation.h
@@ -24,12 +24,16 @@
 #ifndef ARM_COMPUTE_CLMINMAXLOCATION_H
 #define ARM_COMPUTE_CLMINMAXLOCATION_H
 
-#include "arm_compute/core/CL/kernels/CLMinMaxLocationKernel.h"
 #include "arm_compute/runtime/CL/CLArray.h"
 #include "arm_compute/runtime/IFunction.h"
 
+#include <memory>
+
 namespace arm_compute
 {
+class CLCompileContext;
+class CLMinMaxKernel;
+class CLMinMaxLocationKernel;
 class ICLTensor;
 using ICLImage = ICLTensor;
 
@@ -51,6 +55,8 @@
     CLMinMaxLocation(CLMinMaxLocation &&) = default;
     /** Allow instances of this class to be moved */
     CLMinMaxLocation &operator=(CLMinMaxLocation &&) = default;
+    /** Default destructor */
+    ~CLMinMaxLocation();
     /** Initialise the kernel's inputs and outputs.
      *
      * @note When locations of min and max occurrences are requested, the reported number of locations is limited to the given array size.
@@ -87,16 +93,16 @@
     void run() override;
 
 private:
-    CLMinMaxKernel         _min_max_kernel;     /**< Kernel that performs min/max */
-    CLMinMaxLocationKernel _min_max_loc_kernel; /**< Kernel that counts min/max occurrences and identifies their positions */
-    cl::Buffer             _min_max_vals;       /**< Buffer to collect min, max values */
-    cl::Buffer             _min_max_count_vals; /**< Buffer to collect min, max values */
-    void                  *_min;                /**< Minimum value. */
-    void                  *_max;                /**< Maximum value. */
-    uint32_t              *_min_count;          /**< Minimum value occurrences. */
-    uint32_t              *_max_count;          /**< Maximum value occurrences. */
-    CLCoordinates2DArray *_min_loc;             /**< Minimum value occurrences coordinates. */
-    CLCoordinates2DArray *_max_loc;             /**< Maximum value occurrences  coordinates. */
+    std::unique_ptr<CLMinMaxKernel>         _min_max_kernel;     /**< Kernel that performs min/max */
+    std::unique_ptr<CLMinMaxLocationKernel> _min_max_loc_kernel; /**< Kernel that counts min/max occurrences and identifies their positions */
+    cl::Buffer                              _min_max_vals;       /**< Buffer to collect min, max values */
+    cl::Buffer                              _min_max_count_vals; /**< Buffer to collect min, max values */
+    void                                   *_min;                /**< Minimum value. */
+    void                                   *_max;                /**< Maximum value. */
+    uint32_t                               *_min_count;          /**< Minimum value occurrences. */
+    uint32_t                               *_max_count;          /**< Maximum value occurrences. */
+    CLCoordinates2DArray                   *_min_loc;            /**< Minimum value occurrences coordinates. */
+    CLCoordinates2DArray                   *_max_loc;            /**< Maximum value occurrences  coordinates. */
 };
 }
 #endif /*ARM_COMPUTE_CLMINMAXLOCATION_H */