discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Keep M in N


From: Marcus Müller
Subject: Re: [Discuss-gnuradio] Keep M in N
Date: Thu, 6 Oct 2016 17:07:26 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0

Highway to the _DANGER ZONE_ :D

No, really, we do check for N>=M: https://github.com/gnuradio/gnuradio/blob/master/gr-blocks/lib/keep_m_in_n_impl.cc#L58

      if(d_m > d_n) {
        std::string s = boost::str(boost::format("keep_m_in_n: m (%1%) <= n %2%") % d_m % d_n);
        throw std::runtime_error(s);
}

Sadly, we only do that in the constructor, not in the set_m and set_n . Maybe, just maybe, we should change that :D

Cheers,
Marcus

On 06.10.2016 17:00, Tim wrote:
I'd venture to say M>N is living in dangerous territory

On 10/06/2016 10:56 AM, Marcus Müller wrote:

Hi Steve,

The first M of each N. :) (I don't really understand 100% what "every N/M" would be in general for arbitrary N>=M, integers).

If you dare to venture into the GNU Radio source code (which I'd encourage you to do, it's just that this isn't the most beautiful/interesting block), you'll find that the implementation [1] simply memcopys the first m items of every n-chunk from in- to output.

Best regards,

Marcus

[1] https://github.com/gnuradio/gnuradio/blob/master/gr-blocks/lib/keep_m_in_n_impl.cc#L111

On 06.10.2016 16:22, Steve Gough wrote:
Hi mailing list,

I have a question regarding the Keep M in N block, which keeps M out of every N samples. Is this the first M samples in every N which it retains (or) is it every N/M ?

Thanks!
Steve


_______________________________________________
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



_______________________________________________
Discuss-gnuradio mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


reply via email to

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