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: Thomas Lorblanchès
Subject: Re: Add tags without copying samples?
Date: Tue, 01 Mar 2022 16:43:21 +0100

Thanks Marcus for your answer.
I implemented this kind of flowgraph, but strangely the performance is worst when block B has 2 inputs (one for the samples and one for the tags) and A does not perform any copy, than with the original flowgraph when B has a single input and A copies the input samples! :-(
I wasn't expecting such bad results.
As the new flowgraph is more complex, maybe it adds some work for the gnuradio scheduler.


Le 25 févr. 2022 22:00, Marcus Müller <mmueller@gnuradio.org> a écrit :

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]