5.7 Auto Parallelization and Compile-Time Optimizations

Traditionally, most code was developed without support for parallel threads of execution, making it difficult to fully exploit advancements in the lasted hardware technologies. The Oracle Solaris Studio compilers provide mechanisms that let applications run multiple threads without requiring you to specify how. Within legacy code, execution loops usually present opportunities for optimization where repetitive serial operations can be divided into multiple, independent execution threads. Several compiler flags govern automatic parallelization behavior:

-xautopar

Instructs the compiler to perform auto parallelization of loops.

-xloopinfo

Outputs information about the loops that the compiler has parallelized.

-xreduction

Instructs the compiler to parallelize reduction operations that take a range of values and output a single value, such as summing all the values in an array.