discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: Add tags without copying samples?


From: Marcus Müller
Subject: Re: Add tags without copying samples?
Date: Fri, 25 Feb 2022 22:00:50 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0

Forgot to add: propagating tags from all inputs to the output is the default tag propagation policy, so B has to do essentially nothing if it doesn't itself care for the tags.


On 25.02.22 21:55, Marcus Müller wrote:
Hi Thomas,

sadly, within the GNU Radio 3.x framework, this isn't possible.

There's one possible "lower effort" solution. Assume you have this


Source -> A -> B -> Sink

where A is the block that currently needs to copy items just to add tags.

We can now do

Source ------> B -> Sink
        \-> A -/^

where B is doing some functionality that you needed anyway. Now, B just gets a second input, that it completely ignores – except for the tags.

A gets modified in that it doesn't copy the input, but simply says "hey, I produced items", without actually producing items; B would ignore them anyways. A, however, adds the tags.

Not quite sure this helps you much...

Best regards,
Marcus

On 25.02.22 17:36, Thomas Lorblanchès wrote:
Hi all,
I have some custom blocks that do not change the samples but only add tags in the output stream. At very high sampling rates, all these "memcpy" operations to copy the input samples to the output stream take a lot of time and put a lot of memory pressure on the system, and are completly useless on an algorithmic point of view.
Is there a clever way to add tags without copying the samples?
Thanks for your answers.
Thomas



reply via email to

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