#pragma nosimd


The #pragma nosimd directive instructs the compiler to not generate VMX (Vector Multimedia Extension) instructions in the loop immediately following this directive.


Read syntax diagramSkip visual syntax diagram>>-#--pragma--nosimd-------------------------------------------><


This directive has effect only for architectures that support VMX and when used with -qhot=simd option. With these compiler options in effect, the compiler will convert certain operations that are performed in a loop on successive elements of an array into a call to VMX (Vector Multimedia Extension) instruction. This call calculates several results at one time, which is faster than calculating each result sequentially.

The #pragma nosimd directive applies only to DO, WHILE, and FOR loops.

The #pragma nosimd directive applies only to the loops immediately following it. The directive has no effect on other loops that may be nested within the specified loop.

You can use #pragma nosimd directive can be mixed with loop optimization, and SMP directives without requiring any specific optimization level.


#pragma nosimd
for (i=1; i<1000; i++) {
    /* program code */


Related information