C and C++ Language Extensions

Extended features beyond the current standard

This chapter describes the language extensions provided by CCE Clang. Some of these extensions are widely implemented in other compilers, while others are unique and specific to Cray systems. In addition to the language extensions listed here, CCE Clang supports the regular Clang language extensions.

Performance Extensions

#pragma ivdep
When placed before a for, while, or do while loop, #pragma ivdep causes the compiler to ignore vector dependencies in the loop, including explicit dependencies, when attempting to vectorize the loop. This allows the compiler to vectorize many loops that are potentially unsafe to vectorize.
Reductions within the loop are allowed, except for reductions into global arrays. For example, a[0] += 3 is not allowed if a is a global array.
Even with #pragma ivdep, conditions other than vector dependencies can still inhibit vectorization.