OpenMP* Support

The Intel® C++ Compiler Standard Edition for Embedded Systems with Bi-Endian Technology provides experimental support for the OpenMP* Version 4.0 API specification. The compiler supports a full set of options and features described in the Intel® C++ Compiler for Linux* OS documentation except for offload-related functionality, which is not supported. (Refer to the Intel® C++ Compiler Documentation for complete information about OpenMP support.)

There are some limitations regarding the use of big-endian variables and vectorization.

To compile with OpenMP, you need to prepare your program by annotating the code with OpenMP directives. The experimental use of OpenMP support currently implies the following limitations:

  • A loop control variable may not have big-endian byte order
  • Variables specified in the variable list of an OpenMP* reduction clause may not have big-endian byte order
  • A variable modified in an OpenMP* atomic expression should have little-endian byte order. Atomic operations on big-endian data may be less effective than on little-endian data
  • Vectorization involving big-endian types requires SSSE3 instructions

Let us consider the following example:

int __attribute__((littleendian)) sum = 0;
#pragma omp parallel for reduction(+:sum)
for (int i=0; i < 100; i++)
   sum += array[i];

Compiling this code in the big-endian mode by the Intel® C++ Compiler Standard Edition for Embedded Systems with Bi-Endian Technology results in the following compile time error:

example.c(3): error: Open MP for-init variable should be little-endian

The recommended way of correcting the above error is to set the byte order of the loop control variable to little-endian explicitly using __attribute__((littleendian)) in the place of the definition.

For more complete information about compiler optimizations, see our Optimization Notice.