diff options
author | Shawn Landden <shawn@git.icu> | 2019-06-26 10:52:45 -0400 |
---|---|---|
committer | Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com> | 2020-02-19 17:29:28 -0300 |
commit | 01d11f7eb989fe95c635fe3fcf76f68985faa9e0 (patch) | |
tree | 37d54d1b00e3ec7a9bb4f6502cfead07be36b2af /sysdeps/powerpc/bits | |
parent | 4068846e1e364b2441b93cf3d731a6599596726a (diff) | |
download | glibc-01d11f7eb989fe95c635fe3fcf76f68985faa9e0.tar.gz |
PPC64: Add libmvec SIMD double-precision power function [BZ #24210]
Based off the ./sysdeps/ieee754/dbl-64/pow.c implementation,
and provides identical results.
Unlike other libmvec functions, this sets the underflow and overflow bits.
The caller can check these flags, and possibly re-run the calculations with
scalar pow to figure out what is causing the overflow or underflow.
I may have not normalized the data for benchmarking this properly,
but operating only on integers between 0-2^32 and floats between 0.5 and
1 I get the following:
Running 20 times over 32MiB
vector: mean 535.824919 (sd 0.246088)
scalar: mean 286.384220 (sd 0.027630)
Which is a very impressive speed boost.
Reviewed-by: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
Diffstat (limited to 'sysdeps/powerpc/bits')
-rw-r--r-- | sysdeps/powerpc/bits/math-vector.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sysdeps/powerpc/bits/math-vector.h b/sysdeps/powerpc/bits/math-vector.h index 5709efbae0..ce10dc4bb7 100644 --- a/sysdeps/powerpc/bits/math-vector.h +++ b/sysdeps/powerpc/bits/math-vector.h @@ -50,6 +50,8 @@ # define __DECL_SIMD_exp __DECL_SIMD_PPC64 # undef __DECL_SIMD_powf # define __DECL_SIMD_powf __DECL_SIMD_PPC64 +# undef __DECL_SIMD_pow +# define __DECL_SIMD_pow __DECL_SIMD_PPC64 # endif #endif |