Instructs the compiler to ignore assumed vector dependencies.
ivdeppragma instructs the compiler to ignore assumed vector dependencies. To ensure correct code, the compiler treats an assumed dependence as a proven dependence, which prevents vectorization. This pragma overrides that decision. Use this pragma only when you know that the assumed loop dependencies are safe to ignore.
In addition to the
vectorpragma can be used to override the efficiency heuristics of the vectorizer.
The proven dependencies that prevent vectorization are not ignored, only assumed dependencies are ignored.
The loop in this example will not vectorize without the
ivdeppragma, since the value of
kis not known; vectorization would be illegal if
k < 0.
The pragma binds only the
forloop contained in current function. This includes a
forloop contained in a sub-function called by the current function.
This loop requires the parallel option in addition to the