vectorization issue

jimdempseyatthecove
Total Points:
36,537
Status Points:
36,537
Black Belt
October 25, 2008 10:25 AM PDT
Rate
 
#4 Reply to #3

The fundamental problem you are experiencing is by making the code opaque by encapsulation with member functions and iterators you also tend to make it difficult, if not impossible for the compiler to vectorize or even to determine vectoizability of the code (as it chews through the data). This is the penalty you pay for progress. By using "old school" programming techniques such as array of like members of each object (as opposed to C++ arrays of objects of elements) the data layout favors vectorization. The requirements of the application would indicate the better of the two techniques. If you need the vectorization for performance then consider unpackaging the objects.

Jim

 


--------

Blog: The Parallel Void


www.quickthreadprogramming.com


Intel Software Network Forums Statistics

8491 users have contributed to 31629 threads and 100770 posts to date.
In the past 24 hours, we have 28 new thread(s) 120 new posts(s), and 168 new user(s).

In the past 3 days, the most popular thread for everyone has been Implicite multithreading ??? The most posts were made to Crash when loading skeleton The post with the most views is Dear Steve, excuse me for a d

Please welcome our newest member shadowwolf99