Hi Marcus,
Sorry for responding lately. I got it, thanks your reply
在 2015年06月20日 23:05, Marcus Müller 写道:
But I don't know why do it can increase
parallelism?
Assume the following situation
file_source-> multiply_const -> file_sink
assume the complete file fits into the buffer, and n_best wouldn't
be buffer/2, then file_source would read the whole file, and write
it to the buffer. Only then, multiply_const would have something
to work. It would also consume the whole input buffer at once, and
produce the full output buffer. Only then, file_sink could start
to work.
so, at no time, more than one block would be active. You could
that run on a single-core computer, and wouldn't see any
difference to a multi-core computer.
Even if the file is larger than the buffer, then multiply_const
couldn't do anything, because it must wait for the whole time that
file_sink needs to write away a complete buffer.
If you restrict the maximum number of produced samples to half the
output buffer size, the multipy_const block would much more often
be able to execute, whilst file_sink is still writing away half of
the buffer.
Greetings,
Marcus
On 06/20/2015 04:43 PM, Tiankun Hu
wrote:
Hi Tom, Johnathan,
Thanks your reply.
Hi Marcus,
Seems your conclusion is make sense.
I think it might relate with buffer size which was allocated in
"flat_flowgraph.cc / allocate_buffer"
// *2 because we're now only filling them 1/2 way in order
to
// increase the available parallelism when using the TPB
scheduler.
// (We're double buffering, where we used to single buffer)
int nitems = s_fixed_buffer_size * 2 / item_size
But I don't know why do it can increase parallelism?
在 2015年06月19日 22:48, Johnathan
Corgan 写道:
--
Thanks
Tiankun
_______________________________________________
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
--
Thanks
Tiankun
|