[23/28] benchtests: hypot benchmark
diff mbox series

Message ID 20190329133529.22523-24-adhemerval.zanella@linaro.org
State New
Headers show
Series
  • powerpc floating-point optimization refactor
Related show

Commit Message

Adhemerval Zanella March 29, 2019, 1:35 p.m. UTC
Inputs are based on argument reductions from generic and powerpc
implementation.

Checked on powerpc-linux-gnu (built without --with-cpu, with
--with-cpu=power4 and with --with-cpu=power5+ and --disable-multi-arch),
powerpc64-linux-gnu (built without --with-cp and with --with-cpu=power5+
and --disable-multi-arch).

	* benchtests/Makefile (bench-math): Add hypot.
	* benchtests/hypot-inputs: New file.
---
 benchtests/Makefile     |  2 +-
 benchtests/hypot-inputs | 16 ++++++++++++++++
 2 files changed, 17 insertions(+), 1 deletion(-)
 create mode 100644 benchtests/hypot-inputs

Comments

Gabriel F. T. Gomes June 26, 2019, 7:58 p.m. UTC | #1
On Fri, Mar 29 2019, Adhemerval Zanella wrote:
>
> 	* benchtests/Makefile (bench-math): Add hypot.
> 	* benchtests/hypot-inputs: New file.

Looks good to me.  Thanks.

Reviewed-by: Gabriel F. T. Gomes <gabrielftg@linux.ibm.com>

Patch
diff mbox series

diff --git a/benchtests/Makefile b/benchtests/Makefile
index 42bf13b27f..013653588e 100644
--- a/benchtests/Makefile
+++ b/benchtests/Makefile
@@ -24,7 +24,7 @@  include ../Makeconfig
 bench-math := acos acosh asin asinh atan atanh cos cosh exp exp2 log log2 \
 	      modf pow rint sin sincos sinh sqrt tan tanh fmin fmax fminf \
 	      fmaxf powf trunc truncf expf exp2f logf log2f sincosf sinf \
-	      cosf isnan isinf isfinite
+	      cosf isnan isinf isfinite hypot
 
 bench-pthread := pthread_once thread_create
 
diff --git a/benchtests/hypot-inputs b/benchtests/hypot-inputs
new file mode 100644
index 0000000000..e987e5dd1b
--- /dev/null
+++ b/benchtests/hypot-inputs
@@ -0,0 +1,16 @@ 
+## includes: math.h
+## args: double:double
+## ret: double
+
+## name: overflow
+0x3.ffffffffffffcp-1024, 0x8p-152
+## name: higher_two500
+0x1.000002027941dp+500,  0x1.0000000000001p+500
+## name: subnormal
+0x0.fffffffffffffp-1022, 0x0.fffffffffffffp-1022
+## name: less_two500
+0x1.fffffffffffffp-501,  0x1.fffffffffffffp-501
+
+## name: default
+3.0                   , 4.0
+5.0                   , 4.0