discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] why alignment feature work only when output_multi


From: Tiankun Hu
Subject: Re: [Discuss-gnuradio] why alignment feature work only when output_multiple not set
Date: Tue, 07 Jul 2015 21:13:59 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0

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 写道:
On Fri, Jun 19, 2015 at 6:09 AM, Tom Rondeau <address@hidden> wrote:
On Thu, Jun 18, 2015 at 8:29 AM, Tiankun Hu <address@hidden> wrote:
Hi Tom,
Thanks your reply, I have another question, in function "min_available_space" why buffer_size/2 is best ? 

I'm not really sure. That's a question for Eric.

The scheduler aims to keep the buffer no more than half full, so that in the steady state the producing block can write into the free half and the downstream consuming block(s) read from the filled half.

--
Johnathan Corgan
Corgan Labs - SDR Training and Development Services
Intro to SDR Class - June 29-30, El Segundo, CA
http://corganlabs.com

-- 
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

reply via email to

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