Intel® C++ Compiler
Support and discussions for creating C++ code that runs on platforms based on Intel® processors.

#pragma vector

gajendra_g_
Beginner
267 Views

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
TimP
Black Belt
267 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.
Reply