summaryrefslogtreecommitdiff
path: root/libs/ARMComputeEx/arm_compute/runtime/CL/functions/CLTopKV2.h
diff options
context:
space:
mode:
Diffstat (limited to 'libs/ARMComputeEx/arm_compute/runtime/CL/functions/CLTopKV2.h')
-rw-r--r--libs/ARMComputeEx/arm_compute/runtime/CL/functions/CLTopKV2.h60
1 files changed, 44 insertions, 16 deletions
diff --git a/libs/ARMComputeEx/arm_compute/runtime/CL/functions/CLTopKV2.h b/libs/ARMComputeEx/arm_compute/runtime/CL/functions/CLTopKV2.h
index 06cd1ee9b..5327e016f 100644
--- a/libs/ARMComputeEx/arm_compute/runtime/CL/functions/CLTopKV2.h
+++ b/libs/ARMComputeEx/arm_compute/runtime/CL/functions/CLTopKV2.h
@@ -14,51 +14,79 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
+/**
+ * @file CLTopKV2.h
+ * @ingroup COM_AI_RUNTIME
+ * @brief This file contains arm_compute::CLTopKV2 class
+ */
#ifndef __ARM_COMPUTE_CLTOPK_V2_H__
#define __ARM_COMPUTE_CLTOPK_V2_H__
#include "arm_compute/core/CL/kernels/CLTopKV2Kernel.h"
-#include "arm_compute/runtime/CL/CLArray.h"
#include "arm_compute/runtime/IFunction.h"
namespace arm_compute
{
class ICLTensor;
-/** Basic function to execute TopK operation. This function calls the following OpenCL kernels:
- *
- * -# @ref CLTopKV2Kernel
+/**
+ * @brief Class to execute TopKV2 operation.
*/
class CLTopKV2 : public IFunction
{
public:
- /** Constructor */
+ /**
+ * @brief Construct a new CLTopKV2 object
+ */
CLTopKV2();
- /** Prevent instances of this class from being copied (As this class contains pointers) */
+
+ /**
+ * @brief Prevent instances of this class from being copied (As this class contains pointers)
+ */
CLTopKV2(const CLTopKV2 &) = delete;
- /** Prevent instances of this class from being copied (As this class contains pointers) */
+
+ /**
+ * @brief Prevent instances of this class from being copied (As this class contains pointers)
+ */
CLTopKV2 &operator=(const CLTopKV2 &) = delete;
- /** Allow instances of this class to be moved */
+
+ /**
+ * @brief Construct a new CLTopKV2 object by using copy constructor
+ * @param[in] CLTopKV2 object to move
+ */
CLTopKV2(CLTopKV2 &&) = default;
- /** Allow instances of this class to be moved */
+
+ /**
+ * @brief Assign a CLTopKV2 object.
+ * @param[in] CLTopKV2 object to assign. This object will be moved.
+ */
CLTopKV2 &operator=(CLTopKV2 &&) = default;
- /** 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.
- *
+
+ /**
+ * @brief Initialise the kernel's inputs and outputs.
* @param[in] input Input image. Data types supported: U8/S16/F32.
* @param[in] k The value of `k`.
* @param[out] values Top k values. Data types supported: S32 if input type is U8/S16, F32 if
* input type is F32.
- * @param[out] indices indices related to top k values. Data types supported: S32 if input type
+ * @param[out] indices Indices related to top k values. Data types supported: S32 if input type
* is U8/S16, F32 if input type is F32.
+ * @return N/A
*/
void configure(ICLTensor *input, int k, ICLTensor *values, ICLTensor *indices,
int total_bits = 32, int bits = 4);
- // Inherited methods overridden:
+ /**
+ * @brief Run the kernels contained in the function
+ * Depending on the value of the following environment variables it works differently:
+ * - If the value of environment variable "ACL_TOPKV2" == "GPU_SINGLE",
+ * quick sort on GPU is used.
+ * - If the value of environment variable "ACL_TOPKV2" == ""GPU"",
+ * radix sort on GPU is used.
+ * - For other value, TopKV2 runs on CPU
+ * @return N/A
+ */
void run() override;
private: