Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
29 Views

#pragma vector

the development manual says : The vector pragma indicates that the loop should be vectorized, if it is legal to do so . What does legal imply here? loop dependencies ?

 

Thanks

0 Kudos
1 Reply
Highlighted
Black Belt
29 Views

#pragma vector over-rides cost analysis, where the compiler estimates whether vectorization will be be beneficial for the target instruction set. So it will try to vectorize even if it expects to lose performance. It usually includes an assertion such as aligned or unaligned (these direct specific handling of data alignment) or nontemporal (to over-write entire blocks without reading into cache). Unlike #pragma omp simd it doesn't assert vector independence. So it is often used together with __restrict definition of assignment through pointer.
0 Kudos