Assign to 'out' but don't 'produce' anything

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

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

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

Rich

On Wed, Jun 24, 2015 at 12:35 PM, Marcus Müller
[email protected]

pretty much; it increases the the nitems_written counter, too.