On 2012-09-26 20:25, Florian Philipp wrote:
Am 25.09.2012 17:01, schrieb Michael Mol:
On Tue, Sep 25, 2012 at 10:42 AM, James <wirel...@tampabay.rr.com>
wrote:
OH, anyone is encouraged to "chime in" about openmp
and your thoughts as to it's viability and usefulness.
Do you believe it will become a core technology,
embedded into GCC? Used widely?
I didn't understand this statement. It is a core "technology" and has
been
part of GCC since 4.2 or so. I certainly have used it since several
years
in some of my projects. But it certainly needs some little
modifications
to the code to work.
If you can use it, use it. OpenMP is little more than a set of
extensions to C (and C++) which allows the normally-scalar language
to
do some things in a parallel fashion without resorting to the costs
of
multithreading. This is good, because vector instructions have been
available in x86 since MMX came out, and improvements to the vector
instructions available to x86 still goes on.
I guess this is just poorly phrased but to clarify: OpenMP *does* use
multithreading and nothing else. It does not, in any way, make more
use
of vector instructions than GCC without -fopenmp. I guess what you
mean
is avoiding the costs of *manual* multithreading using POSIX threads
and
the like.
To get GCC to try and use vectorization pass -ftree-vectorize.
(You can see what loops it optimized using vectorization with
-ftree-vectorizer-verbose=1).
Cheers,
Peter.