|
From: | Marcus D. Leech |
Subject: | Re: GRC embedded Python vector support |
Date: | Sat, 23 Nov 2019 10:07:43 -0500 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 |
On 11/23/2019 08:22 AM, Glen Langston wrote:
Thanks Glen. Yes, I'm aware of your code. I was hoping to have something that didn't require any external dependencies, and theHi 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
embedded python block seemed expedient.
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?
[Prev in Thread] | Current Thread | [Next in Thread] |