#pragma nosimd

Applies to C Applies to C++

Description

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

Syntax


Syntax Diagram

Notes

This directive has effect only when -qhot=simd is in effect together with -qarch=ppc970. 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 prevents the compiler from generating VMX (Vector Multimedia Extension) instructions for a specific for loop. The for loop affected by this directive must be the first program statement following the directive.

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

You can use #pragma nosimd together with loop optimization and parallelization directives.

Related References

General Purpose Pragmas
arch
enablevmx
hot IBM Copyright 2003