novector

Specifies that the loop should never be vectorized.

Syntax

#pragma novector

Arguments

None

Description

The novector pragma specifies that a particular loop should never be vectorized, even if it is legal to do so. When avoiding vectorization of a loop is desirable (when vectorization results in a performance regression rather than improvement), the novector pragma can be used in the source text to disable vectorization of a loop. This behavior is in contrast to the vector always pragma.

Example

Example: Using the novector pragma

When you know the trip count (ub - lb) is too low to make vectorization worthwhile, you can use novector to tell the compiler not to vectorize, even if the loop is considered vectorizable.

void foo(int lb, int ub)
{
  #pragma novector
  for(j=lb; j<ub; j++)
  {
     a[j]=a[j]+b[j];
  }
}

See Also


Submit feedback on this help topic

Copyright © 1996-2011, Intel Corporation. All rights reserved.