You keep Marcus very busy, let me help to offload him.
On Wed, May 28, 2014 at 8:36 PM, Karan T. [email protected]
Thank you for evaluating our code and help debugging it. what we
understand from your reply is that work function at a time processes
noutput_items and this can be lesser than or more than the fft_length. As
an example in our code when we give the fft length as 8192, but the
noutput_items is still 4096, so does that mean it has to execute work
function twice to process 4096*2=8192 items?
When the desirable fft_length is 8192, could you accept to perform FFT
only 4096 elements?
If yes, perform FFT on this 4096 elements, and return 4096.
If not, make sure you use set_output_multiple(fft_length) or at least
set_min_noutput_items(fft_length), in this case the scheduler will not
work() function with insufficient number of elements.
Regarding the first approach you suggested, we change the input signature
and output signature to (sizeof (gr_complex)*fft_length) so that it is a
single vector that is being processed. Then we return 1 as suggested. But
it is throwing an itemsize mismatch error. I have attached the c++ file
here ( http://pastebin.com/TKemtbxN ). The error says
The correct way is, in your work() function you should have 2 loops,
because now your in is a vector but no longer solely a complex
for (int i=0; i < noutput_items; i++)
for (int j=0; j < fft_length; j++)
For the second method suggested should we write a general work function
a forecast function which would mean doing away with sync block that we are
using with work function right now?
No need, because set_output_multiple() works with sync block as well.
Apologize in advance if my answer is incorrect.