Re: gnu_parallel STL not vectorized?

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

 



On Thu, 23 Apr 2015, Tim Prince wrote:

On 4/23/2015 10:25 AM, Marc Glisse wrote:
On Thu, 23 Apr 2015, Tim Prince wrote:

From the looks of gcc 6.0, it appears that gnu_parallel STL is slated to
become part of the release.

Could you be more specific about what you are talking about and where
you got your information?
I set -D_GLIBCXX_PARALLEL in previous versions but nothing happened.

According to https://gcc.gnu.org/onlinedocs/libstdc++/manual/parallel_mode_using.html something like "-fopenmp -O2 -D_GLIBCXX_PARALLEL" should work. And indeed the generated code is quite different than without -D_GLIBCXX_PARALLEL. I did not test performance.

Now in 6.0 it goes parallel, but with poor performance.

What other version are you comparing to? I would be very surprised if anything had changed between 5.1.0 and current trunk (6.0).

Parallel mode has been a part of libstdc++ for several years:
https://gcc.gnu.org/onlinedocs/libstdc++/manual/parallel_mode.html

Am I right in believing that gnu_parallel STL code is not simd
vectorized?

It is not manually vectorized, but the compiler is free to do it if it
can.
Does this require setting  -march and/or -ftree-vectorize options for
libstdc++ build?  What would be the recommended incantation?

No, the compiled part of the library should not matter, it is only when compiling your application that you should use -O3 -march=native to maximize vectorization opportunities.

--
Marc Glisse




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux