- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello
Can someone point me at any available guidelines for use of STL in new C++ code, in such a way as to not prevent the Intel compiler from vectorizing the code?
For example, does the latest version successfully vectorize simple transforms such as this?
transfrom(x.begin(),x.end(),
y.begin(),
[](float x, float y){return x+y;});
or, say we have 2 such transforms, one after the other, can thje compiler fuse the loops and vectorize the result?
Thanks
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Auto-vectorization of simpler transform() is often successful. If the compiler can't see that x and y aren't aliased, the restrict extension may be required. In a case where fusion would be desirable, plain C99 is more likely to do the job.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page