Sun Studio 12 Update 1: Fortran User's Guide

3.4.175 –xvector[= [[no%]lib, [no%]simd, %none] ]

Enable automatic generation of calls to the vector library functions.

This option requires compiling with default rounding mode -fround=nearest when compiling with -xvector.

-xvector=lib (Solaris platforms only) enables the compiler to transform math library calls within loops into single calls to the equivalent vector math routines when such transformations are possible. This could result in a performance improvement for loops with large loop counts. -xvector=no%lib disables this feature.

-xvector=simd enables the compiler to use the native x86 SSE SIMD instructions to improve performance of certain loops. The compiler can only accept this switch if the target architecture supports SIMD instructions. For example, you must specify -xarch=sse2 -m64 or -xarch=generic64. You must also specify an optimization level of -xO3 or above as well as -xdepend with -xvector=simd. -xvector=no%simd disables this feature.

You will get better performance if you specify both -xvector=simd and -fsimple=2 than with -xvector=simd alone. However, your floating point results can be slightly different because -fsimple=2 allows reordering of floating-point operations.

The default is -xvector=%none. If you specify -xvector, but do not provide a sub-option, the compiler assumes -xvector=lib.

The compiler includes the libmvec libraries in the load step. If you specify -xvector=lib at compile time, you must also specify it at link time.

This option overrides previous instances so -xvector=%none overrides a previously specified -xvector=lib.