- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have a loop which inside a parallel construct which goes like this
# pragma omp parallel ... //directives { // other loops .... #pragma omp for for (i=1; i<=nx; i++) for (j=1; j<=ny; j++) for (k=1; k<=nz; k++) { p_sparse_s= RLL + (riri_sparse2 / noemer_sparse) * p_sparse_s ; } // other loops .... }
On inspecting it seems this loop is not being vectorized because of assumed dependency. On further inspecting with dependence analysis there is no dependency ( as evident from the code ). How should the directive be changed so that I enforce vectorization.
Also I tried using ivdep directive still the compiler didn't vectorised.
- Tags:
- CC++
- Development Tools
- Intel® C++ Compiler
- Intel® Parallel Studio XE
- Intel® System Studio
- Optimization
- Parallel Computing
- Vectorization
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You don't show sufficient information to understand why there might be a dependency; it's not at all evident how you have declared p[][][]. The requirements for restrict qualifiers on your declaration of p[][][] get annoying with multiple levels of indirection, so I'm guessing you may not have that set up. You could over-ride that category of dependency if you write the nested loops out with #pragma omp simd on the inner loop.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page