summaryrefslogtreecommitdiff
path: root/gnuradio-runtime/lib/math
Commit message (Collapse)AuthorAgeFilesLines
* runtime: pep8 formattingJosh Morman2021-11-241-12/+16
| | | | Signed-off-by: Josh Morman <jmorman@gnuradio.org>
* runtime/math QA: remove orphaned debug printfsMarcus Müller2021-06-173-35/+0
| | | | Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
* global: automatic removal of <cstdio> where unusedMarcus Müller2021-06-171-1/+0
| | | | | | | | | | used command: sed -i '/^#include.*cstdio.*$/d' $(ag -L '\b(fscanf|sscanf|printf|sprintf|ftell|fgetpos|fseek|fsetpos|rewind|fopen|freopen|fclose|fflush|setbuf|setvbuf|fread|fwrite|fprintf|feof|ferror|perror|clearerror|rename|tmpfile|tmpnam)\b' $(ag -l 'include.*<cstdio>' gnuradio-runtime)) Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
* global: remove iostream from all files not use cout|cerr|cin|clogMarcus Müller2021-06-173-3/+0
| | | | Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
* 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>
* clang-tidy: run full .clang-tidy on C++17 codebaseMarcus Müller2021-01-194-7/+7
| | | | | | | | | | | | | | | | | | | | run /usr/share/clang/run-clang-tidy.py -checks=file '-header-filter=.*' -fix .. from build directory. Then, clang-format -i $(git diff --name-only origin/master) to clang-format changed files. Then, refresh all header hashes in pybind bindings (*/python/bindings/*.cc) Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
* runtime: simplify math fxpt sine/cosine calculationArtem Pisarenko2021-01-171-16/+4
| | | | | | | | | Algorithm improved in order to eliminate getting output values outside of range [-1.0, 1.0) Fixes #2993 Signed-off-by: Artem Pisarenko <artem.k.pisarenko@gmail.com>
* runtime: integrate generation of math sine_table.h into build processArtem Pisarenko2021-01-172-1026/+1
| | | | | | | File sine_table.h is generated artifact and shouldn't be part of sources in order to properly be in sync with changes to gen_sine_table.py Signed-off-by: Artem Pisarenko <artem.k.pisarenko@gmail.com>
* gnuradio-runtime: Fix qa_fast_atan2f test code.Ron Economos2020-11-141-3/+3
|
* python: Remove unnecessary 'from __future__ import'Oleksandr Kravchuk2020-08-031-1/+0
| | | | | | | | | | | | | | | | All of the removed `from __future__ import` were needed in older versions of Python (mostly 2.5.x and below) but later became mandatory in most versions of Python 3 hence are not necessary anymore. More specifically, according to __future__.py[1]: - unicode_literals is part of Python since versions 2.6.0 and 3.0.0; - print_function is part of Python since versions 2.6.0 and 3.0.0; - absolute_import is part of Python since versions 2.5.0 and 3.0.0; - division is part of Python since versions 2.2.0 and 3.0.0; Get rid of those unnecessary imports to slightly clean up the codebase. [1] https://github.com/python/cpython/blob/master/Lib/__future__.py
* runtime: Remove most manual memory managementThomas Habets2020-04-112-22/+18
| | | | | | The remaining ones: * `pmt_pool.cc`, which is a memory allocator so that makes sense * the tricky and aptly named `sptr_magic.cc`.
* 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
* gr-digital: Improve Performance of Costas Loopghostop142020-02-141-62/+0
| | | | | | | | | | | | | This update is focused on improving the throughput of the Costas loop, however some changes are more global performance enhancements as this PR has evolved. Updates include an ENABLE_NATIVE added to CMake, which is off by default but enables native compiling (including FMA support) if desired; sincos was inlined in sincos.h and sincos.cc was removed from the appropriate CMake to improve sincos speed, some constants were added to math.h, inlined functions in costas loop and nco.h, used switch instead of function pointer (much faster), and used fast complex multiply to get around all the range checking in the standard complex.h complex multiply function on all builds.
* Update license header to SPDX formatdevnulling2020-01-2712-156/+12
|
* 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...
* runtime: fix python math script generating wrong sine tableArtem Pisarenko2020-01-021-3/+2
| | | | Fixes commit 48d535e9d9d95524b2c8ed35b44c7eda541aea68
* clang-format: Ordering all the includesMarcus Müller2019-08-096-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-0912-1719/+1696
|
* cmake: Update to modern CMake usageAndrej Rode2019-03-041-29/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This includes using target based setting of includes and link libraries. This will transitively add the includes and linking flags to dependent targets. This is still a work in progress since only the dynamic libraries have been touched and not all of include_directories directives are gone yet. cmake: remove GR_INCLUDE_SUBDIRECTORY macro Previously this macro was used to inject subdirectories in the current CMake namespace. This is generally undesired and pollutes the current context. previously GNU Radio CMake had a non-default option ENABLE_STATIC_LIBS to build both, shared libraries and static libraries. This seems to be a construction taken over from autotools and serves no purpuose in CMake and complicates the library building. cmake: remove GR_LIBTOOL and la generation support This looks like it was primarily used to support projects using autotools, but comments state that the generated .la files aren't compatible with autotools anyway. cmake: Bump required CMake version to 3.8 UseSWIG cmake uses syntax which requires at least CMake 3.8 and is non-trivial to change
* qa_fxpt: add missing gnuradio/math.includeAndrej Rode2018-09-011-0/+1
|
* Merge remote-tracking branch 'origin/next' into merge_nextMarcus Müller2018-08-315-23/+29
|\
| * python: replace unfunctional old_div with functional codeAndrej Rode2018-08-171-1/+1
| | | | | | | | | | | | | | | | | | | | a previous change to py3k introduced synactically incorrect `old_div` function calls. A replacement with `//` and `/` where applicable is more appropriate. Eventually `from __future__ import division` needs to be added as well to have the "real" division also for integer values in python closes #1902
| * Merge branch 'next_python3' into nextMarcus Müller2018-06-251-2/+4
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This brings Python3 to `next`. It also brings * a bump in SWIG dependency version * various GRC improvements, * YAML instead of XML in GRC * a lot of broken unit tests
| | * Merge branch 'python3_fix' into nextAndrej Rode2018-06-241-2/+4
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Manual merge conflict resolution has been applied to following conflicts: * Typos: * gnuradio-runtime/python/gnuradio/ctrlport/GrDataPlotter.py * gr-blocks/python/blocks/qa_wavfile.py * gr-filter/examples/gr_filtdes_api.py * grc/blocks/parameter.xml * gr-uhd/python/uhd/__init__.py * ValueError -> RuntimeError: * gr-blocks/python/blocks/qa_hier_block2.py * relative Imports & other Py3k: * gr-digital/python/digital/psk_constellations.py * gr-digital/python/digital/qam_constellations.py * gr-digital/python/digital/test_soft_decisions.py * gr-digital/python/digital/gfsk.py * SequenceCompleter: * gr-utils/python/modtool/modtool_add.py * gr-utils/python/modtool/modtool_rename.py * gr-utils/python/modtool/modtool_rm.py * Updated API on next: * gr-blocks/grc/blocks_file_source.xml * gr-blocks/python/blocks/qa_file_source_sink.py * gr-qtgui/grc/qtgui_time_sink_x.xml * GRC Py3k Updates: * grc/core/Block.py * grc/core/Constants.py * grc/core/Platform.py * grc/core/utils/odict.py * grc/gui/Actions.py * grc/gui/Block.py * grc/gui/Executor.py * grc/gui/Port.py
| | | * Merge branch 'next' into python3Johnathan Corgan2017-06-222-8/+16
| | | |\ | | | | | | | | | | | | | | | | | | | | Conflicts: gr-uhd/apps/uhd_app.py
| | | * \ Merge branch 'next' into python3Johnathan Corgan2017-04-151-5/+5
| | | |\ \
| | | * \ \ Merge branch 'next' into python3Johnathan Corgan2017-03-201-5/+6
| | | |\ \ \
| | | * | | | python3: update non-GRC components to use python2 or python3Douglas Anderson2017-02-261-2/+4
| | | | | | |
| * | | | | | math: replace M_PI and derivatives with GR_M_PI definesAndrej Rode2018-02-174-21/+28
| | | | | | |
| * | | | | | fixup! fec: convert viterbi sub-library to valid C++ in correct namespaceAndrej Rode2018-02-171-1/+1
| |/ / / / /
* | | | | | runtime: Replace QA test framework w/ Boost UTFMartin Braun2018-06-2312-396/+85
| | | | | |
* | | | | | 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
* | | | | Merge branch 'maint'Martin Braun2018-02-032-6/+7
|\ \ \ \ \
| * | | | | Use type-generic or float versions of cmath functions where appropriate.Marcus Müller2018-02-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Complements gnuradio/gnuradio#1563, larger-scope version of the issue gnuradio/gnuradio#1561 .
| * | | | | Use logf where dealing with single precision floatsMarcus Müller2018-02-031-6/+6
| | |_|/ / | |/| | | | | | | | | | | | | Fixes gnuradio/gnuradio#1561
* | | | | Comment typo fixing.luz.paz2018-02-032-2/+2
| |_|_|/ |/| | | | | | | | | | | Luzpaz went ahead and found typos using `codespell -q 3`.
* | | | gr-runtime-test: changed test memory allocation from stack to help to avoid ↵gnieboer2017-06-132-8/+16
|/ / / | | | | | | | | | overflow segfault on win32
* | / runtime: fix qa_fast_atan2fAndrej Rode2017-04-101-5/+5
| |/ |/|
* | 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
|
* do not use deprecated gr_int* typesJiří Pinkava2015-03-291-3/+3
|