Saturday, November 23, 2019

Re: GRC embedded Python vector support

On 11/23/2019 08:22 AM, Glen Langston wrote:
> 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
Went to build this on my lappy here (which, granted, has ancient OS on it):

from /home/mleech/gr-radio_astro/lib/detect_impl.cc:30:
/usr/include/c++/4.8.3/bits/c++0x_warning.h:32:2: error: #error This
file requires compiler and library support for the ISO C++ 2011
standard. This support is currently experimental, and must be enabled
with the -std=c++11 or -std=gnu++11 compiler options.
#error This file requires compiler and library support for the \
^



>
>> 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