[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] Processing of large numbers of samples
From: |
Marcus Müller |
Subject: |
Re: [Discuss-gnuradio] Processing of large numbers of samples |
Date: |
Wed, 21 Jan 2015 12:19:20 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 |
Note that Sylvain's answer is appropriate to guarantee input sizes of
>=8192, whilst my will lead to n*8192, n natural.
On 01/21/2015 11:09 AM, Marcus Müller wrote:
> Hello Simone,
>> Is there a convenctional way to do this?
> Yes, there is! Since in a sync block, the numbers of samples you consume
> on you rinput and you produce on your output are identical,
> you can use set_output_multiple(8192) [1].
>
> If what you're doing feels more like a operation on vectors of samples
> instead of an operation on a stream of samples, you could also use a
> input signature with an input and output item size of 8192 times the
> original item size, and use stream_to_vector[2]before and
> vector_to_stream to convert from streams to vectors. A typical example
> (and generally a very nice block) is the fft_vcc[3] block, which
> encapsulates the FFT, which is a vector operation, mathematically.
>
> Greetings,
> Marcus
>
>
> [1]
> http://gnuradio.org/doc/doxygen/classgr_1_1block.html#a63d67fd758b70c6f2d7b7d4edcec53b3
> [2]
> http://gnuradio.org/doc/doxygen/classgr_1_1blocks_1_1stream__to__vector.html
> [3] http://gnuradio.org/doc/doxygen/classgr_1_1fft_1_1fft__vcc.html
> On 01/21/2015 10:51 AM, Simone Ciccia S210664 wrote:
>> Goodmorning,
>> I have general questions about processing a fixed number of samples.
>>
>> In front of the necessity to process N samples (N=8192 items) in a
>> sinchronous block, I developed a mechanism like this:
>> _____________________________________________________________
>> if(noutput_items>N)
>> {
>> processing of N elements
>> consume(N); return(N); //in this way I process the required N elements
>> }
>> else
>> {consume(0); return(0);} // here I'm waiting until the input buffer
>> reach
>> the required number of elements
>> _____________________________________________________________
>>
>> Probably is not the convenctional way to do this, but for now it works
>> well.
>> My questions are:
>> - Is there a convenctional way to do this?
>> - it seems that N cannot be larger than 8192, how can I enlarge the
>> input
>> buffer?
>>
>> _______________________________________________
>> Discuss-gnuradio mailing list
>> address@hidden
>> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio