On Wed, Jul 21, 2010 at 04:00:58PM -0700, Sean Jordan wrote:
Thanks. That helped a lot, however the code seems to be looping in one of
the secondary blocks before proceeding to the next blocks or going back to
the first block. I cannot figure out what is causing this.
Write a piece of QA code to test your block with known inputs and
expected outputs. There are tons of examples in
I think it may
have to do with ninput_items or noutput_items but am not sure. From what I
can tell, ninput_items should be the number returned by general_work in the
however how does one use that number when it is a vector and what is its purpose?
ninput_items tells you many items are available on each of your input
streams. ninput_items is the number of items of input available on
input stream 0…
You may not need to look at it depending on your needs. Unless you
override “forecast”, the default version will tell the scheduler that
you need 1 input for each output item to be produced.
The relationship between forecast and general_work is explained in the
howto-write-a-block doc mentioned above.
You should treat each block as a black box, unrelated to the blocks
upstream or downstream from it. If you’re thinking that they are
related, or are trying to second guess the scheduler wrt noutput_items
or the amount of input available when your general_work function is
called, you’re headed for trouble.