MetaScale/nt2 — pull request #231 by jfalcou (2012-07-19 11:40:12+00:00)
Title: Fix for Issue #220 - OpenMP performance bug

This patch fixes issue 220 by providing a new code generation process for
OpenMP transform. This is done by using a SPMD model of computation instead
of the naive SIMD way using omp parallel for.

The patch contains:
- a small factoring of the code detection of openMP.
- the addition of a global shut-off flag -- NT2_DISABLE_OPENMP --
to force openMP to not be used for a given compilation unit even
if openMP is globally used. This mimics the BOOST_SIMD_DISABLE_SIMD
flag and was used durign testing. It's still there as it may prove
useful.

- A new specialisation for nt2::transform that can now be called with
a specified starting index and a specified number of element to process.
This overloads is required to lessen the code duplication in openMP and
to make the whole elementwise loop generation fully hierarchical.

- An asymmetric table performance benchmark. This test compares the
performance of the openMP+SIMD implementation of some elementwise
operation on a N*N table versus a N²*1 tablle. This showcases the
effect of the new openMP code generation process.