Oracle® Solaris Studio 12.4: Fortran User's Guide

Exit Print View

Updated: March 2015
 
 

3.4.186 -xvector[=a]

Enables automatic generation of calls to the vector library functions or the generation of the SIMD (Single Instruction Multiple Data) instructions on x86 processors that support SIMD. You must use default rounding mode by specifying -fround=nearest when you use this option.

The -xvector option requires optimization level -xO3 or greater. Compilation will not proceed if the optimization level is unspecified or lower than -xO3, and a message is issued.

The possible values for a are listed in the following table. The no% prefix disables the associated suboption.

Table 3-23  -xvector Suboptions
Value
Meaning
[no%]lib
(Oracle Solaris) 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. Use no%lib to disable this option.
[no%]simd
(SPARC) For -xarch=sparcace and -xarch=sparcaceplus, directs the compiler to use floating point and integral SIMD instructions to improve the performance of certain loops. Contrary to that of the other SPARC platforms, -xvector=simd is always effective under -xarch=sparcace and -xarch=sparcaceplus with the specification of any -xvector option, except -xvector=none and -xvector=no%simd. In addition -O greater than 3 is required for -xvector=simd, otherwise it is skipped without any warning.
For all other -xarch values, directs the compiler to use the Visual Instruction Set [VIS1, VIS2, ViS3, etc.] SIMD instructions to improve the performance of certain loops. Basically with explicit -xvector=simd option, the compiler will perform loop transformation enabling the generation of special vectorized SIMD instructions to reduce the number of loop iterations. The -xvector=simd option is effective only if -O is greater than 3 and -xarch is sparcvis3 and above. Otherwise -xvector=simd is skipped without any warning.
[no%]simd
(x86) Directs the compiler to use the native x86 SSE SIMD instructions to improve performance of certain loops. Streaming extensions are used on x86 by default at optimization level 3 and above where beneficial. Use no%simd to disable this option..
The compiler will use SIMD only if streaming extensions exist in the target architecture; that is, if target ISA is at least SSE2. For example, you can specify -xtarget=woodcrest, —xarch=generic64, -xarch=sse2, -xarch=sse3, or -fast on a modern platform to use it. If the target ISA has no streaming extensions, the suboption will have no effect.
%none
Disable this option completely.
yes
This option is deprecated; specify –xvector=lib instead.
no
This option is deprecated; specify –xvector=%none instead.

The default is -xvector=simd on x86 and -xvector=%none on SPARC platforms. If you specify -xvector without a suboption, the compiler assumes -xvector=simd,lib on x86 Solaris, -xvector=lib on SPARC Solaris, and -xvector=simd on Linux platforms.

The compiler includes the libmvec libraries in the load step.

If you compile and link with separate commands, be sure to use -xvector in the linking CC command as well.