|
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 128 of file tbb_misc.h.
|
inline |
|
inline |
Definition at line 151 of file tbb_misc.h.
|
inline |
Definition at line 152 of file tbb_misc.h.
|
inline |
Get a random number.
Definition at line 139 of file tbb_misc.h.
Referenced by tbb::internal::arena::occupy_free_slot_in_range(), 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 143 of file tbb_misc.h.
References __TBB_ASSERT.
|
inline |
Definition at line 154 of file tbb_misc.h.
|
inline |
Definition at line 157 of file tbb_misc.h.
|
inline |
Definition at line 160 of file tbb_misc.h.
References tbb::internal::GetPrime().
|
staticprivate |
Definition at line 135 of file tbb_misc.h.
|
private |
Definition at line 134 of file tbb_misc.h.
|
private |
Definition at line 134 of file tbb_misc.h.