This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
Hey guys,
If you release an x86 app which needs some SIMD functions where the instructions are decided at runtime based on the CPU (eg. AMD has 128 bit register whereas new intel has 256 or 512).
Specifically, I want to compile the exe once, and if executed on a Haswell chip would use AVX2 instructions and if used on a Ryzen chip used the respective 128bit register size instructions.
Which compilers do this runtime branching automatically in the auto-vectorizer? I use GCC, clang, MSVC and ICC, and couldn't find documentation on this specifically.
If not do I have to implement this by hand in intrinsics? I wouldn't mind doing it for simple std::vector math operations and releasing it on github.
Post Details
- Posted
- 7 years ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/simd/commen...