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: Marcus Müller
Subject: Re: [Discuss-gnuradio] Assign to 'out' but don't 'produce' anything
Date: Wed, 24 Jun 2015 21:35:12 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0

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


reply via email to

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