discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] New random number generator


From: West, Nathan
Subject: Re: [Discuss-gnuradio] New random number generator
Date: Wed, 2 Sep 2015 13:04:55 -0400

On Wed, Sep 2, 2015 at 12:39 PM, Marcus Müller <address@hidden> wrote:
Hi Andre!

Wow, that's a bit much to read right now. The problem I have with using
AVX2 would be portability, which would be no issue if we wrapped RNG in
a VOLK kernel and offered a good baseline competitor in portable C code.
Point is though that our alternative in RNG seems to be boost::mt19937,
which we could only "extern C{...}" into VOLK. I don't like that
architecturally, but I think it's definitely something I'd like to hear
Nathan's input on.

What I do like, however is the takeaway that,
"we can safely ignore the risk of overlapping subsequences"
for two parallelly running mt19937 sequences that were seeded
differently -- which means that we can well scale random number
generation to multiple cores, and especially lets us just divide each
output buffer into n_threads subbuffers and let the different generators
run parallely on that, without wrecking memory coherency bus bandwidth
too much. I guess that we'd ideally just spawn as many threads as there
are 4kB-pages to fill with random samples (meaning, at every 512
gr_complexes), just a wild guess.

Cheers,
Marcus


I agree with Martin here on the speed vs randomness. This is a noise source that should primarily be used for simulations where it's OK to be rate limited by your noise source (if you're biggest problem in life is being rate limited by your noise source then I'm jealous). I'm a huge fan of Agner Fog and his work is always great, but it uses C++ which can't be used in VOLK kernels. If someone wants to port that to C and stick it in VOLK I'd accept it.

Nathan

reply via email to

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