aboutsummaryrefslogtreecommitdiff
path: root/tests/validation/FixedPoint.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/FixedPoint.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/FixedPoint.h')
-rw-r--r--tests/validation/FixedPoint.h31
1 files changed, 22 insertions, 9 deletions
diff --git a/tests/validation/FixedPoint.h b/tests/validation/FixedPoint.h
index 9691e2a037..81c4f53724 100644
--- a/tests/validation/FixedPoint.h
+++ b/tests/validation/FixedPoint.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017 ARM Limited.
+ * Copyright (c) 2017-2018 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -54,15 +54,26 @@ namespace traits
// Promote types
// *INDENT-OFF*
// clang-format off
+/** Promote a type */
template <typename T> struct promote { };
-template <> struct promote<uint8_t> { using type = uint16_t; };
-template <> struct promote<int8_t> { using type = int16_t; };
-template <> struct promote<uint16_t> { using type = uint32_t; };
-template <> struct promote<int16_t> { using type = int32_t; };
-template <> struct promote<uint32_t> { using type = uint64_t; };
-template <> struct promote<int32_t> { using type = int64_t; };
-template <> struct promote<uint64_t> { using type = uint64_t; };
-template <> struct promote<int64_t> { using type = int64_t; };
+/** Promote uint8_t to uint16_t */
+template <> struct promote<uint8_t> { using type = uint16_t; /**< Promoted type */ };
+/** Promote int8_t to int16_t */
+template <> struct promote<int8_t> { using type = int16_t; /**< Promoted type */ };
+/** Promote uint16_t to uint32_t */
+template <> struct promote<uint16_t> { using type = uint32_t; /**< Promoted type */ };
+/** Promote int16_t to int32_t */
+template <> struct promote<int16_t> { using type = int32_t; /**< Promoted type */ };
+/** Promote uint32_t to uint64_t */
+template <> struct promote<uint32_t> { using type = uint64_t; /**< Promoted type */ };
+/** Promote int32_t to int64_t */
+template <> struct promote<int32_t> { using type = int64_t; /**< Promoted type */ };
+/** Promote float to float */
+template <> struct promote<float> { using type = float; /**< Promoted type */ };
+/** Promote half to half */
+template <> struct promote<half> { using type = half; /**< Promoted type */ };
+
+/** Get promoted type */
template <typename T>
using promote_t = typename promote<T>::type;
// clang-format on
@@ -281,6 +292,7 @@ constexpr int clz(T value)
return __builtin_clz(value) - (32 - std::numeric_limits<unsigned_T>::digits);
}
+/** Constant expressions */
template <typename T>
struct constant_expr
{
@@ -362,6 +374,7 @@ struct constant_expr
return static_cast<T>(std::min<U>(std::max<U>(val, static_cast<U>(std::numeric_limits<T>::min())), static_cast<U>(std::numeric_limits<T>::max())));
}
};
+/** Functions */
struct functions
{
/** Output stream operator