summaryrefslogtreecommitdiff
path: root/gr-blocks/lib/moving_average_impl.cc
Commit message (Collapse)AuthorAgeFilesLines
* Replace all calls to `get_initial_sptr` with `make_block_sptr`Thomas Habets2020-07-301-2/+2
| | | | | | | | | | | | | | 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/moving_average: use vector functionsThomas Habets2020-06-151-21/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This improves performance of moving average for me by about 4-5x. My test is [here](https://github.com/ThomasHabets/radiostuff/blob/master/amateur/listen_70cm.grc), which processes 10MHz to find the strongest signal. Without this PR I see `moving_average` in `top` taking about 89.4-94% CPU. With this patch it's ~20.4-23.7%. Since without this patch it's that high, I don't know that it's not even better. Test measured on a Libremv2 with Intel Core i7-6500U @ 2.5GHz. The memory access pattern is probably worse with this patch, but at least on my hardware on my workload this seems to be dwarfed by the gain of using volk. It can be hard to reason about memory access patterns, so benchmarks overrule theory. The test only actually uses float averaging. More benchmarking may be required. Possible improvements: * Add template specialization for `uint16` and `uint32`? * Refactor for non-volk fallback to use only one loop, with (presumably) better memory access pattern)
* Update license header to SPDX formatdevnulling2020-01-271-13/+1
|
* Tree: clang-format without the include sortingMarcus Müller2019-08-091-86/+87
|
* blocks: replace gengen with C++ templatesAndrej Rode2018-08-251-0/+151