diff options
Diffstat (limited to 'arm_compute/runtime/CL')
-rw-r--r-- | arm_compute/runtime/CL/CLArray.h | 37 | ||||
-rw-r--r-- | arm_compute/runtime/CL/CLDistribution1D.h | 6 | ||||
-rw-r--r-- | arm_compute/runtime/CL/CLLutAllocator.h | 16 | ||||
-rw-r--r-- | arm_compute/runtime/CL/CLMemoryGroup.h | 3 | ||||
-rw-r--r-- | arm_compute/runtime/CL/CLTensor.h | 3 | ||||
-rw-r--r-- | arm_compute/runtime/CL/CLTensorAllocator.h | 22 | ||||
-rw-r--r-- | arm_compute/runtime/CL/CLTuner.h | 3 | ||||
-rw-r--r-- | arm_compute/runtime/CL/functions/CLGEMM.h | 5 | ||||
-rw-r--r-- | arm_compute/runtime/CL/functions/CLGEMMConvolutionLayer.h | 7 | ||||
-rw-r--r-- | arm_compute/runtime/CL/functions/CLGaussian5x5.h | 7 | ||||
-rw-r--r-- | arm_compute/runtime/CL/functions/CLHistogram.h | 3 | ||||
-rw-r--r-- | arm_compute/runtime/CL/functions/CLOpticalFlow.h | 9 | ||||
-rw-r--r-- | arm_compute/runtime/CL/functions/CLReductionOperation.h | 7 | ||||
-rw-r--r-- | arm_compute/runtime/CL/functions/CLSobel5x5.h | 7 | ||||
-rw-r--r-- | arm_compute/runtime/CL/functions/CLSobel7x7.h | 7 |
15 files changed, 98 insertions, 44 deletions
diff --git a/arm_compute/runtime/CL/CLArray.h b/arm_compute/runtime/CL/CLArray.h index dda26e2e89..01c6d8df3d 100644 --- a/arm_compute/runtime/CL/CLArray.h +++ b/arm_compute/runtime/CL/CLArray.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2017 ARM Limited. + * Copyright (c) 2016-2018 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -46,7 +46,9 @@ public: CLArray(const CLArray &) = delete; /** Prevent instances of this class from being copied (As this class contains pointers) */ CLArray &operator=(const CLArray &) = delete; - CLArray(CLArray &&) = default; + /** Allow instances of this class to be move constructed */ + CLArray(CLArray &&) = default; + /** Allow instances of this class to be moved */ CLArray &operator=(CLArray &&) = default; /** Constructor: initializes an array which can contain up to max_num_points values * @@ -101,16 +103,27 @@ private: cl::Buffer _buffer; }; -using CLKeyPointArray = CLArray<KeyPoint>; -using CLCoordinates2DArray = CLArray<Coordinates2D>; +/** OpenCL Array of Key Points. */ +using CLKeyPointArray = CLArray<KeyPoint>; +/** OpenCL Array of 2D Coordinates. */ +using CLCoordinates2DArray = CLArray<Coordinates2D>; +/** OpenCL Array of Detection Windows. */ using CLDetectionWindowArray = CLArray<DetectionWindow>; -using CLROIArray = CLArray<ROI>; -using CLSize2DArray = CLArray<Size2D>; -using CLUInt8Array = CLArray<cl_uchar>; -using CLUInt16Array = CLArray<cl_ushort>; -using CLUInt32Array = CLArray<cl_uint>; -using CLInt16Array = CLArray<cl_short>; -using CLInt32Array = CLArray<cl_int>; -using CLFloatArray = CLArray<cl_float>; +/** OpenCL Array of ROIs. */ +using CLROIArray = CLArray<ROI>; +/** OpenCL Array of 2D Sizes. */ +using CLSize2DArray = CLArray<Size2D>; +/** OpenCL Array of uint8s. */ +using CLUInt8Array = CLArray<cl_uchar>; +/** OpenCL Array of uint16s. */ +using CLUInt16Array = CLArray<cl_ushort>; +/** OpenCL Array of uint32s. */ +using CLUInt32Array = CLArray<cl_uint>; +/** OpenCL Array of int16s. */ +using CLInt16Array = CLArray<cl_short>; +/** OpenCL Array of int32s. */ +using CLInt32Array = CLArray<cl_int>; +/** OpenCL Array of floats. */ +using CLFloatArray = CLArray<cl_float>; } #endif /* __ARM_COMPUTE_CLARRAY_H__ */ diff --git a/arm_compute/runtime/CL/CLDistribution1D.h b/arm_compute/runtime/CL/CLDistribution1D.h index 55dd1247ed..f077893bc0 100644 --- a/arm_compute/runtime/CL/CLDistribution1D.h +++ b/arm_compute/runtime/CL/CLDistribution1D.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2017 ARM Limited. + * Copyright (c) 2016-2018 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -44,9 +44,9 @@ public: * @param[in] range The total number of the consecutive values of the distribution interval. */ CLDistribution1D(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) */ CLDistribution1D(const CLDistribution1D &) = 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) */ CLDistribution1D &operator=(const CLDistribution1D &) = delete; /** Enqueue a map operation of the allocated buffer. * diff --git a/arm_compute/runtime/CL/CLLutAllocator.h b/arm_compute/runtime/CL/CLLutAllocator.h index 4648ffb51f..851e625f84 100644 --- a/arm_compute/runtime/CL/CLLutAllocator.h +++ b/arm_compute/runtime/CL/CLLutAllocator.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2017 ARM Limited. + * Copyright (c) 2016-2018 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -40,13 +40,19 @@ public: CLLutAllocator(); /** Default destructor. */ ~CLLutAllocator() = default; - /** 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) */ CLLutAllocator(const CLLutAllocator &) = delete; - /** Prevent instances of this class from being copy assigned (As this class contains pointers). */ + /** Prevent instances of this class from being copy assigned (As this class contains pointers) */ const CLLutAllocator &operator=(const CLLutAllocator &) = delete; - /** Interface to be implemented by the child class to return the pointer to the mapped data. */ + /** Interface to be implemented by the child class to return the pointer to the mapped data. + * + * @return pointer to the mapped data. + */ uint8_t *data(); - /** Interface to be implemented by the child class to return the pointer to the CL data. */ + /** Interface to be implemented by the child class to return the pointer to the CL data. + * + * @return pointer to the CL data. + */ const cl::Buffer &cl_data() const; /** Enqueue a map operation of the allocated buffer on the given queue. * diff --git a/arm_compute/runtime/CL/CLMemoryGroup.h b/arm_compute/runtime/CL/CLMemoryGroup.h index a6f3eb1c3c..db23720253 100644 --- a/arm_compute/runtime/CL/CLMemoryGroup.h +++ b/arm_compute/runtime/CL/CLMemoryGroup.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 ARM Limited. + * Copyright (c) 2017-2018 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -31,6 +31,7 @@ namespace arm_compute { +/** Memory Group in OpenCL */ using CLMemoryGroup = MemoryGroupBase<CLTensor>; template <> diff --git a/arm_compute/runtime/CL/CLTensor.h b/arm_compute/runtime/CL/CLTensor.h index 2c685d1ed1..e05f307621 100644 --- a/arm_compute/runtime/CL/CLTensor.h +++ b/arm_compute/runtime/CL/CLTensor.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2017 ARM Limited. + * Copyright (c) 2016-2018 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -76,6 +76,7 @@ private: mutable CLTensorAllocator _allocator; /**< Instance of the OpenCL tensor allocator */ }; +/** OpenCL Image */ using CLImage = CLTensor; } #endif /*__ARM_COMPUTE_CLTENSOR_H__ */ diff --git a/arm_compute/runtime/CL/CLTensorAllocator.h b/arm_compute/runtime/CL/CLTensorAllocator.h index 682de174a8..7515074afd 100644 --- a/arm_compute/runtime/CL/CLTensorAllocator.h +++ b/arm_compute/runtime/CL/CLTensorAllocator.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2017 ARM Limited. + * Copyright (c) 2016-2018 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -35,28 +35,38 @@ namespace arm_compute class CLTensor; template <typename> class MemoryGroupBase; +/** Memory Group in OpenCL */ using CLMemoryGroup = MemoryGroupBase<CLTensor>; /** Basic implementation of a CL memory tensor allocator. */ class CLTensorAllocator : public ITensorAllocator { public: - /** Default constructor. */ + /** Default constructor. + * + * @param[in] owner (Optional) Owner of the allocator. + */ CLTensorAllocator(CLTensor *owner = nullptr); /** Default destructor */ ~CLTensorAllocator(); - /** 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) */ CLTensorAllocator(const CLTensorAllocator &) = delete; - /** Prevent instances of this class from being copy assigned (As this class contains pointers). */ + /** Prevent instances of this class from being copy assigned (As this class contains pointers) */ CLTensorAllocator &operator=(const CLTensorAllocator &) = delete; /** Allow instances of this class to be moved */ CLTensorAllocator(CLTensorAllocator &&) = default; /** Allow instances of this class to be moved */ CLTensorAllocator &operator=(CLTensorAllocator &&) = default; - /** Interface to be implemented by the child class to return the pointer to the mapped data. */ + /** Interface to be implemented by the child class to return the pointer to the mapped data. + * + * @return pointer to the mapped data. + */ uint8_t *data(); - /** Interface to be implemented by the child class to return the pointer to the CL data. */ + /** Interface to be implemented by the child class to return the pointer to the CL data. + * + * @return pointer to the CL data. + */ const cl::Buffer &cl_data() const; /** Enqueue a map operation of the allocated buffer on the given queue. * diff --git a/arm_compute/runtime/CL/CLTuner.h b/arm_compute/runtime/CL/CLTuner.h index 1c71709a7a..c1fbfd249c 100644 --- a/arm_compute/runtime/CL/CLTuner.h +++ b/arm_compute/runtime/CL/CLTuner.h @@ -71,7 +71,7 @@ public: /** Give read access to the LWS table * - * return The lws table as unordered_map container + * @return The lws table as unordered_map container */ const std::unordered_map<std::string, cl::NDRange> &lws_table() const; @@ -83,6 +83,7 @@ public: */ void set_cl_kernel_event(cl_event kernel_event); + /** clEnqueueNDRangeKernel symbol */ std::function<decltype(clEnqueueNDRangeKernel)> real_clEnqueueNDRangeKernel; /** Load the LWS table from file diff --git a/arm_compute/runtime/CL/functions/CLGEMM.h b/arm_compute/runtime/CL/functions/CLGEMM.h index 2e82457ee2..f2dd60340c 100644 --- a/arm_compute/runtime/CL/functions/CLGEMM.h +++ b/arm_compute/runtime/CL/functions/CLGEMM.h @@ -51,7 +51,10 @@ class ICLTensor; class CLGEMM : public IFunction { public: - /** Default constructor. */ + /** Default constructor. + * + * @param[in] memory_manager (Optional) Memory manager. + */ CLGEMM(std::shared_ptr<IMemoryManager> memory_manager = nullptr); /** Initialise the kernel's inputs and output * diff --git a/arm_compute/runtime/CL/functions/CLGEMMConvolutionLayer.h b/arm_compute/runtime/CL/functions/CLGEMMConvolutionLayer.h index ca805d90f1..0548ce7be7 100644 --- a/arm_compute/runtime/CL/functions/CLGEMMConvolutionLayer.h +++ b/arm_compute/runtime/CL/functions/CLGEMMConvolutionLayer.h @@ -98,7 +98,10 @@ private: class CLGEMMConvolutionLayer : public IFunction { public: - /** Default constructor */ + /** Default constructor + * + * @param[in] memory_manager (Optional) Memory manager. + */ CLGEMMConvolutionLayer(std::shared_ptr<IMemoryManager> memory_manager = nullptr); /** Set the input and output tensors. * @@ -128,6 +131,8 @@ public: * @param[in] conv_info Contains padding and stride information described in @ref PadStrideInfo. * @param[in] weights_info Specifies if the weights tensor has been reshaped with CLWeightsReshapeKernel. If this is not part of the fully connected layer the weights * tensor has also been transposed with CLGEMMTranspose1xWKernel. Data type supported: Same as @p input. + * + * @return a status */ static Status validate(const ITensorInfo *input, const ITensorInfo *weights, const ITensorInfo *biases, const ITensorInfo *output, const PadStrideInfo &conv_info, const WeightsInfo &weights_info = WeightsInfo()); diff --git a/arm_compute/runtime/CL/functions/CLGaussian5x5.h b/arm_compute/runtime/CL/functions/CLGaussian5x5.h index 3c60cc66a3..892fe146dd 100644 --- a/arm_compute/runtime/CL/functions/CLGaussian5x5.h +++ b/arm_compute/runtime/CL/functions/CLGaussian5x5.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2017 ARM Limited. + * Copyright (c) 2016-2018 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -49,7 +49,10 @@ class ICLTensor; class CLGaussian5x5 : public IFunction { public: - /** Default Constructor. */ + /** Default Constructor. + * + * @param[in] memory_manager (Optional) Memory manager. + */ CLGaussian5x5(std::shared_ptr<IMemoryManager> memory_manager = nullptr); /** Initialise the function's source, destinations and border mode. * diff --git a/arm_compute/runtime/CL/functions/CLHistogram.h b/arm_compute/runtime/CL/functions/CLHistogram.h index 455b61812d..05b08db9da 100644 --- a/arm_compute/runtime/CL/functions/CLHistogram.h +++ b/arm_compute/runtime/CL/functions/CLHistogram.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2017 ARM Limited. + * Copyright (c) 2016-2018 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -31,7 +31,6 @@ namespace arm_compute { class ICLDistribution1D; class ICLTensor; -using ICLTensor = ICLImage; /** Basic function to execute histogram. This function calls the following OpenCL kernels: * diff --git a/arm_compute/runtime/CL/functions/CLOpticalFlow.h b/arm_compute/runtime/CL/functions/CLOpticalFlow.h index 94dda186bf..e2aaf404ce 100644 --- a/arm_compute/runtime/CL/functions/CLOpticalFlow.h +++ b/arm_compute/runtime/CL/functions/CLOpticalFlow.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 ARM Limited. + * Copyright (c) 2017-2018 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -43,9 +43,12 @@ namespace arm_compute { class CLPyramid; +/** OpenCL Array of Internal Keypoints */ using CLLKInternalKeypointArray = CLArray<CLLKInternalKeypoint>; -using CLCoefficientTableArray = CLArray<CLCoefficientTable>; -using CLOldValueArray = CLArray<CLOldValue>; +/** OpenCL Array of Coefficient Tables */ +using CLCoefficientTableArray = CLArray<CLCoefficientTable>; +/** OpenCL Array of Old Values */ +using CLOldValueArray = CLArray<CLOldValue>; /** Basic function to execute optical flow. This function calls the following OpenCL kernels and functions: * diff --git a/arm_compute/runtime/CL/functions/CLReductionOperation.h b/arm_compute/runtime/CL/functions/CLReductionOperation.h index 4ce17ae3a9..abec9b8dc5 100644 --- a/arm_compute/runtime/CL/functions/CLReductionOperation.h +++ b/arm_compute/runtime/CL/functions/CLReductionOperation.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 ARM Limited. + * Copyright (c) 2017-2018 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -45,7 +45,10 @@ class ICLTensor; class CLReductionOperation : public IFunction { public: - /* Constructor */ + /** Default Constructor. + * + * @param[in] memory_manager (Optional) Memory manager. + */ CLReductionOperation(std::shared_ptr<IMemoryManager> memory_manager = nullptr); /** Set the input and output tensors. diff --git a/arm_compute/runtime/CL/functions/CLSobel5x5.h b/arm_compute/runtime/CL/functions/CLSobel5x5.h index 3e603f8311..2b5807b54a 100644 --- a/arm_compute/runtime/CL/functions/CLSobel5x5.h +++ b/arm_compute/runtime/CL/functions/CLSobel5x5.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2017 ARM Limited. + * Copyright (c) 2016-2018 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -49,7 +49,10 @@ class ICLTensor; class CLSobel5x5 : public IFunction { public: - /** Default Constructor. */ + /** Default Constructor. + * + * @param[in] memory_manager (Optional) Memory manager. + */ CLSobel5x5(std::shared_ptr<IMemoryManager> memory_manager = nullptr); /** Initialise the function's source, destinations and border mode. * diff --git a/arm_compute/runtime/CL/functions/CLSobel7x7.h b/arm_compute/runtime/CL/functions/CLSobel7x7.h index 0dc0a1c5e9..65b3cf2da0 100644 --- a/arm_compute/runtime/CL/functions/CLSobel7x7.h +++ b/arm_compute/runtime/CL/functions/CLSobel7x7.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2017 ARM Limited. + * Copyright (c) 2016-2018 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -49,7 +49,10 @@ class ICLTensor; class CLSobel7x7 : public IFunction { public: - /** Default Constructor. */ + /** Default Constructor. + * + * @param[in] memory_manager (Optional) Memory manager. + */ CLSobel7x7(std::shared_ptr<IMemoryManager> memory_manager = nullptr); /** Initialise the function's source, destinations and border mode. * |