summaryrefslogtreecommitdiff
path: root/gnuradio-runtime/lib/pmt
Commit message (Collapse)AuthorAgeFilesLines
* logging core: replace log4cpp by spdlogMarcus Müller2021-11-191-1/+1
| | | | | | | | also: enable formerly disabled qa_logger tests This replaces log4cpp with spdlog. Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
* Revert "Replace boost::any with std::any"Josh Morman2021-11-063-22/+20
| | | | This reverts commit ccd28dfbb1504fdc29db267acd8aa3354fe10cd2.
* Replace boost::any with std::anyMarcus Müller2021-10-283-20/+22
| | | | | | | | This is a modernization possible through C++17 Fixes #4780 Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
* PMT: include cstring for memcpy, clean up memcpy dst consistentlyMarcus Müller2021-10-281-61/+64
| | | | Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
* pmt: Use VOLK allocator for PMT vectorsschneider2021-10-212-12/+15
| | | | | | | This provides deterministic and VOLK compatible alignment of PMT vectors. Signed-off-by: schneider <schneider@blinkenlichts.net>
* runtime: cleaning up unspecific/mistaken boost dependenciesMarcus Müller2021-06-221-3/+1
| | | | Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
* global: automatic removal of <cstdio> where unusedMarcus Müller2021-06-172-2/+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>
* pmt: remove unused <functional> includeMarcus Müller2021-06-171-1/+0
| | | | Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
* clang-tidy: run full .clang-tidy on C++17 codebaseMarcus Müller2021-01-192-3/+3
| | | | | | | | | | | | | | | | | | | | 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>
* pmt: use to_string for char string_refsmormj2020-12-191-2/+2
|
* modernization: `override` instead of virtual in all compilation unitsMarcus Müller2020-11-033-91/+91
|
* Make hash table a little larger to reduce expensive iteration. The memory ↵Jacob Gilbert2020-10-281-1/+1
| | | | impact is very small, on the order of 10's of kB.
* Replace custom undocumented string hashing algorithm with std::hash. The std ↵Jacob Gilbert2020-10-281-17/+2
| | | | implmentation is slightly faster and has been tested to have similar distribution with arbitrary input data
* runtime: remove snprintfClayton Smith2020-10-202-6/+13
|
* gnuradio-runtime, pmt: dont use CMAKE_INSTALL_PREFIX for target ↵Gwenhael Goavec-Merou2020-10-161-1/+1
| | | | INSTALL_INTERFACE
* pybind: run clang-formatJosh Morman2020-06-041-1/+1
|
* pmt: add missing implementation of pmt_from_complexJosh Morman2020-06-041-0/+5
|
* pmt: stop treating all pairs like they are dictsJacob Gilbert2020-05-054-16/+76
| | | | create a new derived class for pmt dicts so they can be distinguished without complicated try/catch logic, updated QA with a few additional checks. also added an is_pdu() method which returns true if the pmt is a pair of a dict-type PMT and a uniform-vector type, otherwise false
* pmt: serialization change from endian.h to boost::endian conversionJacob Gilbert2020-04-231-15/+15
| | | | this is more portable since endian.h is not available on all platforms, and may have some implementation inconsistencies
* qtgui: Remove boost::lexical_cast for parsingThomas Habets2020-04-111-2/+4
| | | | This is the last boost::lexical_cast in gnuradio.
* qtgui: Remove boost::lexical_cast for printingThomas Habets2020-04-111-7/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | boost::lexical_cast seems not not be consistent given different inputs. E.g. std::complex is stringified like iostream, but float and double avoid scientific notation… mostly. See below for comparisons between before and after (`printf` is what this commit switches to). I don't think the differences matter. ``` int main() { constexpr float low_float = 200000000.2; constexpr float high_float = 20000000000.2; constexpr float low_double = 200000000.2; constexpr float mid_double = 20000000000.2; constexpr float high_double = 200000000000000000.2; const std::complex<float> c(1.3,low_float); const std::complex<double> d(1.3,low_double); const std::complex<double> d2(1.3,high_double); const std::vector<float> fs = {low_float, high_float}; const std::vector<double> ds = {low_double, mid_double, high_double}; std::cout << "# complex\n"; std::cout << "iostream: " << c << std::endl; std::cout << "lexical_cast: " << boost::lexical_cast<std::string>(c) << std::endl; std::cout << std::endl; for (int i = 0; i < fs.size(); i++) { std::cout << "# float " << i << std::endl; std::cout << "iostream: " << fs[i] << std::endl; std::cout << "to_string: " << std::to_string(fs[i]) << std::endl; printf("printf %.f\n", std::numeric_limits<float>::digits10, fs[i]); std::cout << "lexical: " << boost::lexical_cast<std::string, float>(fs[i]) << std::endl; std::cout << std::endl; } for (int i = 0; i < ds.size(); i++) { std::cout << "# double " << i << std::endl; std::cout << "iostream: " << ds[i] << std::endl; std::cout << "to_string: " << std::to_string(ds[i]) << std::endl; printf("printf %.*g\n", std::numeric_limits<double>::digits10, ds[i]); std::cout << "lexical: " << boost::lexical_cast<std::string, double>(ds[i]) << std::endl; std::cout << std::endl; } } ``` Output (Debian amd64): ``` iostream: (1.3,2e+08) lexical_cast: (1.3,2e+08) iostream: 2e+08 to_string: 200000000.000000 printf 200000000 lexical: 200000000 iostream: 2e+10 to_string: 20000000000.000000 printf 20000000000 lexical: 2e+10 iostream: 2e+08 to_string: 200000000.000000 printf 200000000 lexical: 200000000 iostream: 2e+10 to_string: 20000000000.000000 printf 20000000000 lexical: 20000000000 iostream: 2e+17 to_string: 199999996861349888.000000 printf 1.9999999686135e+17 lexical: 1.9999999686134989e+17 ```
* pmt: speed up serializationJacob Gilbert2020-04-111-199/+178
|
* pmt: Fix RuntimeError in pmt_to_pythonMichael Byers2020-02-091-1/+1
| | | | | | | Python has a RuntimeError that's thrown during the pmt to_python function. Instead of throwing this error, SWIG has been updated to throw a TypeError. This allows us to keep the same behavior whereby we iterate over PMT types until the proper conversion is found
* Update license header to SPDX formatdevnulling2020-01-2711-140/+11
|
* clang-format: Ordering all the includesMarcus Müller2019-08-099-18/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-099-3901/+3348
|
* pmt: needs to link with Boost::threadMichael Dickens2019-04-211-0/+1
|
* pmt: remove intrusive_ptrAndrej Rode2019-04-192-140/+2
|
* cmake: Update to modern CMake usageAndrej Rode2019-03-041-32/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* pmt: Change explicit numbers to int32 min/max numeric limits in PMT ↵Scott Torborg2019-01-261-1/+2
| | | | serialization
* pmt: Add support for serializing/deserializing signed int64sScott Torborg2019-01-261-8/+15
|
* C++11: Convert boost::lexical_cast to std::to_stringMarcus Müller2018-12-191-6/+6
| | | | | This is a minor change towards slowly replacing Boost with newer std:: functionality.
* pmt: Replace QA test framework w/ Boost UTFMartin Braun2018-08-313-99/+400
|
* Merge remote-tracking branch 'origin/next' into merge_nextMarcus Müller2018-08-3111-558/+2250
|\
| * pmt: replace file generation with pre-generated filesAndrej Rode2018-08-2612-597/+2664
| |
| * Fixed out-of-bound vector acces in PMTMarcus Müller2018-08-181-7/+10
| | | | | | | | | | | | | | adresses cases where initialization of uvec happened with empty `std::vector`, as well as when getting the address of the first element of an empty uvec, lead to undefined behaviour through doing `vec[0]` for empty `vec`.
| * python3: update non-GRC components to use python2 or python3Douglas Anderson2017-02-263-3/+7
| |
| * pmt: Removing support for boost < 1.53 in ~pmt_tDarek Kawamoto2016-12-072-28/+1
| |
| * Merge branch 'master' into nextJohnathan Corgan2016-12-062-4/+5
| |\
| * \ Merge branch 'master' into nextJohnathan Corgan2016-12-012-2/+38
| |\ \
| * \ \ Merge branch 'master' into nextJohnathan Corgan2016-10-281-1/+11
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: gr-digital/swig/CMakeLists.txt gr-digital/swig/digital_swig.i gr-trellis/swig/CMakeLists.txt
| * | | | cmake: nuke cpack from existenceJohnathan Corgan2016-08-031-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CPack is not used, unmaintaned, and broken. This does not eliminate any MSVC build functionality.
* | | | | Fixed out-of-bound vector acces in PMT (pre-C++11 version)Marcus Müller2018-08-231-7/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | adresses cases where initialization of uvec happened with empty `std::vector`, as well as when getting the address of the first element of an empty uvec, lead to undefined behaviour through doing `vec[0]` for empty `vec`. This commit, unlike the similar commit of the same message, uses `NULL` in case of `nullptr` (maint-3.7 doesn't require C++11).
* | | | | pmt: Replace QA test framework w/ Boost UTFMartin Braun2018-06-239-503/+235
| | | | |
* | | | | pmt: extract lengths before memcmp #1598Andrej Rode2018-03-301-3/+3
| | | | |
* | | | | pmt: fix for error in pmt::equal() when comparing uniform vectorsJacob Gilbert2018-03-301-1/+1
| |_|_|/ |/| | |
* | | | pmt: Fixing #if boost version checks in pmt_t.Darek Kawamoto2016-12-052-4/+5
| |_|/ |/| |
* | | pmt: Adding memory fence to ~pmt_t for proper multi-core ARM execution.Darek Kawamoto2016-12-012-2/+38
| |/ |/| | | | | | | | | | | | | | | | | Occasionally, flowgraphs running on my E3xx processor would segfault in the pmt_t destructor (an odd place to crash). When this segfault happens, it's common (but not guaranteed) for the top of the coredump backtrace to be at 0x0000001c or 0x00000018. Always near or at the top was always a pmt destructor, such as ~pmt_pair() or ~pmt_tuple(). After reading up in Boost Reference Counter Example Implementation, it seems as though we need to add a memory fence to ensure proper memory ordering (this issue did not happen on Intel processors due to the stronger memory model there). This commit changes the pmt_t's internal implementation (pmt_int.h and pmt.cc) of intrusive_ptr_add_ref and intrusive_ptr_release to be exactly like boost's recommended example, and seems to prevent this kind of segfault. Additionally, since Ubuntu 12.04 comes with boost 1.48, which does not have boost/atomic.hpp, the changes are wrapped in #if conditions until support for this configuration is discontinued.
* | pmt.cc: Adding mutex for thread-safety to handle simultaneous pmt_symbol ↵Darek Kawamoto2016-10-281-1/+11
|/ | | | insertions.
* gnuradio-runtime: Fix pmt serialization for doublejohschmitz2016-05-011-1/+1
| | | | double was wrongly casted to float