From 7b5409d1e8ed49214356f075e71b54383672038a Mon Sep 17 00:00:00 2001 From: Hoa Nguyen Date: Thu, 20 Aug 2020 16:57:46 -0700 Subject: [PATCH] base: Tag API methods and variables in random.hh Change-Id: I75f8843ee696055f156aa0d9e035094d8206f4b9 Signed-off-by: Hoa Nguyen Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33115 Reviewed-by: Bobby R. Bruce Reviewed-by: Jason Lowe-Power Maintainer: Bobby R. Bruce Tested-by: kokoro --- src/base/random.hh | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/base/random.hh b/src/base/random.hh index cc13446c6..f161d71ef 100644 --- a/src/base/random.hh +++ b/src/base/random.hh @@ -64,8 +64,13 @@ class Random : public Serializable public: + /** + * @ingroup api_base_utils + * @{ + */ Random(); Random(uint32_t s); + /** @} */ // end of api_base_utils ~Random(); void init(uint32_t s); @@ -73,6 +78,8 @@ class Random : public Serializable /** * Use the SFINAE idiom to choose an implementation based on * whether the type is integral or floating point. + * + * @ingroup api_base_utils */ template typename std::enable_if::value, T>::type @@ -83,6 +90,9 @@ class Random : public Serializable return dist(gen); } + /** + * @ingroup api_base_utils + */ template typename std::enable_if::value, T>::type random() @@ -91,7 +101,9 @@ class Random : public Serializable std::uniform_real_distribution dist; return dist(gen); } - + /** + * @ingroup api_base_utils + */ template typename std::enable_if::value, T>::type random(T min, T max) @@ -104,6 +116,9 @@ class Random : public Serializable void unserialize(CheckpointIn &cp) override; }; +/** + * @ingroup api_base_utils + */ extern Random random_mt; #endif // __BASE_RANDOM_HH__ -- 2.30.2