C/C++ Extensions for Array Notations Overview

C/C++ language extension for array notations is an Intel-specific language extension that is a part of Intel® Cilk™ Plus feature supported by the Intel® compiler.

The C/C++ extension provides data parallel array notations with the following major benefits:

When you use the array notations, the Intel® 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 supported on IA-32 and Intel® 64 architectures and they are enabled by default. To disable them, use the -no-intel-extensions(Linux* OS or MacOS* X) or /Qintel-extensions-(Windows* OS) option.

To use the array notations in your application, keep the following sequence of steps in mind:

  1. Insert the array notations language extensions into your application source code.
  2. Compile the application at optimization level –O1 and above to enable vectorization. By default, the compiler generates SIMD vector instructions in the 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 (Linux* and Mac OS* X) or /Od (Windows*), you generate serialized scalar code without vectorization or multi-threading.

By default, the Intel® compiler accepts the array notations language extensions to generate vector and multi-threaded code based on the data parallel constructs in the program.

The array notations work with both -O0 (Linux and Mac OS X) and /Od (Windows) options, and with optimization levels of -O1, -O2 and -O3 (Linux and Mac OS X) or /O1, /O2 and /O3 (Windows) options. Specifying -O0 (Linux and Mac OS X) or /Od (Windows) option serializes the array operations into sequential loops and helps to debug applications using array notations in their code.

See Also

Submit feedback on this help topic

Copyright © 1996-2011, Intel Corporation. All rights reserved.