16 #include <base/concurrency/SpinLock.h>
18 _COM_AZURE_DEV__BASE__ENTER_NAMESPACE
20 namespace RandomImpl {
22 template<
unsigned int ID>
41 friend class Initialization;
45 enum Generator {MT11213A = 0, MT11213B = 1, MT19937 = 2, TT800 = 3};
51 static unsigned int state[];
53 static unsigned int nextWord;
61 static void randomize() noexcept;
68 static
void randomize(
unsigned int seed) noexcept;
73 static
unsigned int getInteger() noexcept;
78 static inline
float getFloat() noexcept {
79 return static_cast<float>((1.0/0xffffffff) * getInteger());
86 return (1.0/0xffffffff) * getInteger();
93 return (1.0L/0xffffffff) * getInteger();
97 _COM_AZURE_DEV__BASE__LEAVE_NAMESPACE