This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fw: [PATCH][Aarch64] Add vectorized mersenne twister


On 02/06/17 15:29 +0100, James Greenhalgh wrote:
Hi Michael,

I think the correct list for this patch would be libstdc++@gcc.gnu.org
(I'm sure someone there will correct me if I'm wrong).

Thanks, James, that's right. All libstdc++ patches should go to both
gcc-patches and this list.


I'm interested in the answer to your point about polluting the global
namespace.

It's not ideal, but I agree it's acceptable when including a
non-standard extension header. Strictly conforming programs won't use
that header, and won't get the namespace pollution.

However, if I'm reading the patch correctly it will also happen when
including <random>, because that will use the new
config/cpu/aarch64/opt/bits/opt_random.h header which includes
"arm_neon.h".

That aside, this looks like a nice addition.

The #include "arm_neon.h" directives should use <arm_neon.h> instead.


	Add optimized implementation of mersenne twister for aarch64
	* config/cpu/aarch64/opt/ext/opt_random.h: New file.
	(__arch64_recursion): new function.
	(operator==): New function.
	(simd_fast_mersenne_twister_engine): New template class.

This line of the changelog seems unnecessary, no new class template is
being added.

	* config/cpu/aarch64/opt/bits/opt_random.h: New file.
	* include/ext/random (add include for arm_neon.h):
	(simd_fast_mersenne_twister_engine): add _M_state private
	array for ARM_NEON conditional compilation.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]