3 ms·
So .. what's the vector set that people should be targeting for wide compatibility these days?
by pjc50 3y ago
So .. what's the vector set that people should be targeting for wide compatibility these days?
- powturbo 3y agoIdeally, dynamic detecting cpu isa (sse/avx2/avx512) and respectively dispatching, used in most of my projects for ex. [1] and [2] - [1] https://github.com/powturbo/Turbo-Range-Coder https://github.com/powturbo/Turbo-Range-Coder - [2] https://github.com/powturbo/Turbo-Base64 https://github.com/powturbo/Turbo-Base64
- adgjlsfhk1 3y agohonestly you can probably stop supporting pre avx2 for a lot of use cases. avx2 is 2014 so those machines are pretty much at end of life. this also has the advantage that it lets you assume native fma hardware
- duped 3y agoYou can use function multiversioning (1) to provide multiple implementations of the same function for different targets that is selected at runtime. (1) https://releases.llvm.org/7.0.0/tools/clang/docs/AttributeReference.html#target-gnu-target https://releases.llvm.org/7.0.0/tools/clang/docs/AttributeRe...