#include <FXMaths.h>
FX::Maths::FRandomness is not threadsafe, but this source is. You can access it via FX::Maths::SysRandSrc
.
Public Member Functions | |
FXulong | int64 () |
double | real1 () |
double | real2 () |
double | real3 () |
Protected Member Functions | |
QMUTEX_INLINEP bool | isLocked () const |
QMUTEX_INLINEP FXbool | locked () const |
QMUTEX_INLINEP FXuint | spinCount () const |
QMUTEX_INLINEP void | setSpinCount (FXuint c) |
QMUTEX_INLINEP void | lock () |
QMUTEX_INLINEP void | unlock () |
QMUTEX_INLINEP bool | tryLock () |
QMUTEX_INLINEP FXbool | trylock () |
void | fill (FXuchar *d, FXuval len) throw () |
Static Protected Member Functions | |
static QMUTEX_INLINEP bool | setMutexDebugYield (bool v) |
Static Protected Attributes | |
static const bool | usingSIMD |
FXulong FX::Maths::SysRandomness::int64 | ( | ) | [inline] |
Generates a random number on [0, 2^64-1]-interval.
Reimplemented from FX::Maths::FRandomness.
References FX::Maths::FRandomness::int64().
double FX::Maths::SysRandomness::real1 | ( | ) | [inline] |
generates a random number on [0,1]-real-interval by division of 2^53-1
Reimplemented from FX::Maths::FRandomness.
References FX::Maths::FRandomness::real1().
double FX::Maths::SysRandomness::real2 | ( | ) | [inline] |
generates a random number on [0,1)-real-interval by division of 2^53
Reimplemented from FX::Maths::FRandomness.
References FX::Maths::FRandomness::real2().
double FX::Maths::SysRandomness::real3 | ( | ) | [inline] |
generates a random number on (0,1)-real-interval by division of 2^52
Reimplemented from FX::Maths::FRandomness.
References FX::Maths::FRandomness::real3().
QMUTEX_INLINEP bool FX::QMutex::isLocked | ( | ) | const [inherited] |
Returns if the mutex is locked.
QMUTEX_INLINEP FXuint FX::QMutex::spinCount | ( | ) | const [inherited] |
Returns the current spin count.
QMUTEX_INLINEP void FX::QMutex::setSpinCount | ( | FXuint | c | ) | [inherited] |
Sets the spin count.
QMUTEX_INLINEP void FX::QMutex::lock | ( | ) | [inherited] |
If free, claims the mutex and returns immediately. If not, waits until the current holder releases it and then claims it before returning
Reimplemented in FX::TnFXApp.
QMUTEX_INLINEP void FX::QMutex::unlock | ( | ) | [inherited] |
Releases the mutex for other to claim. Must be called as many times as lock() is called
Reimplemented in FX::TnFXApp.
bool FX::QMutex::tryLock | ( | ) | [inherited] |
Claims the mutex if free and returns true. If already taken, immediately returns false without waiting
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
For FOX compatibility
References FX::QThread::id().
QMUTEX_INLINEP bool FX::QMutex::setMutexDebugYield | ( | bool | v | ) | [static, inherited] |
Sets the debugging flag for mutexs in this process. See the main description above
void FX::Maths::FRandomness::fill | ( | FXuchar * | d, | |
FXuval | len | |||
) | throw () [inline, inherited] |
Generates lots of random data (make sure it's 16 byte aligned!).
const bool FX::Maths::FRandomness::usingSIMD [static, inherited] |
Indicates if implemented using SIMD.