Subject: Re: [boost] [random] parallel random number generators
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2012-01-26 14:06:19
On 01/25/2012 08:55 PM, John Salmon wrote:
> A couple of weeks ago, I asked if there was interest in a parallel RNG in
> Here's a pointer to my original post:.
> Our paper on parallel random number generators is here:
> also available at
> Source (non-boost) is available here:
> And software that might be a starting point for a boost contribution is
> Feedback is appreciated.
The above code seems quite more readable than the one from the
deshawresearch website, but also a bit shorter.
Does it do everything the deshawresearch does?
I see you're using inline asm for mulq on GCC, but you don't use __umulh
I can't see any hit for _mm_clmulepi64_si128 (which I assume would be
Your cpuid code won't work with gcc -m32 -fPIC, and also doesn't appear
to take care of register trashing properly.
I also don't really think the code should do any cpuid check at all,
since emitting AESNI instructions requires -maes, and whenever you use
-maes the compiler is free to emit AESNI instructions whenever it wants.
From what I see, you only use SSE instructions if AESNI is available.
Is that really desirable?
There is a library proposed for Boost that abstracts SIMD instructions
and scalar built-ins (Boost.SIMD), it might be interesting to use it /
extend it to take care of all the platform-specific bits.
In any case I think this would be a very interesting contribution to
Boost and the open-source community in general.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk