aboutsummaryrefslogtreecommitdiff
path: root/tests/framework/datasets
diff options
context:
space:
mode:
authorAlex Gilday <alexander.gilday@arm.com>2018-03-21 13:54:09 +0000
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:49:16 +0000
commitc357c47be8a3f210f9eee9a05cc13f1051b036d3 (patch)
treea88ac857150da970a0862a3479b78c616d8aa1d3 /tests/framework/datasets
parent724079d6fce3bf6a05cd6c7b4884b132b27e9e90 (diff)
downloadComputeLibrary-c357c47be8a3f210f9eee9a05cc13f1051b036d3.tar.gz
COMPMID-1008: Fix Doxygen issues
Change-Id: Ie73d8771f85d1f5b059f3a56f1bbd73c98e94a38 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/124723 Reviewed-by: Michalis Spyrou <michalis.spyrou@arm.com> Tested-by: Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'tests/framework/datasets')
-rw-r--r--tests/framework/datasets/CartesianProductDataset.h34
-rw-r--r--tests/framework/datasets/ContainerDataset.h21
-rw-r--r--tests/framework/datasets/Dataset.h9
-rw-r--r--tests/framework/datasets/InitializerListDataset.h20
-rw-r--r--tests/framework/datasets/JoinDataset.h18
-rw-r--r--tests/framework/datasets/RangeDataset.h21
-rw-r--r--tests/framework/datasets/SingletonDataset.h27
-rw-r--r--tests/framework/datasets/ZipDataset.h20
8 files changed, 160 insertions, 10 deletions
diff --git a/tests/framework/datasets/CartesianProductDataset.h b/tests/framework/datasets/CartesianProductDataset.h
index 438a782c46..b2790d7525 100644
--- a/tests/framework/datasets/CartesianProductDataset.h
+++ b/tests/framework/datasets/CartesianProductDataset.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017 ARM Limited.
+ * Copyright (c) 2017-2018 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -64,6 +64,7 @@ public:
{
}
+ /** Allow instances of this class to be move constructed */
CartesianProductDataset(CartesianProductDataset &&) = default;
/** Type of the dataset. */
@@ -72,6 +73,11 @@ public:
/** Iterator for the dataset. */
struct iterator
{
+ /** Construct an iterator.
+ *
+ * @param[in] dataset1 Dataset 1.
+ * @param[in] dataset2 Dataset 2.
+ */
iterator(const T_noref *dataset1, const U_noref *dataset2)
: _iter1{ dataset1->begin() },
_dataset2{ dataset2 },
@@ -79,23 +85,40 @@ public:
{
}
+ /** Allow instances of this class to be copy constructed */
iterator(const iterator &) = default;
+ /** Allow instances of this class to be copied */
iterator &operator=(const iterator &) = default;
- iterator(iterator &&) = default;
+ /** Allow instances of this class to be move constructed */
+ iterator(iterator &&) = default;
+ /** Allow instances of this class to be moved */
iterator &operator=(iterator &&) = default;
+ /** Default destructor */
~iterator() = default;
+ /** Get the description of the current value.
+ *
+ * @return description of the current value.
+ */
std::string description() const
{
return _iter1.description() + ":" + _iter2.description();
}
+ /** Get the value of the iterator.
+ *
+ * @return the value of the iterator.
+ */
CartesianProductDataset::type operator*() const
{
return std::tuple_cat(*_iter1, *_iter2);
}
+ /** Inrement the iterator.
+ *
+ * @return *this;
+ */
iterator &operator++()
{
++_second_pos;
@@ -159,6 +182,13 @@ CartesianProductDataset<T, U> combine(T &&dataset1, U &&dataset2)
return CartesianProductDataset<T, U>(std::forward<T>(dataset1), std::forward<U>(dataset2));
}
+/** Helper function to create a @ref CartesianProductDataset.
+ *
+ * @param[in] dataset1 First dataset.
+ * @param[in] dataset2 Second dataset.
+ *
+ * @return A grid dataset.
+ */
template <typename T, typename U>
CartesianProductDataset<T, U>
operator*(T &&dataset1, U &&dataset2)
diff --git a/tests/framework/datasets/ContainerDataset.h b/tests/framework/datasets/ContainerDataset.h
index 80616c46fc..8dfd2164c7 100644
--- a/tests/framework/datasets/ContainerDataset.h
+++ b/tests/framework/datasets/ContainerDataset.h
@@ -72,8 +72,10 @@ public:
{
}
+ /** Allow instances of this class to be copy constructed */
ContainerDataset(const ContainerDataset &) = default;
- ContainerDataset(ContainerDataset &&) = default;
+ /** Allow instances of this class to be move constructed */
+ ContainerDataset(ContainerDataset &&) = default;
/** Type of the dataset. */
using type = std::tuple<container_value_type>;
@@ -81,22 +83,39 @@ public:
/** Iterator for the dataset. */
struct iterator
{
+ /** Construct iterator
+ *
+ * @param[in] name Description of the values.
+ * @param[in] iterator Iterator for the values.
+ */
iterator(std::string name, container_const_iterator iterator)
: _name{ name }, _iterator{ iterator }
{
}
+ /** Get a description of the current value.
+ *
+ * @return a description.
+ */
std::string description() const
{
using support::cpp11::to_string;
return _name + "=" + to_string(*_iterator);
}
+ /** Get the current value.
+ *
+ * @return the current value.
+ */
ContainerDataset::type operator*() const
{
return std::make_tuple(*_iterator);
}
+ /** Increment the iterator.
+ *
+ * @return this.
+ */
iterator &operator++()
{
++_iterator;
diff --git a/tests/framework/datasets/Dataset.h b/tests/framework/datasets/Dataset.h
index d91673073a..5fcdc49e01 100644
--- a/tests/framework/datasets/Dataset.h
+++ b/tests/framework/datasets/Dataset.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017 ARM Limited.
+ * Copyright (c) 2017-2018 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -39,10 +39,13 @@ namespace dataset
class Dataset
{
protected:
- Dataset() = default;
+ /** Default constructor. */
+ Dataset() = default;
+ /** Default destructor. */
~Dataset() = default;
public:
+ /** Allow instances of this class to be move constructed */
Dataset(Dataset &&) = default;
};
@@ -62,9 +65,11 @@ protected:
{
}
+ /** Default destructor. */
~NamedDataset() = default;
public:
+ /** Allow instances of this class to be move constructed */
NamedDataset(NamedDataset &&) = default;
/** Return name of the dataset.
diff --git a/tests/framework/datasets/InitializerListDataset.h b/tests/framework/datasets/InitializerListDataset.h
index 7d32234fab..f90e0b747a 100644
--- a/tests/framework/datasets/InitializerListDataset.h
+++ b/tests/framework/datasets/InitializerListDataset.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017 ARM Limited.
+ * Copyright (c) 2017-2018 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -59,6 +59,7 @@ public:
{
}
+ /** Allow instances of this class to be move constructed */
InitializerListDataset(InitializerListDataset &&) = default;
/** Type of the dataset. */
@@ -67,22 +68,39 @@ public:
/** Iterator for the dataset. */
struct iterator
{
+ /** Construct an iterator for the dataset
+ *
+ * @param[in] name Name of the dataset.
+ * @param[in] iterator Iterator of the dataset values.
+ */
iterator(std::string name, data_const_iterator iterator)
: _name{ name }, _iterator{ iterator }
{
}
+ /** Get a description of the current value.
+ *
+ * @return a description.
+ */
std::string description() const
{
using support::cpp11::to_string;
return _name + "=" + to_string(*_iterator);
}
+ /** Get the current value.
+ *
+ * @return the current value.
+ */
InitializerListDataset::type operator*() const
{
return std::make_tuple(*_iterator);
}
+ /** Increment the iterator.
+ *
+ * @return *this.
+ */
iterator &operator++()
{
++_iterator;
diff --git a/tests/framework/datasets/JoinDataset.h b/tests/framework/datasets/JoinDataset.h
index d682c19d6b..bf504ec3ce 100644
--- a/tests/framework/datasets/JoinDataset.h
+++ b/tests/framework/datasets/JoinDataset.h
@@ -64,6 +64,7 @@ public:
{
}
+ /** Allow instances of this class to be move constructed */
JoinDataset(JoinDataset &&) = default;
/** Type of the dataset. */
@@ -72,21 +73,38 @@ public:
/** Iterator for the dataset. */
struct iterator
{
+ /** Construct an iterator.
+ *
+ * @param[in] dataset1 Dataset 1.
+ * @param[in] dataset2 Dataset 2.
+ */
iterator(const T_noref *dataset1, const U_noref *dataset2)
: _iter1{ dataset1->begin() }, _iter2{ dataset2->begin() }, _first_size{ dataset1->size() }
{
}
+ /** Get the description of the current value.
+ *
+ * @return description of the current value.
+ */
std::string description() const
{
return _first_size > 0 ? _iter1.description() : _iter2.description();
}
+ /** Get the value of the iterator.
+ *
+ * @return the value of the iterator.
+ */
JoinDataset::type operator*() const
{
return _first_size > 0 ? *_iter1 : *_iter2;
}
+ /** Inrement the iterator.
+ *
+ * @return *this;
+ */
iterator &operator++()
{
if(_first_size > 0)
diff --git a/tests/framework/datasets/RangeDataset.h b/tests/framework/datasets/RangeDataset.h
index 637abe0a83..a08756694a 100644
--- a/tests/framework/datasets/RangeDataset.h
+++ b/tests/framework/datasets/RangeDataset.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017 ARM Limited.
+ * Copyright (c) 2017-2018 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -60,6 +60,7 @@ public:
{
}
+ /** Allow instances of this class to be move constructed */
RangeDataset(RangeDataset &&) = default;
/** Type of the dataset. */
@@ -68,22 +69,40 @@ public:
/** Iterator for the dataset. */
struct iterator
{
+ /** Construct an iterator.
+ *
+ * @param[in] name Dataset name.
+ * @param[in] start Dataset start value.
+ * @param[in] step Dataset step size.
+ */
iterator(std::string name, T start, T step)
: _name{ name }, _value{ start }, _step{ step }
{
}
+ /** Get the description of the current value.
+ *
+ * @return description of the current value.
+ */
std::string description() const
{
using support::cpp11::to_string;
return _name + "=" + to_string(_value);
}
+ /** Get the value of the iterator.
+ *
+ * @return the value of the iterator.
+ */
RangeDataset::type operator*() const
{
return std::make_tuple(_value);
}
+ /** Inrement the iterator.
+ *
+ * @return *this;
+ */
iterator &operator++()
{
_value += _step;
diff --git a/tests/framework/datasets/SingletonDataset.h b/tests/framework/datasets/SingletonDataset.h
index 1acb5765e5..47a38ec6f2 100644
--- a/tests/framework/datasets/SingletonDataset.h
+++ b/tests/framework/datasets/SingletonDataset.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017 ARM Limited.
+ * Copyright (c) 2017-2018 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -56,6 +56,7 @@ public:
{
}
+ /** Allow instances of this class to be move constructed */
SingletonDataset(SingletonDataset &&) = default;
/** Type of the dataset. */
@@ -64,29 +65,51 @@ public:
/** Iterator for the dataset. */
struct iterator
{
+ /** Construct an iterator.
+ *
+ * @param[in] name Name of the dataset.
+ * @param[in] value The singleton value.
+ */
iterator(std::string name, const T *value)
: _name{ name }, _value{ value }
{
}
+ /** Default destructor. */
~iterator() = default;
+ /** Allow instances of this class to be copy constructed */
iterator(const iterator &) = default;
+ /** Allow instances of this class to be copied */
iterator &operator=(const iterator &) = default;
- iterator(iterator &&) = default;
+ /** Allow instances of this class to be move constructed */
+ iterator(iterator &&) = default;
+ /** Allow instances of this class to be moved */
iterator &operator=(iterator &&) = default;
+ /** Get the description of the current value.
+ *
+ * @return description of the current value.
+ */
std::string description() const
{
using support::cpp11::to_string;
return _name + "=" + to_string(*_value);
}
+ /** Get the value of the iterator.
+ *
+ * @return the value of the iterator.
+ */
SingletonDataset::type operator*() const
{
return std::make_tuple(*_value);
}
+ /** Inrement the iterator.
+ *
+ * @return *this;
+ */
iterator &operator++()
{
return *this;
diff --git a/tests/framework/datasets/ZipDataset.h b/tests/framework/datasets/ZipDataset.h
index b95b7209a7..3d93b92506 100644
--- a/tests/framework/datasets/ZipDataset.h
+++ b/tests/framework/datasets/ZipDataset.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017 ARM Limited.
+ * Copyright (c) 2017-2018 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -62,6 +62,7 @@ public:
{
}
+ /** Allow instances of this class to be move constructed */
ZipDataset(ZipDataset &&) = default;
/** Type of the dataset. */
@@ -70,21 +71,38 @@ public:
/** Iterator for the dataset. */
struct iterator
{
+ /** Construct an iterator.
+ *
+ * @param[in] iter1 Iterator 1.
+ * @param[in] iter2 Iterator 2.
+ */
iterator(iter1_type iter1, iter2_type iter2)
: _iter1{ std::move(iter1) }, _iter2{ std::move(iter2) }
{
}
+ /** Get the description of the current value.
+ *
+ * @return description of the current value.
+ */
std::string description() const
{
return _iter1.description() + ":" + _iter2.description();
}
+ /** Get the value of the iterator.
+ *
+ * @return the value of the iterator.
+ */
ZipDataset::type operator*() const
{
return std::tuple_cat(*_iter1, *_iter2);
}
+ /** Inrement the iterator.
+ *
+ * @return *this;
+ */
iterator &operator++()
{
++_iter1;