Implementing `std::vec` & the "working on compiler support" requirement

Apr 17, 2014 at 5:21 PM

First of all, thanks a lot for all the work and for making this public, looks really promising! :-)

A quick question, mostly out of curiosity; the current "missing functionality" page lists std::vec as not currently vectorizing.

The provided reasoning mentions that "We are currently working on the compiler support to properly implement the std::vec policy."

I'm wondering, would it be possible to implement std::vec using the already existing intrinsics (SIMD; whether SSEn or AVXm)? If not, what's missing / what are the better ways to go?

Apr 17, 2014 at 7:24 PM
Hi MattPD,

You're probably familiar with the compiler auto-vectorizer (here is a great overview by our PM Jim Hogg). Our approach is to capitalize on that technology. Normally, the auto-vectorizer is very conservative in that it will never vectorize if there is even a remote chance that it will be unsafe. Well, if the programmer tells the system (via std::vec) that the code is safe to vectorize, we can unleash the compiler on that code full throttle and let it do its magic uninhibited.

Thanks for trying it out, keep your feedback coming.
May 1, 2015 at 11:55 AM
I've just remembered about this post after the VC 2015 RC news :-)
Thanks for the reply & explaining the reasoning behind this!

Out of curiosity, any updates in VC 2015 (either RC or RTM)?