discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Assign to 'out' but don't 'produce' anything


From: Richard Bell
Subject: Re: [Discuss-gnuradio] Assign to 'out' but don't 'produce' anything
Date: Wed, 24 Jun 2015 12:38:12 -0700

Ah OK. So the produce function advances the buffer pointer only?

Rich

On Wed, Jun 24, 2015 at 12:35 PM, Marcus Müller <address@hidden> wrote:
Hi Rich,
What happens when you assign input to output in a general_work call, out[ii]=in[ii], but don't call produce?
Then you're breaking a contract!
GNU Radio has to rely on you only writing samples you admit that you produce -- otherwise, the write pointer can't advance, and the next general_work will be offered the same buffer space again.
My minds eye sees the out variable as a secondary local buffer for general_work.
There is no local buffer! You directly work on the pseudocircular buffers; everything else would introduce unnecessary copy overhead.

Best regards,
Marcus


On 06/24/2015 09:23 PM, Richard Bell wrote:
What happens when you assign input to output in a general_work call, out[ii]=in[ii], but don't call produce? Is the stuff you dumped into 'out' lost when general_work returns WORK_CALLED_PRODUCE?

My minds eye sees the out variable as a secondary local buffer for general_work. You dump stuff in there while general_work has scope, and transfer the contents of this buffer to the gnuradio block buffer when you call produce. Am I understanding this correctly?

v/r,
Rich


_______________________________________________
Discuss-gnuradio mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


_______________________________________________
Discuss-gnuradio mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio



reply via email to

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