discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GRC embedded Python vector support


From: Glen Langston
Subject: Re: GRC embedded Python vector support
Date: Sat, 23 Nov 2019 08:22:21 -0500

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 <address@hidden> 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?
> 
> 
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]