Commit graph

5 commits

Author SHA1 Message Date
Martin Braun
107a49c0c2 host: Update code base using clang-tidy
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
2021-03-04 08:07:26 -06:00
Aaron Rossetto
a5fe0b071d rfnoc: Support instance overrides in set_properties()
This commit adds an enhancement to node_t::set_properties() in which
the instance argument provided to the function (which normally applies
to all properties in the key/value list) can be overridden on a
per-property basis using a special syntax.

If the key consists of the property name followed by a colon (':') and
then a number, the number following the colon is used to determine which
instance of the property this set pertains to, and the value passed via
the instance parameter is ignored for that property. For example, in the
following call:

    node->set_properties("dog=10,cat:2=5,bird:0=0.5", 1)

instance 1 of node's 'dog' property is set to 10, the 1 coming from the
instance parameter, instance 2 of the node's 'cat' property is set to 5
due to the override syntax provided in the string, and instance 0 of the
node's 'bird' property is set to 0.5 due to its override.

If the name/instance pair is malformed, e.g. 'value:=10' or
'value:foobar=10', a runtime error is thrown.
2020-07-24 13:15:30 -05:00
Martin Braun
876d4150aa uhd: Apply clang-format against all .cpp and .hpp files in host/
Note: template_lvbitx.{cpp,hpp} need to be excluded from the list of
files that clang-format gets applied against.
2020-03-03 08:51:32 -06:00
Martin Braun
c97bdc6c94 rfnoc: Add property propagation, Boost.Graph storage
- Adds a detail::graph_t class, which handles the propagation
- Adds methods to node_t to aid with propagation
- Adds unit tests
- Adds dynamic property forwarding:
  Nodes are now able to forward properties they don't know about by
  providing a forwarding policy. A good example is the FIFO block which
  simply forwards most properties verbatim.

- node: Temporarily disabling consistency check at init
2019-11-26 11:49:14 -08:00
Martin Braun
efb1d5a472 rfnoc: Add properties, nodes, and accessors
Adds the following classes:
- uhd::rfnoc::node_t, the base class for RFNoC nodes
- uhd::rfnoc::node_accessor_t, a class to access private properties
- uhd::rfnoc::res_source_info, a struct that identifies where properties
  come from
- uhd::rfnoc::property_t, and property_base_t (its parent)
- uhd::rfnoc::prop_accessor_t, a class to access properties

Add always dirty property (dirtifier).

Also adds unit tests for properties.
2019-11-26 11:49:13 -08:00