| 
    Intel(R) Threading Building Blocks Doxygen Documentation
    version 4.2.3
    
   | 
 
A fast random number generator. More...
#include <tbb_misc.h>
Public Member Functions | |
| unsigned short | get () | 
| Get a random number.  More... | |
| unsigned short | get (unsigned &seed) | 
| Get a random number for the given seed; update the seed for next use.  More... | |
| FastRandom (void *unique_ptr) | |
| Construct a random number generator.  More... | |
| FastRandom (uint32_t seed) | |
| FastRandom (uint64_t seed) | |
| template<typename T > | |
| void | init (T seed) | 
| void | init (uint64_t seed, int_to_type< 8 >) | 
| void | init (uint32_t seed, int_to_type< 4 >) | 
Private Attributes | |
| unsigned | x | 
| unsigned | c | 
Static Private Attributes | |
| static const unsigned | a = 0x9e3779b1 | 
A fast random number generator.
Uses linear congruential method.
Definition at line 135 of file tbb_misc.h.
      
  | 
  inline | 
Construct a random number generator.
Definition at line 157 of file tbb_misc.h.
References init().
      
  | 
  inline | 
Definition at line 158 of file tbb_misc.h.
References init().
      
  | 
  inline | 
Definition at line 159 of file tbb_misc.h.
References init().
      
  | 
  inline | 
Get a random number.
Definition at line 146 of file tbb_misc.h.
References x.
Referenced by tbb::internal::random_lane_selector::operator()(), tbb::internal::task_stream< num_priority_levels >::push(), and tbb::internal::generic_scheduler::steal_task().
      
  | 
  inline | 
Get a random number for the given seed; update the seed for next use.
Definition at line 150 of file tbb_misc.h.
References __TBB_ASSERT, a, and c.
      
  | 
  inline | 
Definition at line 161 of file tbb_misc.h.
Referenced by FastRandom(), and init().
      
  | 
  inline | 
Definition at line 164 of file tbb_misc.h.
References init().
      
  | 
  inline | 
Definition at line 167 of file tbb_misc.h.
References a, c, tbb::internal::GetPrime(), and x.
      
  | 
  staticprivate | 
Definition at line 142 of file tbb_misc.h.
      
  | 
  private | 
Definition at line 141 of file tbb_misc.h.
      
  | 
  private | 
Definition at line 141 of file tbb_misc.h.