base: Tag API methods and variables in random.hh
authorHoa Nguyen <hoanguyen@ucdavis.edu>
Thu, 20 Aug 2020 23:57:46 +0000 (16:57 -0700)
committerHoa Nguyen <hoanguyen@ucdavis.edu>
Tue, 8 Sep 2020 16:24:06 +0000 (16:24 +0000)
Change-Id: I75f8843ee696055f156aa0d9e035094d8206f4b9
Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33115
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
src/base/random.hh

index cc13446c672167c98dd0a63c35f5a8f28121cc81..f161d71efc7374568d2ce8ab796872849c3a08f7 100644 (file)
@@ -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 T>
     typename std::enable_if<std::is_integral<T>::value, T>::type
@@ -83,6 +90,9 @@ class Random : public Serializable
         return dist(gen);
     }
 
+    /**
+     * @ingroup api_base_utils
+     */
     template <typename T>
     typename std::enable_if<std::is_floating_point<T>::value, T>::type
     random()
@@ -91,7 +101,9 @@ class Random : public Serializable
         std::uniform_real_distribution<T> dist;
         return dist(gen);
     }
-
+    /**
+     * @ingroup api_base_utils
+     */
     template <typename T>
     typename std::enable_if<std::is_integral<T>::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__