aboutsummaryrefslogtreecommitdiff
path: root/tests/validation/Validation.h
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/validation/Validation.h
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/validation/Validation.h')
-rw-r--r--tests/validation/Validation.h27
1 files changed, 22 insertions, 5 deletions
diff --git a/tests/validation/Validation.h b/tests/validation/Validation.h
index b5f3a4a57a..26271c8bf3 100644
--- a/tests/validation/Validation.h
+++ b/tests/validation/Validation.h
@@ -69,7 +69,10 @@ public:
{
}
- /** Implicit conversion to the underlying type. */
+ /** Implicit conversion to the underlying type.
+ *
+ * @return the underlying type.
+ */
constexpr operator T() const
{
return _value;
@@ -102,7 +105,10 @@ public:
{
}
- /** Implicit conversion to the underlying type. */
+ /** Implicit conversion to the underlying type.
+ *
+ * @return the underlying type.
+ */
constexpr operator value_type() const
{
return _value;
@@ -241,27 +247,36 @@ template <typename T, typename U, typename V = AbsoluteTolerance<float>>
void validate_keypoints(T target_first, T target_last, U reference_first, U reference_last, V tolerance = AbsoluteTolerance<float>(),
float allowed_missing_percentage = 5.f, float allowed_mismatch_percentage = 5.f);
+/** Compare values with a tolerance. */
template <typename T>
struct compare_base
{
+ /** Construct a comparison object.
+ *
+ * @param[in] target Target value.
+ * @param[in] reference Reference value.
+ * @param[in] tolerance Allowed tolerance.
+ */
compare_base(typename T::value_type target, typename T::value_type reference, T tolerance = T(0))
: _target{ target }, _reference{ reference }, _tolerance{ tolerance }
{
}
- typename T::value_type _target{};
- typename T::value_type _reference{};
- T _tolerance{};
+ typename T::value_type _target{}; /**< Target value */
+ typename T::value_type _reference{}; /**< Reference value */
+ T _tolerance{}; /**< Tolerance value */
};
template <typename T>
struct compare;
+/** Compare values with an absolute tolerance */
template <typename U>
struct compare<AbsoluteTolerance<U>> : public compare_base<AbsoluteTolerance<U>>
{
using compare_base<AbsoluteTolerance<U>>::compare_base;
+ /** Perform comparison */
operator bool() const
{
if(!support::cpp11::isfinite(this->_target) || !support::cpp11::isfinite(this->_reference))
@@ -281,11 +296,13 @@ struct compare<AbsoluteTolerance<U>> : public compare_base<AbsoluteTolerance<U>>
}
};
+/** Compare values with a relative tolerance */
template <typename U>
struct compare<RelativeTolerance<U>> : public compare_base<RelativeTolerance<U>>
{
using compare_base<RelativeTolerance<U>>::compare_base;
+ /** Perform comparison */
operator bool() const
{
if(!support::cpp11::isfinite(this->_target) || !support::cpp11::isfinite(this->_reference))