summaryrefslogtreecommitdiff
path: root/gnuradio-runtime/lib
Commit message (Collapse)AuthorAgeFilesLines
* cmake: build python deps conditionallyJosh Morman2022-01-061-6/+17
| | | | Signed-off-by: Josh Morman <jmorman@gnuradio.org>
* runtime: configurable blkd_input timerJosh Morman2021-12-102-1/+9
| | | | Signed-off-by: Josh Morman <jmorman@gnuradio.org>
* runtime: pep8 formattingJosh Morman2021-11-241-12/+16
| | | | Signed-off-by: Josh Morman <jmorman@gnuradio.org>
* runtime: minor API cleanupMarcus Müller2021-11-194-4/+7
| | | | Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
* logging core: replace log4cpp by spdlogMarcus Müller2021-11-197-391/+113
| | | | | | | | also: enable formerly disabled qa_logger tests This replaces log4cpp with spdlog. Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
* gnuradio-runtime: Remove unused test_types.h file.Ron Economos2021-11-171-39/+0
| | | | Signed-off-by: Ron Economos <w6rz@comcast.net>
* runtime: remove unused test.cc/hJosh Morman2021-11-113-401/+0
| | | | Signed-off-by: Josh Morman <jmorman@gnuradio.org>
* Revert "Replace boost::any with std::any"Josh Morman2021-11-064-24/+21
| | | | This reverts commit ccd28dfbb1504fdc29db267acd8aa3354fe10cd2.
* Replace boost::any with std::anyMarcus Müller2021-10-284-21/+24
| | | | | | | | 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>
* runtime: pybind version in gnuradio-config-infoJosh Morman2021-10-261-0/+3
| | | | Signed-off-by: Josh Morman <jmorman@gnuradio.org>
* runtime: add logic to call the input_blocked_callback() if a sink blockDavid Sorber2021-10-251-0/+26
| | | | | | determines that it is input blocked Signed-off-by: David Sorber <david.sorber@blacklynx.tech>
* runtime: replace the DEFINE_CUSTOM_BUFFER_TYPE() macro function withDavid Sorber2021-10-254-20/+35
| | | | | | | some advanced template magic; also a few minor type corrections for consistency Signed-off-by: David Sorber <david.sorber@blacklynx.tech>
* runtime: rename buffer_context to transfer type; also rename theDavid Sorber2021-10-257-87/+89
| | | | | | | | MAKE_CUSTOM_BUFFER_TYPE macro function to DEFINE_CUSTOM_BUFFER_TYPE; mark unused parameters from virtual functions with the [[maybe_unused]] C++ attribute Signed-off-by: David Sorber <david.sorber@blacklynx.tech>
* runtime: use std::function for callback logicDavid Sorber2021-10-251-3/+3
| | | | Signed-off-by: David Sorber <david.sorber@blacklynx.tech>
* runtime: Custom Buffer/Accelerator Device Support - Milestone 2David Sorber2021-10-2516-335/+1089
| | | | | | | | | | | | | | | | | Completion of custom buffer/accelerator device support changes: * Improved custom buffer interface by removing awkward memory allocation functions from the block class * Increased flexibility for creating custom buffers by allowing creation of buffer_single_mapped subclasses * Fully incorporated data movement abstraction into the custom buffer interface and the runtime itself; accelerated blocks are no longer directly responsible for their own data movement * Zero copy back-to-back accelerated blocks are now supported (data no longer needs to be moved back to the host between each block) Signed-off-by: David Sorber <david.sorber@blacklynx.tech> Signed-off-by: Mike Mason <mike.mason@blacklynx.tech>
* runtime: Custom Buffer/Accelerator Device Support - Milestone 1David Sorber2021-10-2514-313/+1336
| | | | | | | | | | | | | | | Custom Buffer/Accelerator Device Support - Milestone 1 changes: * Refactored existing single mapped buffer code and created single mapped buffer abstraction; wrapping within single mapped buffers is handled explicitly by input blocked and output blocked callbacks that are called from block_executor * Added simple custom buffer allocation interface (NOTE: this interface will change for milestone 2) * Accelerated blocks are still responsible for data transfer but the custom buffer interface eliminates the double copy problem Signed-off-by: David Sorber <david.sorber@blacklynx.tech>
* global: Replace stdio logging with loggerDavid Winter2021-10-217-165/+151
| | | | | | | This commit replaces many uses of std::c{out,err} and printf with the appropriate GR_LOG_* directives. Signed-off-by: David Winter <david.winter@analog.com>
* 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: unused remove misc.h/ccJosh Morman2021-10-143-83/+0
| | | | | | | | | misc.h in the public header is not implemented misc.h in the lib/ dir is implemented but not used Appears that all the misc can go without affecting API Signed-off-by: Josh Morman <jmorman@peratonlabs.com>
* pdu: add samp_rate keyJacob Gilbert2021-09-221-0/+5
| | | | | | | This was omitted accidentally, but is necessary in general for correct processing of PDU data Signed-off-by: Jacob Gilbert <jacob.gilbert@protonmail.com>
* runtime: include boost/format where usedMarcus Müller2021-09-079-0/+9
| | | | Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
* runtime: add common-precompiled-headers pseudotarget to link againstMarcus Müller2021-07-191-0/+0
| | | | | Idea: have a component that doesn't actually contribute any code of its own, but defines precompiled headers to be transitively included in gr-\* Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
* runtime: add precompile headers for internal useMarcus Müller2021-07-191-0/+8
| | | | | | | Can't sensibly use the common precompiled headers (from a future commit), as flags won't be the same. Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
* pdu: adding tags_to_pdu blockJacob Gilbert2021-07-191-0/+20
| | | | Signed-off-by: Jacob Gilbert <jacob.gilbert@protonmail.com>
* pdu: adding pdu_to_stream blockJacob Gilbert2021-07-191-0/+16
| | | | Signed-off-by: Jacob Gilbert <jacob.gilbert@protonmail.com>
* pdu: Adding new blocksJacob Gilbert2021-07-191-0/+9
| | | | | | Added take_skip_to_pdu block and pdu lambda blocks, needs examples still Signed-off-by: Jacob Gilbert <jacob.gilbert@protonmail.com>
* runtime: constants: modernized #include, structureMarcus Müller2021-07-021-13/+14
| | | | Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
* gr: logger: Add logger_get_configured_logger()David Winter2021-07-021-0/+25
| | | | | | | | A helper method is added to gr/lib/logger.cc to facilitate the allocation of loggers which are automatically configured according to the local GNURadio configuration. Signed-off-by: David Winter <david.winter@analog.com>
* cmake: Remove absolute paths and private links from exported targets.Ryan Volz2021-06-251-6/+2
| | | | | | | | | | | | | | | | | | | | This transitions to using Python::NumPy, pybind11::pybind11, and libunwind::libunwind targets for building with the include directories/libraries of NumPy, pybind11, and libunwind. The Python::NumPy target matches what is available with the FindPython module in CMake 3.14+ (and can be transitioned to such when the minimum CMake version is past that). These changes have the effect of cleaning up the include_directory paths added to the gnuradio-runtime target so that no absolute paths are used, which is helpful for relocatable installations (e.g. conda). Part of this change involves moving some link targets to PRIVATE since they are not actually part of the public interface. In the case of the python bindings, these are not exported and have no public interface for consumption by other C++ libraries, so the switch from PUBLIC to PRIVATE has no practical effect but could still help avoid future confusion. Signed-off-by: Ryan Volz <ryan.volz@gmail.com>
* runtime: cleaning up unspecific/mistaken boost dependenciesMarcus Müller2021-06-223-5/+3
| | | | Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
* global: automatically remove unused boost includesMarcus Müller2021-06-221-1/+0
| | | | | | | | used command: sed -i '/^#include.*boost.*$/d' $(ag -L '(boost::|BOOST)' $(ag --cpp -l '#include <boost')) Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
* runtime/realtime_impl: remove commented out, low-entropy debug printfsMarcus Müller2021-06-171-8/+2
| | | | Signed-off-by: Marcus Müller <mmueller@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-1711-11/+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>
* logger: move non-interface includes to buffer.ccMarcus Müller2021-06-171-0/+10
| | | | Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
* logging: remove <iostream> from logger.h, add where consequently missingMarcus Müller2021-06-173-2/+9
| | | | Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
* global: remove iostream from all files not use cout|cerr|cin|clogMarcus Müller2021-06-1716-16/+0
| | | | Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
* runtime: dereference symlink in gr::prefix()beroset2021-06-161-3/+3
| | | | | | | | | | | * Fix gnuradio/gnuradio#4639 by dereferencing symlink in gr::prefix(). Signed-off-by: Ed Beroset <beroset@ieee.org> * Fix gnuradio/gnuradio#4639 with update per suggestion by ryanvolz. Using std::filesystem::canonical resolves symlinks and normalizes path. Signed-off-by: Ed Beroset <beroset@ieee.org>
* runtime: ctrlport: cmake: Fix thrift dependency for OOTs.Ryan Volz2021-06-011-17/+3
| | | | | | | | | | | | | | | | | | | First, this moves find_package(THRIFT) up to the gnuradio-runtime CMakeLists.txt so that cache variables no longer have to be used to mark the found components. This fixes an issue where the thrift-specific headers were not installed even when thrift was enabled, because on first run the detection was occurring AFTER the runtime include CMakeLists.txt was evaluated. See further discussion in #2734, which solved one issue related to this setup. Further, even with thrift enabled, the thrift headers are not required for OOTs to build against gnuradio-runtime. OOTs would need to take special action to use those headers, in which case they should detect/enable thrift on their own. Thus, this makes the change to not add thrift as an extra dependency for OOTs and switches linking of Thrift::thrift from PUBLIC to PRIVATE. Signed-off-by: Ryan Volz <ryan.volz@gmail.com>
* runtime: Explicitly convert path to string to fix MSVC build.Ryan Volz2021-06-011-1/+1
| | | | Signed-off-by: Ryan Volz <ryan.volz@gmail.com>
* runtime: Save prefs safely by atomic renameThomas Habets2021-05-021-7/+24
| | | | Signed-off-by: Thomas Habets <thomas@habets.se>
* runtime: Access d_config_map cleanerThomas Habets2021-05-021-19/+8
| | | | Signed-off-by: Thomas Habets <thomas@habets.se>
* runtime: Use mutex for prefsThomas Habets2021-05-021-3/+9
| | | | Signed-off-by: Thomas Habets <thomas@habets.se>
* runtime: Simplify prefsThomas Habets2021-05-021-151/+125
| | | | Signed-off-by: Thomas Habets <thomas@habets.se>
* cmake: Move swath of add_definitions to gnuradio-runtime target.Ryan Volz2021-04-171-40/+71
| | | | | | | | | | Besides being a more modern CMake style, this has the benefit of propagating the public definitions to any consumers of the gnuradio-runtime library, which includes OOT modules. For example, OOT modules would previously have to know to define "NOMINMAX" on MSVC, but now that happens transitively. Signed-off-by: Ryan Volz <ryan.volz@gmail.com>
* runtime, blocks, network: Clean up use of Win headers, fix stream_pdu.Ryan Volz2021-04-171-7/+3
| | | | | | | stream_pdu_base was failing to compile on Windows after moving to gr-network since HAVE_IO_H was not checked for or defined. Signed-off-by: Ryan Volz <ryan.volz@gmail.com>
* 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: don't do two lookups to verify existence and get msg handlerMarcus Müller2021-04-051-3/+3
| | | | Signed-off-by: Marcus Müller <mmueller@gnuradio.org>