Hi Marcus,
I've implemented two very simple "vector median" codes,
one in python and the other in c++.
These take run-time defined vectors and in series and decimate, returning the median
of the 4 or more vectors. The vector length is an argument.
see python/ra_vmedian.py in
git clone http://www.github.com/WVURAIL/gr-radio_astronomy
and/or
lib/vmedian_impl.cc lib/vmedian_impl.h
for the c++ version. C++ is much more efficient. On a raspberry pi 4, replacing the 5 vector medians (in sequence)
in python with the c++ version reduced the cpu load by 1/2 a cpu.
Glen
> On Nov 22, 2019, at 8:57 PM, Marcus D. Leech <patchvonbraun@gmail.com> wrote:
>
> So, I'm trying to implement and embedded Python block that handles vectors where the vector length is defined at runtime--like most
> blocks that take vector-length inputs.
>
> But GRC only "recognizes" the I/O signature as being vector if the dimension is of a fixed size, and invariate with respect to runtime. Is there
> a "trick" I'm missing?
>
>
>
No comments:
Post a Comment