[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GRC embedded Python vector support
From: |
Marcus D. Leech |
Subject: |
Re: GRC embedded Python vector support |
Date: |
Sat, 23 Nov 2019 20:34:23 -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:
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 <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?