summaryrefslogtreecommitdiff
path: root/gnuradio-runtime/lib/math/random.cc
Commit message (Collapse)AuthorAgeFilesLines
* runtime: fix gr::random API to be fixed-width 64 bit, use XOROSHIRO128+Marcus Müller2021-04-061-7/+6
| | | | | | | | | | | | | | | Seeding being inconsistent between gr::random and things like fastnoise source is an outstanding issue (#1559). Fix that by fixing the API, and pivoting to our built-in XOROSHIRO128+, which is also substantially faster than MT19937. For that purpose, introduce, and python-bind, a wrapper class that can be used with STL distribution shapers. Add a unit test for the (P)RNG. Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
* runtime: Use nanosecond resolution for default random seedThomas Habets2020-04-101-1/+4
| | | | | This exposed some missing forwarding of RNG seed from one object to another, also fixed in this commit.
* runtime: Make random seed default to current time, as documentedThomas Habets2020-04-101-1/+1
| | | | | | | | | | | This is what gnuradio currently documents seeding will do, but it's not what C++ defaults to. See C++11 26.5.3.2, paragraph 3. Default for mersenne twister is constexpr 5489. Or easier, the bottom of https://en.cppreference.com/w/cpp/numeric/random/mersenne_twister_engine
* Update license header to SPDX formatdevnulling2020-01-271-13/+1
|
* runtime: random facilities use C++11 (minus boost)Marcus Müller2020-01-021-33/+7
| | | | | | This also includes removing the new/delete for the local objects. C++ doesn't need you to manually new/delete objects with definite lifetime...
* clang-format: Ordering all the includesMarcus Müller2019-08-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | clang-format: ordering includes in gnuradio-runtime clang-format: ordering includes in gr-filter clang-format: ordering includes in gr-fft clang-format: ordering includes in gr-audio clang-format: ordering includes in gr-analog clang-format: ordering includes in gr-fec clang-format: ordering includes in gr-wavelet clang-format: ordering includes in gr-zeromq clang-format: ordering includes in gr-vocoder clang-format: ordering includes in gr-video-sdl clang-format: ordering includes in gr-trellis clang-format: ordering includes in gr-blocks clang-format: ordering includes in gr-digital clang-format: ordering includes in gr-uhd clang-format: ordering includes in gr-dtv clang-format: ordering includes in gr-channels clang-format: ordering includes in gr-qtgui clang_format.py: re-enable include reordering
* Tree: clang-format without the include sortingMarcus Müller2019-08-091-108/+98
|
* Merge remote-tracking branch 'origin/next' into merge_nextMarcus Müller2018-08-311-3/+5
|\
| * math: replace M_PI and derivatives with GR_M_PI definesAndrej Rode2018-02-171-2/+4
| |
| * fixup! fec: convert viterbi sub-library to valid C++ in correct namespaceAndrej Rode2018-02-171-1/+1
| |
* | analog: improve readability of laplacian distributionAndrej Rode2018-03-301-4/+5
| |
* | analog: remove std::time(0) seed from gr::random if 0 is selectedAndrej Rode2018-03-301-3/+6
|/ | | | | Instead the default seed implemented in boost::random is used by calling seed() without arguments
* Use logf where dealing with single precision floatsMarcus Müller2018-02-031-6/+6
| | | | Fixes gnuradio/gnuradio#1561
* fixed gr::random::random::set_integer_limitsJohannes Demel2017-03-131-2/+3
|
* replaced boost::random::uniform_int_distribution with boost::uniform_int to ↵Johannes Demel2017-03-101-4/+4
| | | | resolve issue 1227
* MSVC-specific changes for compatibilitygnieboer2016-05-301-1/+1
| | | | | | | | | | | | | | | | | | | | | * Changed gr-dtv cmake so SSE2 would be detected on both MSVC and GCC compilers * Removed addition of /O2 flag on MSVC builds as it conflicts with /RTC1 flag * Added detection of MSVC 14.0 and added additional filenames to library detection to cover what windows builds the dependencies as. * Additional name options were placed at end so as to not conflict with other builds. * Removed use of not() function and replaced with standard C syntax. The check for zero is to handle the edge case where the random numbers return zero and would cause a div/zero error two lines afterwards. * Add dwrite library for win32 builds for qtgui
* random-analog: fixed reseed issueJohannes Demel2015-09-281-7/+15
|
* random-analog: added new uniform integer distribution sourceJohannes Demel2015-09-281-1/+20
|
* add current year to licence headerStefan2015-09-041-1/+1
|
* remove fixed fixmeStefan2015-09-021-1/+1
|
* add boost.random as random number generatorStefan2015-09-011-66/+40
|
* fix wrong laplacian random numbers and add testcaseStefan2015-09-011-20/+3
|
* runtime: converting runtime core to gr namespace, gnuradio include dir.Tom Rondeau2013-04-291-0/+188