]> git.ipfire.org Git - thirdparty/glibc.git/commit
PPC64: Add libmvec SIMD single-precision power function [BZ #24210]
authorShawn Landden <shawn@git.icu>
Thu, 4 Jul 2019 21:56:46 +0000 (17:56 -0400)
committerTulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
Wed, 19 Feb 2020 20:29:23 +0000 (17:29 -0300)
commit4068846e1e364b2441b93cf3d731a6599596726a
tree2b92d418d2f8db7a81a63029c424e1deffed4fb6
parentd91313ed6fb18acfb4f7b0399fd18e87f5c00221
PPC64: Add libmvec SIMD single-precision power function [BZ #24210]

Based off the ./sysdeps/ieee754/flt-32/powf.c implementation,
and thus 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 powf 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 floats between 0.5 and 1 I get the following:

Running 20 times over 32MiB
vector: mean 307.659767 (sd 0.203217)
scalar: mean 221.837088 (sd 0.032256)

And with random data there is a decrease in performance:
vector: mean 265.366371 (sd 0.000626)
scalar: mean 279.598078 (sd 0.025592)

Reviewed-by: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
NEWS
sysdeps/powerpc/bits/math-vector.h
sysdeps/powerpc/powerpc64/fpu/Versions
sysdeps/powerpc/powerpc64/fpu/multiarch/Makefile
sysdeps/powerpc/powerpc64/fpu/multiarch/test-float-vlen4-wrappers.c
sysdeps/powerpc/powerpc64/fpu/multiarch/vec_math_errf.c
sysdeps/powerpc/powerpc64/fpu/multiarch/vec_s_powf4_vsx.c [new file with mode: 0644]
sysdeps/unix/sysv/linux/powerpc/powerpc64/libmvec.abilist