summaryrefslogtreecommitdiff
path: root/gnuradio-runtime/include
Commit message (Collapse)AuthorAgeFilesLines
...
* gr-pdu: move pdu blocks to gr::pduJacob Gilbert2021-03-182-0/+47
| | | | | | | | | | | | | | | | | | | | | Moving the following from gr::blocks into gr-pdu: - pdu_filter block - pdu_remove block - pdu_set block - pdu_to_tagged_stream block - random_pdu block - tagged_stream_to_pdu block Moving the following from gr::blocks into gr-network: - socket_pdu block - stream_pdu_base (noblock) - tcp_connection (noblock) - tuntap_pdu block Moving the following from gr::blocks into gr: - pdu (noblock, general PDU functions) Signed-off-by: Jacob Gilbert <jacob.gilbert@protonmail.com>
* Replace boost::filesystem with std::filesystemZackery Spytz2021-03-132-7/+5
| | | | Signed-off-by: Zackery Spytz <zspytz@gmail.com>
* runtime: clean up realtime impl namespaceJosh Morman2021-03-083-76/+7
| | | | Signed-off-by: Josh Morman <jmorman@perspectalabs.com>
* runtime: replace use of std::unary_functionJosh Blum2021-01-271-6/+7
| | | | | | | | std::unary_function is deprecated of as c++11 and removed in c++17 https://en.cppreference.com/w/cpp/utility/functional/unary_function The solution was to replace unary_function with std::function. Signed-off-by: Josh Blum <josh@joshknows.com>
* clang-tidy: run full .clang-tidy on C++17 codebaseMarcus Müller2021-01-199-11/+11
| | | | | | | | | | | | | | | | | | | | 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-4/+5
| | | | | | | | | 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: added missing algorithm headerJosh Blum2021-01-111-0/+1
| | | | | | tag_checker.h uses std::sort Signed-off-by: Josh Blum <josh@joshknows.com>
* C++14: Use std::make_unique instead of boost::make_uniqueMarcus Müller2021-01-041-1/+0
| | | | | | Also, clean up includes Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
* RPC fixes to allow using Thrift-0.13A. Maitland Bottoms2020-12-192-11/+21
| | | | | | | Adds ability for master to build with newer Thrift versions by checking availability of thrift include files. (Also spelling fix: Thift -> Thrift) And fix up logging for rpcserver_thrift class.
* modernization: `override` instead of virtual in all compilation unitsMarcus Müller2020-11-0315-74/+80
|
* Fix typos throughout the codeluzpaz2020-10-292-2/+2
| | | | | | | * Fix various typos Found via `codespell v2.0.dev` `codespell -q 3 -L ans,fo,hist,inout,ist,ith,nd,sinc,uint -S ./volk`
* pybind11: Remove SWIG remnants.Ron Economos2020-10-121-2/+0
|
* runtime: gateway: Fix Doxygen warningMartin Braun2020-10-051-1/+1
| | | | Fixes an incorrectly named Doxygen parameter.
* Replace all calls to `get_initial_sptr` with `make_block_sptr`Thomas Habets2020-07-302-6/+5
| | | | | | | | | | | | | | First batch of changes: ``` find […] -print0 | xargs -0 sed -i -r '/get_initial_sptr/{:nxt N;/;/!b nxt;s/get_initial_sptr\(\s*new ([^(]+)(.*)\)\)/make_block_sptr<\1>\2)/}' ``` Then: * Back out `sptr_magic.h` edits * Change some `friend` clauses * clang-format the whole thing * Update checksums in the pybind11 bindings files
* blocks: move the `new` from the block `::make()` to coreThomas Habets2020-07-301-0/+15
| | | | | This includes the first edit of a block, so that it's easy to review. A following commit changes this globally.
* msg_handler: Switch from boost::function to std::functionJohannes Demel2020-06-041-2/+2
| | | | | | | This commit is a first stab at moving from `boost::function` to `std::function`. For now, it does only update gr-blocks. Also, this requires more testing. If others can confirm that this change works, I'll continue to update all modules.
* pybind: run clang-formatJosh Morman2020-06-042-20/+19
|
* runtime: replace py gateway with pybind11 support, remove fevalJosh Morman2020-06-044-516/+29
|
* runtime: make logger destructor publicJosh Morman2020-06-041-3/+2
|
* runtime: add enum name to work_return_typeJosh Morman2020-06-041-1/+1
|
* pmt: change modifiers for pmt_baseJosh Morman2020-06-041-1/+2
|
* pmt: stop treating all pairs like they are dictsJacob Gilbert2020-05-051-2/+14
| | | | 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
* runtime: attributes: Remove check for gcc 3Martin Braun2020-04-281-5/+0
| | | | | gcc 4 has been a requirement for many years now, so we can remove the check for gcc 3.
* runtime: move loggers from gr::block to gr::basic_blockMarcus Müller2020-04-132-6/+6
| | | | | | | No reason to assume only `general_work`-containing blocks would want to log. This enables us especially to log in `basic_block` itself.
* runtime: replace stderr logging by calls to GR's logging faciltiesMarcus Müller2020-04-134-22/+55
|
* boost: remove deprecated math/common_factor.hppjapm482020-04-112-0/+36
| | | | | Remove deprecation warning and prefer using std::{lcm,gcd} to Boost. Fixes #2712.
* runtime: Remove most manual memory managementThomas Habets2020-04-116-14/+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-2/+1
| | | | | This exposed some missing forwarding of RNG seed from one object to another, also fixed in this commit.
* runtime: Remove last boost::scoped_ptrThomas Habets2020-04-091-2/+2
|
* global: remove boost ptr headers not neededThomas Habets2020-04-091-1/+1
|
* runtime: add calls to python blocks to set affinity and get/set aliasJacob Gilbert2020-04-081-0/+12
|
* Switch from boost pointers to std C++11 pointersThomas Habets2020-04-0125-62/+61
| | | | | | | | | | | | | | | | | | | Most of this code is automated code changes: ``` set -e SUB="s/dummy/dummy/" for i in shared_ptr make_shared dynamic_pointer_cast weak_ptr enable_shared_from_this get_deleter; do SUB="$SUB;s/boost::$i/std::$i/g" done SUB="$SUB;s^#include <boost/shared_ptr.hpp>^#include <memory>^g" SUB="$SUB;s^namespace boost^namespace std^g" find . \( -name "*.cc" -o -name "*.h" -o -name "*.i" -o -name "*.cxx" -o -name "*.py" \) -print0 | xargs -0 sed -i "$SUB" ``` Only one manual change. In `./gr-fec/lib/fec_mtrx_impl.cc`, add `#include <algorithm>`.
* Replace BOOST_FOREACH with C++11 range forThomas Habets2020-03-271-3/+2
|
* runtime/math: unclutter GR_M_ math constant definesMarcus Müller2020-02-142-8/+4
| | | | | | * no speed advantage of GR_M_TWOPI: every compiler pre-computes constants, so that (2 * GR_M_PI) is just as fast * rest of constants not even used
* runtime/viterbi: get rid of GR_M_LOG2E constantMarcus Müller2020-02-141-1/+1
| | | | | | | | | Constant was only used to emulate log_2 from ln. Which is a strange thing to do on a computer with binary floating point numbers. Which is a superfluous thing to do when you have ::log2 in C++11.
* gr-digital: Improve Performance of Costas Loopghostop142020-02-143-30/+63
| | | | | | | | | | | | | 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.
* 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
* doxygen: Resolve broken references with Wiki links.Ron Economos2020-01-291-1/+2
|
* Update license header to SPDX formatdevnulling2020-01-2781-1047/+83
|
* pmt: remove dead typo codeJosh Morman2020-01-171-10/+0
| | | | | Class with misspelling comperator had been replaced with the proper spelling comparator and a note to remove in 3.8. Removing it here
* Fix all formatting issuesMartin Braun2020-01-102-68/+68
| | | | | This fixes every leftover file in the GNU Radio source tree to match our clang-format definition.
* runtime: fixup attributes for Clang, GNUC, and MSCMichael Dickens2020-01-081-7/+10
| | | | | | | | 1) put clang before GNUC, to keep their settings separate, because some clang defines GNUC. 2) change from clang to "clang but not MSC", because MSC attributes are covered in a later clause.
* logging: (msg) to avoid logged statement taken apart by operator precedenceMarcus Müller2020-01-061-22/+22
| | | | | | | | | | Oldie but a goldie: Macro containing logger << "something " << msg << "\n"; will happily break code in hard-to-understand ways, since `<<` has higher precedence than binary, comparison and logical operators.
* Add a top_block parameter to control exception handlingScott Torborg2020-01-052-11/+28
| | | | | | | | | This restores past behavior where the scheduler catches exceptions raised in block threads, allowing flowgraphs to continue running after the failure of an individual block. It also adds optional new behavior, selected by setting catch_exceptions=False to the top block, which causes exceptions to not be caught. In this mode of operation, a std::terminate handler can be installed to print a stack trace before the flowgraph exits.
* Remove catch statements from thread_body_wrapper.hPaul Wicks2020-01-051-9/+6
| | | | | | | | | | This commit removes the catch statements from thread_body_wrapper.h. The reason to do this is that, as-is, a single block in a flowgraph may throw an exception and stop functioning, but the only indication of this to the user is printing the exception's what() to stderr. With this patch, any uncaught exception will call std::terminate, which should still print the exception's what(), but will also terminate the process, rather than leaving a zombie flowgraph.
* Replace many `const` variables with `constexpr`Thomas Habets2020-01-044-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | constexpr is like const but (for variables) guarantees evaluation at compile time (as opposed to runtime). Likely this change will do nothing on its own (though it could, since it gives the compiler more information). But it still has benefits. It allows programmer to know that initialization is not expensive (it was done at compile time), and reduces risk of a refactoring regressing the compiletimeness. Runtime initialization can be nonobvious in larger codebases. E.g.: struct S { static int foo(); }; const int bar = S::foo(); // Called and initialized at *runtime*. int S::foo() { return 10; } With constexpr: struct S { static constexpr int foo(); }; constexpr int bar = S::foo(); // Error: used before definition. constexpr int S::foo() { return 10; } Initializing at runtime is not just startup costs, but also can save memory since it'll end up in a R/O section of a binary and therefore doesn't need to be swapped out, but can be shared (in the mmap() sense of the word).
* runtime: random facilities use C++11 (minus boost)Marcus Müller2020-01-021-6/+4
| | | | | | This also includes removing the new/delete for the local objects. C++ doesn't need you to manually new/delete objects with definite lifetime...
* Remove newlines from exception messagesThomas Habets2020-01-011-3/+3
|
* Document the statistical distribution that is used to simulate impulse noise.Michael Roe2019-11-201-1/+3
|
* add set_max_output_buffer to block gatewaySebastian Olsen2019-11-011-0/+12
|