Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.

#pragma vector

gajendra_g_
Beginner
449 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
Honored Contributor III
449 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
Reply