Hoa Nguyen has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/33075 )
Change subject: base: Tag API methods in intmath.hh
......................................................................
base: Tag API methods in intmath.hh
Change-Id: Ia50830c7620380ff2aba081f56f74822aff982bf
Signed-off-by: Hoa Nguyen <hoangu...@ucdavis.edu>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33075
Maintainer: Bobby R. Bruce <bbr...@ucdavis.edu>
Tested-by: kokoro <noreply+kok...@google.com>
Reviewed-by: Bobby R. Bruce <bbr...@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <power...@gmail.com>
---
M src/base/intmath.hh
1 file changed, 21 insertions(+), 2 deletions(-)
Approvals:
Jason Lowe-Power: Looks good to me, approved
Bobby R. Bruce: Looks good to me, approved; Looks good to me, approved
kokoro: Regressions pass
diff --git a/src/base/intmath.hh b/src/base/intmath.hh
index 3713ae6..daf5f5d 100644
--- a/src/base/intmath.hh
+++ b/src/base/intmath.hh
@@ -36,6 +36,9 @@
#include "base/logging.hh"
#include "base/types.hh"
+/**
+ * @ingroup api_base_utils
+ */
inline uint64_t
power(uint32_t n, uint32_t e)
{
@@ -52,6 +55,9 @@
return result;
}
+/**
+ * @ingroup api_base_utils
+ */
template <class T>
inline typename std::enable_if<std::is_integral<T>::value, int>::type
floorLog2(T x)
@@ -74,6 +80,9 @@
return y;
}
+/**
+ * @ingroup api_base_utils
+ */
template <class T>
inline int
ceilLog2(const T& n)
@@ -85,6 +94,9 @@
return floorLog2(n - (T)1) + 1;
}
+/**
+ * @ingroup api_base_utils
+ */
template <class T>
inline bool
isPowerOf2(const T& n)
@@ -94,6 +106,9 @@
return n && !(n & (n - 1));
}
+/**
+ * @ingroup api_base_utils
+ */
template <class T, class U>
inline T
divCeil(const T& a, const U& b)
@@ -108,7 +123,9 @@
* @param align is the alignment. Can only be a power of 2.
* @return The aligned address. The smallest number divisible
* by @param align which is greater than or equal to @param val.
-*/
+ *
+ * @ingroup api_base_utils
+ */
template <class T, class U>
inline T
roundUp(const T& val, const U& align)
@@ -125,7 +142,9 @@
* @param align is the alignment. Can only be a power of 2.
* @return The aligned address. The biggest number divisible
* by @param align which is less than or equal to @param val.
-*/
+ *
+ * @ingroup api_base_utils
+ */
template <class T, class U>
inline T
roundDown(const T& val, const U& align)
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/33075
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: Ia50830c7620380ff2aba081f56f74822aff982bf
Gerrit-Change-Number: 33075
Gerrit-PatchSet: 2
Gerrit-Owner: Hoa Nguyen <hoangu...@ucdavis.edu>
Gerrit-Reviewer: Bobby R. Bruce <bbr...@ucdavis.edu>
Gerrit-Reviewer: Hoa Nguyen <hoangu...@ucdavis.edu>
Gerrit-Reviewer: Jason Lowe-Power <power...@gmail.com>
Gerrit-Reviewer: kokoro <noreply+kok...@google.com>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s