Instructs the compiler to prefer loop distribution at the location indicated.
#pragma distribute_point |
None
The distribute_point pragma is used to suggest to the compiler to split large loops into smaller ones; this is particularly useful in cases where optimizations like vectorization cannot take place due to excessive register usage.
The following rules apply to this pragma:
When the pragma is placed inside a loop, the compiler distributes the loop at that point. All loop-carried dependencies are ignored.
When inside the loop, pragmas cannot be placed within an if statement.
When the pragma is placed outside the loop, the compiler distributes the loop based on an internal heuristic. The compiler determines where to distribute the loops and observes data dependency. If the pragmas are placed inside the loop, the compiler supports multiple instances of the pragma.
The distribute_point pragma is supported in host code only.
Example: Using the distribute_point pragma outside the loop |
---|
|
Example: Using the distribute_point pragma inside the loop |
---|
|
Example: Using the distribute_point pragma inside and outside the loop |
---|
|