[Boost-bugs] [Boost C++ Libraries] #13180: Loop vectorisation using boost multi_array

Subject: [Boost-bugs] [Boost C++ Libraries] #13180: Loop vectorisation using boost multi_array
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2017-08-28 07:08:40


#13180: Loop vectorisation using boost multi_array
-------------------------------------------------+-------------------------
 Reporter: Nicolas Barrier <nicolas.barrier@…> | Owner: Ronald
                                                 | Garcia
     Type: Support Requests | Status: new
Milestone: To Be Determined | Component: multi_array
  Version: Boost 1.65.0 | Severity:
 Keywords: | Optimization
-------------------------------------------------+-------------------------
 Dear all

 I am trying to optimize a huge code that uses boost multi-arrays. And when
 I compile the code with the ''-qopt-report=2 -qopt-report-phase=vec''
 options, I notice in the compilation report that most loops are not
 vectorized.

 I thus made a simple program to understand why, and I noticed that a loop
 that uses C array is vectorized, while the same loop using boost multi
 array is not (see test_vector.cpp) (see attached .cpp file). I get the
 following message:

 {{{
 LOOP BEGIN at test_vector.cpp(29,5)
    remark #15520: loop was not vectorized: loop with multiple exits cannot
 be vectorized unless it meets search loop idiom criteria
 LOOP END
 }}}

 A way to overcome this would be to use the data pointer in combination
 with the {{{#pragma ivdep}}} statement, but this becomes complicated when
 working on multimensional arrays.

 I thus would like to know if I am doing something wrong (for instance in
 the boost array initialisation), and if there is a way to fix this?

 I am using the icpc compiler, version 16.0.4, with boost library version
 1.65. The program is compiled as follows:

 {{{
 icpc -Ilibs/cpp/boost_1_65_0/ -O3 -qopt-report=2 -qopt-report-phase=vec
 test_vector.cpp
 }}}

 Thanks a lot

 Nicolas Barrier

-- 
Ticket URL: <https://svn.boost.org/trac10/boost/ticket/13180>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-08-28 07:14:42 UTC