aboutsummaryrefslogtreecommitdiff
path: root/tests/CL
diff options
context:
space:
mode:
Diffstat (limited to 'tests/CL')
-rw-r--r--tests/CL/CLAccessor.h20
-rw-r--r--tests/CL/CLArrayAccessor.h8
-rw-r--r--tests/CL/CLLutAccessor.h9
-rw-r--r--tests/CL/Helper.h15
4 files changed, 42 insertions, 10 deletions
diff --git a/tests/CL/CLAccessor.h b/tests/CL/CLAccessor.h
index f2e13f1232..66f3df06af 100644
--- a/tests/CL/CLAccessor.h
+++ b/tests/CL/CLAccessor.h
@@ -44,14 +44,30 @@ public:
*/
CLAccessor(CLTensor &tensor);
+ /** Prevent instances of this class from being copy constructed */
CLAccessor(const CLAccessor &) = delete;
+ /** Prevent instances of this class from being copied */
CLAccessor &operator=(const CLAccessor &) = delete;
- CLAccessor(CLAccessor &&) = default;
+ /** Allow instances of this class to be move constructed */
+ CLAccessor(CLAccessor &&) = default;
+ /** Allow instances of this class to be moved */
CLAccessor &operator=(CLAccessor &&) = default;
/** Destructor that unmaps the CL memory. */
~CLAccessor();
+ /** Get the tensor data.
+ *
+ * @return a constant pointer to the tensor data.
+ */
+ const void *data() const;
+ /** Get the tensor data.
+ *
+ * @return a pointer to the tensor data.
+ */
+ void *data();
+
+ // Inherited method overrides
TensorShape shape() const override;
size_t element_size() const override;
size_t size() const override;
@@ -65,8 +81,6 @@ public:
QuantizationInfo quantization_info() const override;
const void *operator()(const Coordinates &coord) const override;
void *operator()(const Coordinates &coord) override;
- const void *data() const;
- void *data();
private:
CLTensor &_tensor;
diff --git a/tests/CL/CLArrayAccessor.h b/tests/CL/CLArrayAccessor.h
index a516a9d96a..c1638ae0df 100644
--- a/tests/CL/CLArrayAccessor.h
+++ b/tests/CL/CLArrayAccessor.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017 ARM Limited.
+ * Copyright (c) 2017-2018 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -49,9 +49,13 @@ public:
_array.map();
}
+ /** Prevent instances of this class from being copy constructed */
CLArrayAccessor(const CLArrayAccessor &) = delete;
+ /** Prevent instances of this class from being copied */
CLArrayAccessor &operator=(const CLArrayAccessor &) = delete;
- CLArrayAccessor(CLArrayAccessor &&) = default;
+ /** Allow instances of this class to be move constructed */
+ CLArrayAccessor(CLArrayAccessor &&) = default;
+ /** Allow instances of this class to be moved */
CLArrayAccessor &operator=(CLArrayAccessor &&) = default;
/** Destructor that unmaps the CL memory. */
diff --git a/tests/CL/CLLutAccessor.h b/tests/CL/CLLutAccessor.h
index aa0285845d..ee5886191c 100644
--- a/tests/CL/CLLutAccessor.h
+++ b/tests/CL/CLLutAccessor.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017 ARM Limited.
+ * Copyright (c) 2017-2018 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -44,14 +44,19 @@ public:
{
_lut.map(true);
}
+ /** Default destructor */
~CLLutAccessor()
{
_lut.unmap();
}
+ /** Prevent instances of this class from being copy constructed */
CLLutAccessor(const CLLutAccessor &) = delete;
+ /** Prevent instances of this class from being copied */
CLLutAccessor &operator=(const CLLutAccessor &) = delete;
- CLLutAccessor(CLLutAccessor &&) = default;
+ /** Allow instances of this class to be move constructed */
+ CLLutAccessor(CLLutAccessor &&) = default;
+ /** Allow instance of this class to be moved */
CLLutAccessor &operator=(CLLutAccessor &&) = default;
int num_elements() const override
diff --git a/tests/CL/Helper.h b/tests/CL/Helper.h
index 3f19d61a7d..30fbe568f4 100644
--- a/tests/CL/Helper.h
+++ b/tests/CL/Helper.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2018 ARM Limited.
+ * Copyright (c) 2017-2018 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -31,11 +31,15 @@ namespace arm_compute
{
namespace test
{
-// This template synthetizes an ICLSimpleFunction which runs the given kernel K
+/** This template synthetizes an ICLSimpleFunction which runs the given kernel K */
template <typename K>
class CLSynthetizeFunction : public ICLSimpleFunction
{
public:
+ /** Configure the kernel.
+ *
+ * @param[in] args Configuration arguments.
+ */
template <typename... Args>
void configure(Args &&... args)
{
@@ -45,11 +49,16 @@ public:
}
};
-// As above but this also setups a Zero border on the input tensor of the specified bordersize
+/** As above but this also setups a Zero border on the input tensor of the specified bordersize */
template <typename K, int bordersize>
class CLSynthetizeFunctionWithZeroConstantBorder : public ICLSimpleFunction
{
public:
+ /** Configure the kernel.
+ *
+ * @param[in] first First configuration argument.
+ * @param[in] args Rest of the configuration arguments.
+ */
template <typename T, typename... Args>
void configure(T first, Args &&... args)
{