WIP: use openmp vector function ABI for sin, cos, exp and log #7865
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
glibc provides sin, cos, exp, log, pow and sincos with this ABI since 2.22 for sse4 and AVX2.
https://sourceware.org/glibc/wiki/libmvec
In this branch I have added support for the first four which provides significant speedup over the scalar functions.
It is implemented directly via the ABI instead of relying on compiler support to do so automatically. Using the compiler would be nicer (especially since gcc can do auto cloning) but this might be more portable.
There are still a couple issues but it should be testable.
OPT=-mavx2
npymath now requires a link to libmvec which could be a problem for third parties(but still a hack in linalg_umath which likely will cause a failure in travis)