From c357c47be8a3f210f9eee9a05cc13f1051b036d3 Mon Sep 17 00:00:00 2001 From: Alex Gilday Date: Wed, 21 Mar 2018 13:54:09 +0000 Subject: COMPMID-1008: Fix Doxygen issues Change-Id: Ie73d8771f85d1f5b059f3a56f1bbd73c98e94a38 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/124723 Reviewed-by: Michalis Spyrou Tested-by: Jenkins --- arm_compute/core/CL/CLHelpers.h | 4 +- arm_compute/core/CL/CLKernelLibrary.h | 26 ++++++++---- arm_compute/core/CL/CLTypes.h | 2 +- arm_compute/core/CL/ICLArray.h | 48 +++++++++++++++------- arm_compute/core/CL/ICLDistribution1D.h | 6 +-- arm_compute/core/CL/ICLHOG.h | 6 +-- arm_compute/core/CL/ICLKernel.h | 8 ++++ arm_compute/core/CL/ICLMultiImage.h | 7 ++-- arm_compute/core/CL/ICLSimpleKernel.h | 10 ++--- arm_compute/core/CL/ICLTensor.h | 12 ++++-- arm_compute/core/CL/OpenCL.h | 19 +++++++++ .../core/CL/kernels/CLAbsoluteDifferenceKernel.h | 10 ++--- .../CL/kernels/CLBatchNormalizationLayerKernel.h | 2 +- arm_compute/core/CL/kernels/CLBitwiseAndKernel.h | 6 +-- arm_compute/core/CL/kernels/CLBitwiseOrKernel.h | 6 +-- arm_compute/core/CL/kernels/CLBitwiseXorKernel.h | 6 +-- arm_compute/core/CL/kernels/CLCannyEdgeKernel.h | 6 +-- .../kernels/CLDeconvolutionLayerUpsampleKernel.h | 4 +- .../kernels/CLDepthwiseConvolutionLayer3x3Kernel.h | 2 +- .../core/CL/kernels/CLDequantizationLayerKernel.h | 2 +- arm_compute/core/CL/kernels/CLDerivativeKernel.h | 6 +-- .../core/CL/kernels/CLIntegralImageKernel.h | 6 +-- arm_compute/core/CL/kernels/CLLKTrackerKernel.h | 9 ++-- .../core/CL/kernels/CLMagnitudePhaseKernel.h | 6 +-- .../core/CL/kernels/CLNormalizationLayerKernel.h | 4 +- .../CL/kernels/CLPixelWiseMultiplicationKernel.h | 4 +- .../core/CL/kernels/CLQuantizationLayerKernel.h | 2 +- arm_compute/core/CL/kernels/CLRemapKernel.h | 6 +-- arm_compute/core/CL/kernels/CLScharr3x3Kernel.h | 6 +-- arm_compute/core/CL/kernels/CLSobel3x3Kernel.h | 6 +-- arm_compute/core/CL/kernels/CLSobel5x5Kernel.h | 10 ++--- arm_compute/core/CL/kernels/CLSobel7x7Kernel.h | 10 ++--- arm_compute/core/CL/kernels/CLSoftmaxLayerKernel.h | 7 ++-- .../core/CL/kernels/CLWeightsReshapeKernel.h | 23 +++++++++++ 34 files changed, 193 insertions(+), 104 deletions(-) (limited to 'arm_compute/core/CL') diff --git a/arm_compute/core/CL/CLHelpers.h b/arm_compute/core/CL/CLHelpers.h index 66423d648a..d239a6159b 100644 --- a/arm_compute/core/CL/CLHelpers.h +++ b/arm_compute/core/CL/CLHelpers.h @@ -35,11 +35,11 @@ namespace arm_compute enum class DataType; enum class GPUTarget; -/** Enable operation operations on GPUTarget enumerations */ +/** Enable bitwise operations on GPUTarget enumerations */ template <> struct enable_bitwise_ops { - static constexpr bool value = true; + static constexpr bool value = true; /**< Enabled. */ }; /** Max vector width of an OpenCL vector */ diff --git a/arm_compute/core/CL/CLKernelLibrary.h b/arm_compute/core/CL/CLKernelLibrary.h index 953b43c038..12e424fce9 100644 --- a/arm_compute/core/CL/CLKernelLibrary.h +++ b/arm_compute/core/CL/CLKernelLibrary.h @@ -104,11 +104,11 @@ public: Program(const Program &) = default; /** Default Move Constructor. */ Program(Program &&) = default; - /** Default copy assignment operator. */ + /** Default copy assignment operator */ Program &operator=(const Program &) = default; - /** Default move assignment operator. */ + /** Default move assignment operator */ Program &operator=(Program &&) = default; - /**Returns program name. + /** Returns program name. * * @return Program's name. */ @@ -121,7 +121,13 @@ public: * @return The CL program object. */ explicit operator cl::Program() const; - + /** Build the given CL program. + * + * @param[in] program The CL program to build. + * @param[in] build_options Options to build the CL program. + * + * @return True if the CL program builds successfully. + */ static bool build(const cl::Program &program, const std::string &build_options = ""); /** Build the underlying CL program. * @@ -150,9 +156,9 @@ public: Kernel(const Kernel &) = default; /** Default Move Constructor. */ Kernel(Kernel &&) = default; - /** Default copy assignment operator. */ + /** Default copy assignment operator */ Kernel &operator=(const Kernel &) = default; - /** Default move assignment operator. */ + /** Default move assignment operator */ Kernel &operator=(Kernel &&) = default; /** Constructor. * @@ -192,9 +198,9 @@ private: CLKernelLibrary(); public: - /** Prevent instances of this class from being copied. */ + /** Prevent instances of this class from being copied */ CLKernelLibrary(const CLKernelLibrary &) = delete; - /** Prevent instances of this class from being copied. */ + /** Prevent instances of this class from being copied */ const CLKernelLibrary &operator=(const CLKernelLibrary &) = delete; /** Access the KernelLibrary singleton. * @return The KernelLibrary instance. @@ -226,9 +232,11 @@ public: { return _kernel_path; }; - /** Gets the source of the selected program + /** Gets the source of the selected program. * * @param[in] program_name Program name. + * + * @return Source of the selected program. */ std::string get_program_source(const std::string &program_name); /** Sets the CL context used to create programs. diff --git a/arm_compute/core/CL/CLTypes.h b/arm_compute/core/CL/CLTypes.h index c207ec7611..a9d5fdd063 100644 --- a/arm_compute/core/CL/CLTypes.h +++ b/arm_compute/core/CL/CLTypes.h @@ -51,7 +51,7 @@ enum class GPUTarget TBOX = 0x260 }; -/* Available OpenCL Version */ +/** Available OpenCL Version */ enum class CLVersion { CL10, /* the OpenCL 1.0 */ diff --git a/arm_compute/core/CL/ICLArray.h b/arm_compute/core/CL/ICLArray.h index 6c3dbcd170..22fc7cf32e 100644 --- a/arm_compute/core/CL/ICLArray.h +++ b/arm_compute/core/CL/ICLArray.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2017 ARM Limited. + * Copyright (c) 2016-2018 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -35,17 +35,26 @@ template class ICLArray : public IArray { public: - /* Constructor */ + /** Constructor + * + * @param[in] max_num_values Maximum size of the array. + * + */ explicit ICLArray(size_t max_num_values) : IArray(max_num_values), _mapping(nullptr) { } + /** Prevent instances of this class from being copy constructed */ ICLArray(const ICLArray &) = delete; + /** Prevent instances of this class from being copied */ ICLArray &operator=(const ICLArray &) = delete; - ICLArray(ICLArray &&) = default; + /** Allow instances of this class to be move constructed */ + ICLArray(ICLArray &&) = default; + /** Allow instances of this class to be moved */ ICLArray &operator=(ICLArray &&) = default; - virtual ~ICLArray() = default; + /** Default virtual destructor. */ + 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. @@ -106,16 +115,27 @@ private: uint8_t *_mapping; }; -using ICLKeyPointArray = ICLArray; -using ICLCoordinates2DArray = ICLArray; +/** Interface for OpenCL Array of Key Points. */ +using ICLKeyPointArray = ICLArray; +/** Interface for OpenCL Array of 2D Coordinates. */ +using ICLCoordinates2DArray = ICLArray; +/** Interface for OpenCL Array of Detection Windows. */ using ICLDetectionWindowArray = ICLArray; -using ICLROIArray = ICLArray; -using ICLSize2DArray = ICLArray; -using ICLUInt8Array = ICLArray; -using ICLUInt16Array = ICLArray; -using ICLUInt32Array = ICLArray; -using ICLInt16Array = ICLArray; -using ICLInt32Array = ICLArray; -using ICLFloatArray = ICLArray; +/** Interface for OpenCL Array of ROIs. */ +using ICLROIArray = ICLArray; +/** Interface for OpenCL Array of 2D Sizes. */ +using ICLSize2DArray = ICLArray; +/** Interface for OpenCL Array of uint8s. */ +using ICLUInt8Array = ICLArray; +/** Interface for OpenCL Array of uint16s. */ +using ICLUInt16Array = ICLArray; +/** Interface for OpenCL Array of uint32s. */ +using ICLUInt32Array = ICLArray; +/** Interface for OpenCL Array of int16s. */ +using ICLInt16Array = ICLArray; +/** Interface for OpenCL Array of int32s. */ +using ICLInt32Array = ICLArray; +/** Interface for OpenCL Array of floats. */ +using ICLFloatArray = ICLArray; } #endif /*__ARM_COMPUTE_ICLARRAY_H__*/ diff --git a/arm_compute/core/CL/ICLDistribution1D.h b/arm_compute/core/CL/ICLDistribution1D.h index 8fbbbbf548..9816029172 100644 --- a/arm_compute/core/CL/ICLDistribution1D.h +++ b/arm_compute/core/CL/ICLDistribution1D.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2017 ARM Limited. + * Copyright (c) 2016-2018 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -49,9 +49,9 @@ public: * @param[in] range The total number of the consecutive values of the distribution interval. */ ICLDistribution1D(size_t num_bins, int32_t offset, uint32_t range); - /** Prevent instances of this class from being copied (As this class contains pointers). */ + /** Prevent instances of this class from being copied (As this class contains pointers) */ ICLDistribution1D(const ICLDistribution1D &) = delete; - /** Prevent instances of this class from being copied (As this class contains pointers). */ + /** Prevent instances of this class from being copied (As this class contains pointers) */ const ICLDistribution1D &operator=(const ICLDistribution1D &) = delete; /** Enqueue a map operation of the allocated buffer on the given queue. * diff --git a/arm_compute/core/CL/ICLHOG.h b/arm_compute/core/CL/ICLHOG.h index a3d2fb4a57..4d2d7a3316 100644 --- a/arm_compute/core/CL/ICLHOG.h +++ b/arm_compute/core/CL/ICLHOG.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 ARM Limited. + * Copyright (c) 2017-2018 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -42,9 +42,9 @@ class ICLHOG : public IHOG public: /** Default constructor */ ICLHOG(); - /** Prevent instances of this class from being copied (As this class contains pointers). */ + /** Prevent instances of this class from being copied (As this class contains pointers) */ ICLHOG(const ICLHOG &) = delete; - /** Prevent instances of this class from being copied (As this class contains pointers). */ + /** Prevent instances of this class from being copied (As this class contains pointers) */ ICLHOG &operator=(const ICLHOG &) = delete; /** Allow instances of this class to be moved */ ICLHOG(ICLHOG &&) = default; diff --git a/arm_compute/core/CL/ICLKernel.h b/arm_compute/core/CL/ICLKernel.h index f331df2996..c7d0c2156b 100644 --- a/arm_compute/core/CL/ICLKernel.h +++ b/arm_compute/core/CL/ICLKernel.h @@ -293,6 +293,14 @@ protected: */ void enqueue(cl::CommandQueue &queue, ICLKernel &kernel, const Window &window, const cl::NDRange &lws_hint = CLKernelLibrary::get().default_ndrange()); +/** Add the passed array's parameters to the object's kernel's arguments starting from the index idx. + * + * @param[in,out] idx Index at which to start adding the array's arguments. Will be incremented by the number of kernel arguments set. + * @param[in] array Array to set as an argument of the object's kernel. + * @param[in] strides @ref Strides object containing stride of each dimension in bytes. + * @param[in] num_dimensions Number of dimensions of the @p array. + * @param[in] window Window the kernel will be executed on. + */ template void ICLKernel::add_array_argument(unsigned &idx, const ICLArray *array, const Strides &strides, unsigned int num_dimensions, const Window &window) { diff --git a/arm_compute/core/CL/ICLMultiImage.h b/arm_compute/core/CL/ICLMultiImage.h index 774175607b..c06ddc826a 100644 --- a/arm_compute/core/CL/ICLMultiImage.h +++ b/arm_compute/core/CL/ICLMultiImage.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2017 ARM Limited. + * Copyright (c) 2016-2018 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -29,6 +29,7 @@ namespace arm_compute { class ICLTensor; +/** Interface for OpenCL images */ using ICLImage = ICLTensor; /** Interface for OpenCL multi-planar images */ @@ -39,14 +40,14 @@ public: * * @param[in] index The index of the wanted planed. * - * @return A pointer pointed to the OpenCL plane + * @return A pointer pointed to the OpenCL plane */ virtual ICLImage *cl_plane(unsigned int index) = 0; /** Return a constant pointer to the requested OpenCL plane of the image. * * @param[in] index The index of the wanted planed. * - * @return A constant pointer pointed to the OpenCL plane + * @return A constant pointer pointed to the OpenCL plane */ virtual const ICLImage *cl_plane(unsigned int index) const = 0; diff --git a/arm_compute/core/CL/ICLSimpleKernel.h b/arm_compute/core/CL/ICLSimpleKernel.h index e9fdb7fb8b..c4a1f8b396 100644 --- a/arm_compute/core/CL/ICLSimpleKernel.h +++ b/arm_compute/core/CL/ICLSimpleKernel.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2017 ARM Limited. + * Copyright (c) 2016-2018 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -36,13 +36,13 @@ class ICLSimpleKernel : public ICLKernel public: /** Constructor. */ ICLSimpleKernel(); - /** Prevent instances of this class from being copied (As this class contains pointers). */ + /** Prevent instances of this class from being copied (As this class contains pointers) */ ICLSimpleKernel(const ICLSimpleKernel &) = delete; - /** Prevent instances of this class from being copied (As this class contains pointers). */ + /** Prevent instances of this class from being copied (As this class contains pointers) */ ICLSimpleKernel &operator=(const ICLSimpleKernel &) = delete; - /** Allow instances of this class to be moved. */ + /** Allow instances of this class to be moved */ ICLSimpleKernel(ICLSimpleKernel &&) = default; - /** Allow instances of this class to be moved. */ + /** Allow instances of this class to be moved */ ICLSimpleKernel &operator=(ICLSimpleKernel &&) = default; /** Default destructor */ ~ICLSimpleKernel() = default; diff --git a/arm_compute/core/CL/ICLTensor.h b/arm_compute/core/CL/ICLTensor.h index abc0131379..0f5dba923b 100644 --- a/arm_compute/core/CL/ICLTensor.h +++ b/arm_compute/core/CL/ICLTensor.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2017 ARM Limited. + * Copyright (c) 2016-2018 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -40,12 +40,18 @@ namespace arm_compute class ICLTensor : public ITensor { public: + /** Default constructor. */ ICLTensor(); + /** Prevent instances of this class from being copy constructed */ ICLTensor(const ICLTensor &) = delete; + /** Prevent instances of this class from being copied */ ICLTensor &operator=(const ICLTensor &) = delete; - ICLTensor(ICLTensor &&) = default; + /** Allow instances of this class to be move constructed */ + ICLTensor(ICLTensor &&) = default; + /** Allow instances of this class to be copied */ ICLTensor &operator=(ICLTensor &&) = default; - virtual ~ICLTensor() = default; + /** Default virtual destructor. */ + virtual ~ICLTensor() = default; /** Interface to be implemented by the child class to return a reference to the OpenCL buffer containing the image's data. * diff --git a/arm_compute/core/CL/OpenCL.h b/arm_compute/core/CL/OpenCL.h index 405d5cebd7..4b4a8b807d 100644 --- a/arm_compute/core/CL/OpenCL.h +++ b/arm_compute/core/CL/OpenCL.h @@ -43,8 +43,13 @@ static const NDRange Range_128_1 = NDRange(128, 1); namespace arm_compute { +/** Check if OpenCL is available. + * + * @return True if OpenCL is available. + */ bool opencl_is_available(); +/** Class for loading OpenCL symbols. */ class CLSymbols final { private: @@ -52,8 +57,22 @@ private: void load_symbols(void *handle); public: + /** Get the static instance of CLSymbols. + * + * @return The static instance of CLSymbols. + */ static CLSymbols &get(); + /** Load symbols from the given OpenCL library path. + * + * @param[in] library Path to the OpenCL library. + * + * @return True if loading the library is successful. + */ bool load(const std::string &library); + /** Load symbols from any of the default OpenCL library names. + * + * @return True if loading any library is successful. + */ bool load_default(); #define DECLARE_FUNCTION_PTR(func_name) \ diff --git a/arm_compute/core/CL/kernels/CLAbsoluteDifferenceKernel.h b/arm_compute/core/CL/kernels/CLAbsoluteDifferenceKernel.h index 3a7bb40b2a..0858ef7376 100644 --- a/arm_compute/core/CL/kernels/CLAbsoluteDifferenceKernel.h +++ b/arm_compute/core/CL/kernels/CLAbsoluteDifferenceKernel.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2017 ARM Limited. + * Copyright (c) 2016-2018 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -40,13 +40,13 @@ class CLAbsoluteDifferenceKernel : public ICLKernel public: /** Default constructor. */ CLAbsoluteDifferenceKernel(); - /** Prevent instances of this class from being copied (As this class contains pointers). */ + /** Prevent instances of this class from being copied (As this class contains pointers) */ CLAbsoluteDifferenceKernel(const CLAbsoluteDifferenceKernel &) = delete; - /** Prevent instances of this class from being copied (As this class contains pointers). */ + /** Prevent instances of this class from being copied (As this class contains pointers) */ CLAbsoluteDifferenceKernel &operator=(const CLAbsoluteDifferenceKernel &) = delete; - /** Allow instances of this class to be moved. */ + /** Allow instances of this class to be moved */ CLAbsoluteDifferenceKernel(CLAbsoluteDifferenceKernel &&) = default; - /** Allow instances of this class to be moved. */ + /** Allow instances of this class to be moved */ CLAbsoluteDifferenceKernel &operator=(CLAbsoluteDifferenceKernel &&) = default; /** Default destructor */ ~CLAbsoluteDifferenceKernel() = default; diff --git a/arm_compute/core/CL/kernels/CLBatchNormalizationLayerKernel.h b/arm_compute/core/CL/kernels/CLBatchNormalizationLayerKernel.h index e9fd564fbd..dbb25dd7c7 100644 --- a/arm_compute/core/CL/kernels/CLBatchNormalizationLayerKernel.h +++ b/arm_compute/core/CL/kernels/CLBatchNormalizationLayerKernel.h @@ -43,7 +43,7 @@ public: CLBatchNormalizationLayerKernel &operator=(const CLBatchNormalizationLayerKernel &) = delete; /** Default Move Constructor. */ CLBatchNormalizationLayerKernel(CLBatchNormalizationLayerKernel &&) = default; - /** Default move assignment operator. */ + /** Default move assignment operator */ CLBatchNormalizationLayerKernel &operator=(CLBatchNormalizationLayerKernel &&) = default; /** Default destructor */ ~CLBatchNormalizationLayerKernel() = default; diff --git a/arm_compute/core/CL/kernels/CLBitwiseAndKernel.h b/arm_compute/core/CL/kernels/CLBitwiseAndKernel.h index 2f0d30af83..16ba53ebeb 100644 --- a/arm_compute/core/CL/kernels/CLBitwiseAndKernel.h +++ b/arm_compute/core/CL/kernels/CLBitwiseAndKernel.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2017 ARM Limited. + * Copyright (c) 2016-2018 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -40,9 +40,9 @@ class CLBitwiseAndKernel : public ICLKernel public: /** Default constructor. */ CLBitwiseAndKernel(); - /** Prevent instances of this class from being copied (As this class contains pointers). */ + /** Prevent instances of this class from being copied (As this class contains pointers) */ CLBitwiseAndKernel(const CLBitwiseAndKernel &) = delete; - /** Prevent instances of this class from being copied (As this class contains pointers). */ + /** Prevent instances of this class from being copied (As this class contains pointers) */ CLBitwiseAndKernel &operator=(const CLBitwiseAndKernel &) = delete; /** Allow instances of this class to be moved */ CLBitwiseAndKernel(CLBitwiseAndKernel &&) = default; diff --git a/arm_compute/core/CL/kernels/CLBitwiseOrKernel.h b/arm_compute/core/CL/kernels/CLBitwiseOrKernel.h index 053804413e..0caaf33ca6 100644 --- a/arm_compute/core/CL/kernels/CLBitwiseOrKernel.h +++ b/arm_compute/core/CL/kernels/CLBitwiseOrKernel.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2017 ARM Limited. + * Copyright (c) 2016-2018 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -40,9 +40,9 @@ class CLBitwiseOrKernel : public ICLKernel public: /** Default constructor. */ CLBitwiseOrKernel(); - /** Prevent instances of this class from being copied (As this class contains pointers). */ + /** Prevent instances of this class from being copied (As this class contains pointers) */ CLBitwiseOrKernel(const CLBitwiseOrKernel &) = delete; - /** Prevent instances of this class from being copied (As this class contains pointers). */ + /** Prevent instances of this class from being copied (As this class contains pointers) */ CLBitwiseOrKernel &operator=(const CLBitwiseOrKernel &) = delete; /** Allow instances of this class to be moved */ CLBitwiseOrKernel(CLBitwiseOrKernel &&) = default; diff --git a/arm_compute/core/CL/kernels/CLBitwiseXorKernel.h b/arm_compute/core/CL/kernels/CLBitwiseXorKernel.h index 8443e2e871..905fb69998 100644 --- a/arm_compute/core/CL/kernels/CLBitwiseXorKernel.h +++ b/arm_compute/core/CL/kernels/CLBitwiseXorKernel.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2017 ARM Limited. + * Copyright (c) 2016-2018 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -40,9 +40,9 @@ class CLBitwiseXorKernel : public ICLKernel public: /** Default constructor. */ CLBitwiseXorKernel(); - /** Prevent instances of this class from being copied (As this class contains pointers). */ + /** Prevent instances of this class from being copied (As this class contains pointers) */ CLBitwiseXorKernel(const CLBitwiseXorKernel &) = delete; - /** Prevent instances of this class from being copied (As this class contains pointers). */ + /** Prevent instances of this class from being copied (As this class contains pointers) */ CLBitwiseXorKernel &operator=(const CLBitwiseXorKernel &) = delete; /** Allow instances of this class to be moved */ CLBitwiseXorKernel(CLBitwiseXorKernel &&) = default; diff --git a/arm_compute/core/CL/kernels/CLCannyEdgeKernel.h b/arm_compute/core/CL/kernels/CLCannyEdgeKernel.h index 2715449365..76ab10ccb3 100644 --- a/arm_compute/core/CL/kernels/CLCannyEdgeKernel.h +++ b/arm_compute/core/CL/kernels/CLCannyEdgeKernel.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 ARM Limited. + * Copyright (c) 2017-2018 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -39,9 +39,9 @@ class CLGradientKernel : public ICLKernel public: /** Constructor */ CLGradientKernel(); - /** Prevent instances of this class from being copied (As this class contains pointers). */ + /** Prevent instances of this class from being copied (As this class contains pointers) */ CLGradientKernel(const CLGradientKernel &) = delete; - /** Prevent instances of this class from being copied (As this class contains pointers). */ + /** Prevent instances of this class from being copied (As this class contains pointers) */ CLGradientKernel &operator=(const CLGradientKernel &) = delete; /** Initialise the kernel's sources, destinations and border mode. * diff --git a/arm_compute/core/CL/kernels/CLDeconvolutionLayerUpsampleKernel.h b/arm_compute/core/CL/kernels/CLDeconvolutionLayerUpsampleKernel.h index 8867ca1c37..f31560cb86 100644 --- a/arm_compute/core/CL/kernels/CLDeconvolutionLayerUpsampleKernel.h +++ b/arm_compute/core/CL/kernels/CLDeconvolutionLayerUpsampleKernel.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2018 ARM Limited. + * Copyright (c) 2017-2018 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -43,7 +43,7 @@ public: CLDeconvolutionLayerUpsampleKernel &operator=(const CLDeconvolutionLayerUpsampleKernel &) = delete; /** Default Move Constructor. */ CLDeconvolutionLayerUpsampleKernel(CLDeconvolutionLayerUpsampleKernel &&) = default; - /** Default move assignment operator. */ + /** Default move assignment operator */ CLDeconvolutionLayerUpsampleKernel &operator=(CLDeconvolutionLayerUpsampleKernel &&) = default; /** Default destructor */ ~CLDeconvolutionLayerUpsampleKernel() = default; diff --git a/arm_compute/core/CL/kernels/CLDepthwiseConvolutionLayer3x3Kernel.h b/arm_compute/core/CL/kernels/CLDepthwiseConvolutionLayer3x3Kernel.h index 84bc09d1fb..5f72cf70ed 100644 --- a/arm_compute/core/CL/kernels/CLDepthwiseConvolutionLayer3x3Kernel.h +++ b/arm_compute/core/CL/kernels/CLDepthwiseConvolutionLayer3x3Kernel.h @@ -43,7 +43,7 @@ public: CLDepthwiseConvolutionLayer3x3Kernel &operator=(const CLDepthwiseConvolutionLayer3x3Kernel &) = delete; /** Default Move Constructor. */ CLDepthwiseConvolutionLayer3x3Kernel(CLDepthwiseConvolutionLayer3x3Kernel &&) = default; - /** Default move assignment operator. */ + /** Default move assignment operator */ CLDepthwiseConvolutionLayer3x3Kernel &operator=(CLDepthwiseConvolutionLayer3x3Kernel &&) = default; /** Initialize the function's source, destination, conv and border_size. * diff --git a/arm_compute/core/CL/kernels/CLDequantizationLayerKernel.h b/arm_compute/core/CL/kernels/CLDequantizationLayerKernel.h index 38aa63e98f..25fd3378cb 100644 --- a/arm_compute/core/CL/kernels/CLDequantizationLayerKernel.h +++ b/arm_compute/core/CL/kernels/CLDequantizationLayerKernel.h @@ -46,7 +46,7 @@ public: CLDequantizationLayerKernel &operator=(const CLDequantizationLayerKernel &) = delete; /** Default Move Constructor. */ CLDequantizationLayerKernel(CLDequantizationLayerKernel &&) = default; - /** Default move assignment operator. */ + /** Default move assignment operator */ CLDequantizationLayerKernel &operator=(CLDequantizationLayerKernel &&) = default; /** Default destructor */ ~CLDequantizationLayerKernel() = default; diff --git a/arm_compute/core/CL/kernels/CLDerivativeKernel.h b/arm_compute/core/CL/kernels/CLDerivativeKernel.h index 58b0de3950..8debe2c4b9 100644 --- a/arm_compute/core/CL/kernels/CLDerivativeKernel.h +++ b/arm_compute/core/CL/kernels/CLDerivativeKernel.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2017 ARM Limited. + * Copyright (c) 2016-2018 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -36,9 +36,9 @@ class CLDerivativeKernel : public ICLKernel public: /** Default constructor */ CLDerivativeKernel(); - /** Prevent instances of this class from being copied (As this class contains pointers). */ + /** Prevent instances of this class from being copied (As this class contains pointers) */ CLDerivativeKernel(const CLDerivativeKernel &) = delete; - /** Prevent instances of this class from being copied (As this class contains pointers). */ + /** Prevent instances of this class from being copied (As this class contains pointers) */ CLDerivativeKernel &operator=(const CLDerivativeKernel &) = delete; /** Allow instances of this class to be moved */ CLDerivativeKernel(CLDerivativeKernel &&) = default; diff --git a/arm_compute/core/CL/kernels/CLIntegralImageKernel.h b/arm_compute/core/CL/kernels/CLIntegralImageKernel.h index f5146608e1..08cf4c2553 100644 --- a/arm_compute/core/CL/kernels/CLIntegralImageKernel.h +++ b/arm_compute/core/CL/kernels/CLIntegralImageKernel.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2017 ARM Limited. + * Copyright (c) 2016-2018 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -49,9 +49,9 @@ class CLIntegralImageVertKernel : public ICLKernel public: /** Default constructor */ CLIntegralImageVertKernel(); - /** Prevent instances of this class from being copied (As this class contains pointers). */ + /** Prevent instances of this class from being copied (As this class contains pointers) */ CLIntegralImageVertKernel(const CLIntegralImageVertKernel &) = delete; - /** Prevent instances of this class from being copied (As this class contains pointers). */ + /** Prevent instances of this class from being copied (As this class contains pointers) */ CLIntegralImageVertKernel &operator=(const CLIntegralImageVertKernel &) = delete; /** Allow instances of this class to be moved */ CLIntegralImageVertKernel(CLIntegralImageVertKernel &&) = default; diff --git a/arm_compute/core/CL/kernels/CLLKTrackerKernel.h b/arm_compute/core/CL/kernels/CLLKTrackerKernel.h index 5b995c1151..3f7125160f 100644 --- a/arm_compute/core/CL/kernels/CLLKTrackerKernel.h +++ b/arm_compute/core/CL/kernels/CLLKTrackerKernel.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 ARM Limited. + * Copyright (c) 2017-2018 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -62,9 +62,12 @@ struct CLOldValue int16_t dummy; /**< Dummy field, to make sure the data structure 128-bit align, so that GPU can use vload4 */ }; +/** Interface for OpenCL Array of Internal Key Points. */ using ICLLKInternalKeypointArray = ICLArray; -using ICLCoefficientTableArray = ICLArray; -using ICLOldValArray = ICLArray; +/** Interface for OpenCL Array of Coefficient Tables. */ +using ICLCoefficientTableArray = ICLArray; +/** Interface for OpenCL Array of Old Values. */ +using ICLOldValArray = ICLArray; /** Interface to run the initialization step of LKTracker */ class CLLKTrackerInitKernel : public ICLKernel diff --git a/arm_compute/core/CL/kernels/CLMagnitudePhaseKernel.h b/arm_compute/core/CL/kernels/CLMagnitudePhaseKernel.h index fba48a53b6..28fbe4fcfd 100644 --- a/arm_compute/core/CL/kernels/CLMagnitudePhaseKernel.h +++ b/arm_compute/core/CL/kernels/CLMagnitudePhaseKernel.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2017 ARM Limited. + * Copyright (c) 2016-2018 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -39,9 +39,9 @@ class CLMagnitudePhaseKernel : public ICLKernel public: /** Default constructor. */ CLMagnitudePhaseKernel(); - /** Prevent instances of this class from being copied (As this class contains pointers). */ + /** Prevent instances of this class from being copied (As this class contains pointers) */ CLMagnitudePhaseKernel(const CLMagnitudePhaseKernel &) = delete; - /** Prevent instances of this class from being copied (As this class contains pointers). */ + /** Prevent instances of this class from being copied (As this class contains pointers) */ CLMagnitudePhaseKernel &operator=(const CLMagnitudePhaseKernel &) = delete; /** Allow instances of this class to be moved */ CLMagnitudePhaseKernel(CLMagnitudePhaseKernel &&) = default; diff --git a/arm_compute/core/CL/kernels/CLNormalizationLayerKernel.h b/arm_compute/core/CL/kernels/CLNormalizationLayerKernel.h index d931152cb9..ef00e59e5c 100644 --- a/arm_compute/core/CL/kernels/CLNormalizationLayerKernel.h +++ b/arm_compute/core/CL/kernels/CLNormalizationLayerKernel.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 ARM Limited. + * Copyright (c) 2017-2018 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -43,7 +43,7 @@ public: CLNormalizationLayerKernel &operator=(const CLNormalizationLayerKernel &) = delete; /** Default Move Constructor. */ CLNormalizationLayerKernel(CLNormalizationLayerKernel &&) = default; - /** Default move assignment operator. */ + /** Default move assignment operator */ CLNormalizationLayerKernel &operator=(CLNormalizationLayerKernel &&) = default; /** Set the input and output tensors. * diff --git a/arm_compute/core/CL/kernels/CLPixelWiseMultiplicationKernel.h b/arm_compute/core/CL/kernels/CLPixelWiseMultiplicationKernel.h index 1ecd9be8cd..fcabb614df 100644 --- a/arm_compute/core/CL/kernels/CLPixelWiseMultiplicationKernel.h +++ b/arm_compute/core/CL/kernels/CLPixelWiseMultiplicationKernel.h @@ -39,9 +39,9 @@ class CLPixelWiseMultiplicationKernel : public ICLKernel public: /** Default constructor.*/ CLPixelWiseMultiplicationKernel(); - /** Prevent instances of this class from being copied (As this class contains pointers). */ + /** Prevent instances of this class from being copied (As this class contains pointers) */ CLPixelWiseMultiplicationKernel(const CLPixelWiseMultiplicationKernel &) = delete; - /** Prevent instances of this class from being copied (As this class contains pointers). */ + /** Prevent instances of this class from being copied (As this class contains pointers) */ CLPixelWiseMultiplicationKernel &operator=(const CLPixelWiseMultiplicationKernel &) = delete; /** Allow instances of this class to be moved */ CLPixelWiseMultiplicationKernel(CLPixelWiseMultiplicationKernel &&) = default; diff --git a/arm_compute/core/CL/kernels/CLQuantizationLayerKernel.h b/arm_compute/core/CL/kernels/CLQuantizationLayerKernel.h index 49d76087b5..5d78dce1c2 100644 --- a/arm_compute/core/CL/kernels/CLQuantizationLayerKernel.h +++ b/arm_compute/core/CL/kernels/CLQuantizationLayerKernel.h @@ -45,7 +45,7 @@ public: CLQuantizationLayerKernel &operator=(const CLQuantizationLayerKernel &) = delete; /** Default Move Constructor. */ CLQuantizationLayerKernel(CLQuantizationLayerKernel &&) = default; - /** Default move assignment operator. */ + /** Default move assignment operator */ CLQuantizationLayerKernel &operator=(CLQuantizationLayerKernel &&) = default; /** Default destructor */ ~CLQuantizationLayerKernel() = default; diff --git a/arm_compute/core/CL/kernels/CLRemapKernel.h b/arm_compute/core/CL/kernels/CLRemapKernel.h index 47692e7a00..1cabe1f0af 100644 --- a/arm_compute/core/CL/kernels/CLRemapKernel.h +++ b/arm_compute/core/CL/kernels/CLRemapKernel.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 ARM Limited. + * Copyright (c) 2017-2018 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -37,9 +37,9 @@ class CLRemapKernel : public ICLKernel public: /** Default constructor */ CLRemapKernel(); - /** Prevent instances of this class from being copied (As this class contains pointers). */ + /** Prevent instances of this class from being copied (As this class contains pointers) */ CLRemapKernel(const CLRemapKernel &) = delete; - /** Prevent instances of this class from being copied (As this class contains pointers). */ + /** Prevent instances of this class from being copied (As this class contains pointers) */ CLRemapKernel &operator=(const CLRemapKernel &) = delete; /** Allow instances of this class to be moved */ CLRemapKernel(CLRemapKernel &&) = default; diff --git a/arm_compute/core/CL/kernels/CLScharr3x3Kernel.h b/arm_compute/core/CL/kernels/CLScharr3x3Kernel.h index 63515fd237..99f712f466 100644 --- a/arm_compute/core/CL/kernels/CLScharr3x3Kernel.h +++ b/arm_compute/core/CL/kernels/CLScharr3x3Kernel.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2017 ARM Limited. + * Copyright (c) 2016-2018 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -52,9 +52,9 @@ class CLScharr3x3Kernel : public ICLKernel public: /** Default constructor: initialize all the pointers to nullptr and parameters to zero. */ CLScharr3x3Kernel(); - /** Prevent instances of this class from being copied (As this class contains pointers). */ + /** Prevent instances of this class from being copied (As this class contains pointers) */ CLScharr3x3Kernel(const CLScharr3x3Kernel &) = delete; - /** Prevent instances of this class from being copied (As this class contains pointers). */ + /** Prevent instances of this class from being copied (As this class contains pointers) */ CLScharr3x3Kernel &operator=(const CLScharr3x3Kernel &) = delete; /** Allow instances of this class to be moved */ CLScharr3x3Kernel(CLScharr3x3Kernel &&) = default; diff --git a/arm_compute/core/CL/kernels/CLSobel3x3Kernel.h b/arm_compute/core/CL/kernels/CLSobel3x3Kernel.h index fd596d96d4..21f70a84ea 100644 --- a/arm_compute/core/CL/kernels/CLSobel3x3Kernel.h +++ b/arm_compute/core/CL/kernels/CLSobel3x3Kernel.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2017 ARM Limited. + * Copyright (c) 2016-2018 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -36,9 +36,9 @@ class CLSobel3x3Kernel : public ICLKernel public: /** Default constructor: initialize all the pointers to nullptr and parameters to zero. */ CLSobel3x3Kernel(); - /** Prevent instances of this class from being copied (As this class contains pointers). */ + /** Prevent instances of this class from being copied (As this class contains pointers) */ CLSobel3x3Kernel(const CLSobel3x3Kernel &) = delete; - /** Prevent instances of this class from being copied (As this class contains pointers). */ + /** Prevent instances of this class from being copied (As this class contains pointers) */ CLSobel3x3Kernel &operator=(const CLSobel3x3Kernel &) = delete; /** Allow instances of this class to be moved */ CLSobel3x3Kernel(CLSobel3x3Kernel &&) = default; diff --git a/arm_compute/core/CL/kernels/CLSobel5x5Kernel.h b/arm_compute/core/CL/kernels/CLSobel5x5Kernel.h index 53542ac705..730a73f9a4 100644 --- a/arm_compute/core/CL/kernels/CLSobel5x5Kernel.h +++ b/arm_compute/core/CL/kernels/CLSobel5x5Kernel.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2017 ARM Limited. + * Copyright (c) 2016-2018 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -36,9 +36,9 @@ class CLSobel5x5HorKernel : public ICLKernel public: /** Default constructor: initialize all the pointers to nullptr and parameters to zero. */ CLSobel5x5HorKernel(); - /** Prevent instances of this class from being copied (As this class contains pointers). */ + /** Prevent instances of this class from being copied (As this class contains pointers) */ CLSobel5x5HorKernel(const CLSobel5x5HorKernel &) = delete; - /** Prevent instances of this class from being copied (As this class contains pointers). */ + /** Prevent instances of this class from being copied (As this class contains pointers) */ CLSobel5x5HorKernel &operator=(const CLSobel5x5HorKernel &) = delete; /** Allow instances of this class to be moved */ CLSobel5x5HorKernel(CLSobel5x5HorKernel &&) = default; @@ -77,9 +77,9 @@ class CLSobel5x5VertKernel : public ICLKernel public: /** Default constructor: initialize all the pointers to nullptr and parameters to zero. */ CLSobel5x5VertKernel(); - /** Prevent instances of this class from being copied (As this class contains pointers). */ + /** Prevent instances of this class from being copied (As this class contains pointers) */ CLSobel5x5VertKernel(const CLSobel5x5VertKernel &) = delete; - /** Prevent instances of this class from being copied (As this class contains pointers). */ + /** Prevent instances of this class from being copied (As this class contains pointers) */ CLSobel5x5VertKernel &operator=(const CLSobel5x5VertKernel &) = delete; /** Allow instances of this class to be moved */ CLSobel5x5VertKernel(CLSobel5x5VertKernel &&) = default; diff --git a/arm_compute/core/CL/kernels/CLSobel7x7Kernel.h b/arm_compute/core/CL/kernels/CLSobel7x7Kernel.h index 4fa1c931a6..c675ebb92c 100644 --- a/arm_compute/core/CL/kernels/CLSobel7x7Kernel.h +++ b/arm_compute/core/CL/kernels/CLSobel7x7Kernel.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2017 ARM Limited. + * Copyright (c) 2016-2018 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -36,9 +36,9 @@ class CLSobel7x7HorKernel : public ICLKernel public: /** Default constructor: initialize all the pointers to nullptr and parameters to zero. */ CLSobel7x7HorKernel(); - /** Prevent instances of this class from being copied (As this class contains pointers). */ + /** Prevent instances of this class from being copied (As this class contains pointers) */ CLSobel7x7HorKernel(const CLSobel7x7HorKernel &) = delete; - /** Prevent instances of this class from being copied (As this class contains pointers). */ + /** Prevent instances of this class from being copied (As this class contains pointers) */ CLSobel7x7HorKernel &operator=(const CLSobel7x7HorKernel &) = delete; /** Allow instances of this class to be moved */ CLSobel7x7HorKernel(CLSobel7x7HorKernel &&) = default; @@ -77,9 +77,9 @@ class CLSobel7x7VertKernel : public ICLKernel public: /** Default constructor: initialize all the pointers to nullptr and parameters to zero. */ CLSobel7x7VertKernel(); - /** Prevent instances of this class from being copied (As this class contains pointers). */ + /** Prevent instances of this class from being copied (As this class contains pointers) */ CLSobel7x7VertKernel(const CLSobel7x7VertKernel &) = delete; - /** Prevent instances of this class from being copied (As this class contains pointers). */ + /** Prevent instances of this class from being copied (As this class contains pointers) */ CLSobel7x7VertKernel &operator=(const CLSobel7x7VertKernel &) = delete; /** Allow instances of this class to be moved */ CLSobel7x7VertKernel(CLSobel7x7VertKernel &&) = default; diff --git a/arm_compute/core/CL/kernels/CLSoftmaxLayerKernel.h b/arm_compute/core/CL/kernels/CLSoftmaxLayerKernel.h index c072d2a6de..c562565175 100644 --- a/arm_compute/core/CL/kernels/CLSoftmaxLayerKernel.h +++ b/arm_compute/core/CL/kernels/CLSoftmaxLayerKernel.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 ARM Limited. + * Copyright (c) 2017-2018 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -100,6 +100,7 @@ private: class CLLogits1DMaxShiftExpSumKernel : public ICLKernel { public: + /** Info for whether a parallel reduction will be run and the vector size of the execution. */ using ParallelReductionInfo = std::tuple; public: @@ -139,8 +140,8 @@ public: * * @param[in] size Size to check * - * @return A two-element tuple where the first element is a boolean specifying is a parallel reduction will be run, - * while the second elements is the vector size of the execution. + * @return A two-element tuple where the first element is a boolean specifying if a parallel reduction will be run, + * while the second element is the vector size of the execution. */ static ParallelReductionInfo is_parallel_reduction(size_t size); diff --git a/arm_compute/core/CL/kernels/CLWeightsReshapeKernel.h b/arm_compute/core/CL/kernels/CLWeightsReshapeKernel.h index b9ede12e3d..7a54284199 100644 --- a/arm_compute/core/CL/kernels/CLWeightsReshapeKernel.h +++ b/arm_compute/core/CL/kernels/CLWeightsReshapeKernel.h @@ -28,6 +28,29 @@ namespace arm_compute { +/** OpenCL kernel to perform reshaping on the weights used by convolution and locally connected layer + * + * Rearranges each 3-dimensional kernel to a single row leading to a matrix with linearized kernels. + * In combination with the @ref CLIm2ColKernel can transform a convolution to a matrix multiplication. + * + * For example assuming a 3D weight kernel of 3x3 dimensions and depth of 2 we have: + * @f[ + * \left( \begin{array}{ccc} + * a000 & a001 & a002 \\ + * a010 & a011 & a012 \\ + * a020 & a021 & a022 \\ + * \end{array} \right) + * \left( \begin{array}{ccc} + * a100 & a101 & a102 \\ + * a110 & a111 & a112 \\ + * a120 & a121 & a122 \\ + * \end{array} \right) + * \rightarrow + * \left( \begin{array}{ccccccccc} + * a000 & a001 & a002 & a010 & a011 & a012 & a020 & a021 & a022 & a100 & a101 & a102 & a110 & a111 & a112 & a120 & a121 & a122 \\ + * \end{array} \right) + * @f] + */ class CLWeightsReshapeKernel : public ICLKernel { public: -- cgit v1.2.1