discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Galois-form LFSR now in trunk (r4613)


From: Trond Danielsen
Subject: Re: [Discuss-gnuradio] Galois-form LFSR now in trunk (r4613)
Date: Fri, 23 Feb 2007 21:40:32 +0100

2007/2/23, Johnathan Corgan <address@hidden>:
Trond Danielsen wrote:
> Is this correct?
> - - - - - - - - -
> gr_glfsr_source_b::gr_glfsr_source_b(int degree, bool repeat, int
> mask, int seed)
>  : gr_sync_block ("glfsr_source_b",
>                   gr_make_io_signature (0, 0, 0),
>                   gr_make_io_signature (1, 1, sizeof(unsigned char))),
>    d_repeat(repeat),
>    d_index(0)
> {
>  if (degree < 1 || degree > 32)
>    throw std::runtime_error("gr_glfsr_source_b: degree must be
> between 1 and 32 inclusive");
>  d_length = (int)(1ULL << degree)-1;
>                            ^
> - - - - -

Not sure I understand what you're questioning, the formatting is messed
up.  But now that I stare at it, I think I misplaced a parenthesis; the
-1 should be inside.

--
Johnathan Corgan
Corgan Enterprises LLC
http://corganenterprises.com


Sorry for not expressing myself clearly. This is what I was thinking of:

d_length = (int)(1ULL << degree)-1;

A quick google search enlightened me, I have never seen the 1ULL
decimal-constant integer-suffix before. Sorry to bother you.

--
Trond Danielsen




reply via email to

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