aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/experts
Commit message (Collapse)AuthorAgeFilesLines
* uhd: Replace Boost mutexes and locks with standard optionsMartin Braun2021-10-191-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a very mechanical task that could almost have been done with sed. Boost versions of mutexes and locks were removed, and replaced with std:: versions. The replacement tables are as follows: == Mutexes == - boost::mutex -> std::mutex - boost::recursive_mutex -> std::recursive_mutex Mutexes behave identically between Boost and std:: and have the same API. == Locks == C++11 has only two types of lock that we use/need in UHD: - std::lock_guard: Identical to boost::lock_guard - std::unique_lock: Identical to boost::unique_lock Boost also has boost::mutex::scoped_lock, which is a typedef for boost::unique_lock<>. However, we often have used scoped_lock where we meant to use lock_guard<>. The name is a bit misleading, "scoped lock" sounding a bit like an RAII mechanism. Therefore, some previous boost::mutex::scoped_lock are now std::lock_guard<>. std::unique_lock is required when doing more than RAII locking (i.e., unlocking, relocking, usage with condition variables, etc.). == Condition Variables == Condition variables were out of the scope of this lock/mutex change, but in UHD, we inconsistently use boost::condition vs. boost::condition_variable. The former is a templated version of the latter, and thus works fine with std::mutex'es. Therefore, some boost::condition_variable where changed to boost::condition. All locks and mutexes use `#include <mutex>`. The corresponding Boost includes were removed. In some cases, this exposed issues with implicit Boost includes elsewhere. The missing explicit includes were added.
* host: Update code base using clang-tidyMartin Braun2021-03-041-14/+14
| | | | | | | | | The checks from the new clang-tidy file are applied to the source tree using: $ find . -name "*.cpp" | sort -u | xargs \ --max-procs 8 --max-args 1 clang-tidy --format-style=file \ --fix -p /path/to/compile_commands.json
* uhd: Apply clang-format against all .cpp and .hpp files in host/Martin Braun2020-03-032-141/+184
| | | | | Note: template_lvbitx.{cpp,hpp} need to be excluded from the list of files that clang-format gets applied against.
* uhd: Replace all occurrences of boost::bind with std::bindMartin Braun2019-11-261-4/+4
| | | | | | | | | | | | | | | | | | | | | Note: Replacing everything with a lambda would be even better, but that can't be easily scripted so we'll do this as a first step to reduce the Boost footprint. This also removes occurences of #include <boost/bind.hpp>, and makes sure all usages of std::bind have an #include <functional>. clang-format wasn't always applied to minimize the changeset in this commit, however, it was applied to the blocks of #includes. Due to conflicts with other Boost libraries, the placeholders _1, _2, etc. could not be directly used, but had to be explicitly called out (as std::placeholders::_1, etc.). This makes the use of std::bind even uglier, which serves as another reminder that using std::bind (and even more so, boost::bind) should be avoided. nirio/rpc/rpc_client.cpp still contains a reference to boost::bind. It was not possible to remove it by simply doing a search and replace, so it will be removed in a separate commit.
* uhd: Replace boost::function with std::functionMartin Braun2019-11-261-1/+1
| | | | | | | This is mostly a search-and-replace operation, with few exceptions: - boost::function has a clear() method. In C++11, this is achieved by assigning nullptr to the std::function object. - The empty() method is replaced by std::function's bool() operator
* uhd: Replace usage of boost smart pointers with C++11 counterpartsMartin Braun2019-11-261-9/+8
| | | | | | | | | | | | | | | | | | | This removes the following Boost constructs: - boost::shared_ptr, boost::weak_ptr - boost::enable_shared_from_this - boost::static_pointer_cast, boost::dynamic_pointer_cast The appropriate includes were also removed. All C++11 versions of these require #include <memory>. Note that the stdlib and Boost versions have the exact same syntax, they only differ in the namespace (boost vs. std). The modifications were all done using sed, with the exception of boost::scoped_ptr, which was replaced by std::unique_ptr. References to boost::smart_ptr were also removed. boost::intrusive_ptr is not removed in this commit, since it does not have a 1:1 mapping to a C++11 construct.
* uhd: mpm: update all license header w/ "-or-later"Brent Stapleton2019-03-081-1/+1
| | | | Updating all SPDX license identifiers to include "-or-later"
* cmake: Update coding style to use lowercase commandsMartin Braun2018-11-141-6/+6
| | | | | | | | | | | | | | | | | Also updates our coding style file. Ancient CMake versions required upper-case commands. Later command names became case-insensitive. Now the preferred style is lower-case. Run the following shell code (with GNU compliant sed): cmake --help-command-list | grep -v "cmake version" | while read c; do echo 's/\b'"$(echo $c | tr '[:lower:]' '[:upper:]')"'\(\s*\)(/'"$c"'\1(/g' done > convert.sed \ && git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' \ '*CMakeLists.txt' | xargs -0 gsed -i -f convert.sed && rm convert.sed (Make sure the backslashes don't get mangled!)
* uhd: Move internal headers to uhdlib/Martin Braun2018-03-146-995/+2
| | | | | | | | | | | | | | | | To avoid the proliferation of additional include directories and multiple ways of including project-local headers, we now default to moving all headers that are used across UHD into the uhdlib/ subdirectory. Some #include statements were also reordered as they were modified for closer compliance with the coding guidelines. Internal cpp source files should now include files like this: #include <uhdlib/rfnoc/ctrl_iface.hpp> Reviewed-by: Ashish Chaudhari <ashish.chaudhari@ettus.com>
* uhd: Update license headersMartin Braun2018-02-196-5/+11
| | | | | | | All copyright is now attributed to "Ettus Research, a National Instruments company". SPDX headers were also updated to latest version 3.0.
* Move all license headers to SPDX format.Martin Braun2017-12-226-72/+6
|
* utils: introduce new logging API and remove msg APIAndrej Rode2017-02-201-2/+2
|
* uhd: replace BOOST_FOREACH with C++11 range-based for loopAndrej Rode2017-02-102-14/+12
| | | | | Note: This is the first commit that uses for-range, and range-based for-loops are now usable for UHD development.
* TwinRX: Clarify Expert log messages on resolvesDerek Kozel2017-01-301-2/+2
|
* experts: remove delete after throwAndrej Rode2017-01-121-4/+2
|
* Remove all boost:: namespace prefix for uint32_t, int32_t etc. (fixed-width ↵Martin Braun2016-11-082-5/+6
| | | | | | | | types) - Also removes all references to boost/cstdint.hpp and replaces it with stdint.h (The 'correct' replacement would be <cstdint>, but not all of our compilers support that).
* Experts: Always resolve all nodes in the graphDerek Kozel2016-10-261-4/+9
|
* Experts: Fix typoDerek Kozel2016-10-251-1/+1
|
* Experts: Add a printer for time_spec_tDerek Kozel2016-10-251-0/+7
|
* experts: Print values of data nodes when debuggingAshish Chaudhari2016-03-212-2/+32
|
* experts: Added additional assignment operator to data writerAshish Chaudhari2016-03-211-1/+6
|
* experts: Multiple minor fixes/enhancementsAshish Chaudhari2016-02-263-10/+31
| | | | | | | | - Fixed segfault issue for graph modification errors - Demangled node type names and added quotes to "dot" labels to allow fully qualified C++ names - add_prop_node functions initialize the property objects in the tree in addition to data nodes - Passed in resolve mutex to desired data node correctly - Added == and != operators to data accessors
* uhd: Added expert dependency tracking infrastructureAshish Chaudhari2016-02-126-0/+1550
- Code location uhd/lib/experts - expert_nodes.hpp contains all node definitions: data and worker - expert_container.hpp contains the memory manager and resolver for expert nodes - expert_factory contains the initializer and modifier for expert_container