From: Hoa Nguyen Date: Thu, 20 Aug 2020 23:57:46 +0000 (-0700) Subject: base: Tag API methods and variables in random.hh X-Git-Tag: v20.1.0.0~97 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7b5409d1e8ed49214356f075e71b54383672038a;p=gem5.git 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 --- 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__