Intel® C++ Compiler 16.0 User and Reference Guide

C/C++ Extensions for Array Notations Overview

The C/C++ language extensions for array notations are Intel-specific language extensions that are part of the Intel® Cilk™ Plus feature.

The C/C++ extensions provide data parallel array notations with the following major benefits:

When you use the array notations, the compiler implements them using vector code.

Usage Recommendations

Use the array notations when your algorithm requires operations on arrays and where it does not require a specific order of operations among the elements of the array(s).

The C/C++ language extensions for array notations are enabled by default. To disable them, use the negative form of the [Q]intel-extensions- compiler option.

To use the array notations in your application, do the following:

  1. Insert the array notations language extensions into your application source code.
  2. Compile the application at optimization level O2 and above to enable vectorization. By default, the compiler generates SIMD vector instructions in the Intel® Streaming SIMD Extensions 2 (Intel® SSE2) instruction set. To generate SIMD vector instructions beyond SSE2, you can add target/architecture-specific compiler options to the compile command.

If you compile your application using -O0 or -O1 (Linux* and OS X*) or /Od or /O1 (Windows*), you generate serialized scalar code without vectorization.

By default, the compiler accepts the array notations language extensions to generate vector code based on the data parallel constructs in the program.

The array notations work at all optimization levels. Specifying the -O0 (Linux and OS X) or /Od (Windows) compiler options serializes the array operations into sequential loops and helps to debug applications using array notations.

See Also