mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-08 06:10:06 +00:00
Add benchtests for trunc and truncf.
This patch adds benchtests for the trunc and truncf functions. The inputs listed are fairly arbitrary; I do not assert they are representative of any particular application. * benchtests/Makefile (bench-math): Add trunc and truncf. (CFLAGS-bench-trunc.c): New variable. (CFLAGS-bench-truncf.c): Likewise. * benchtests/trunc-inputs: New file. * benchtests/truncf-inputs: Likewise.
This commit is contained in:
parent
bd17ba29eb
commit
eb375def3d
@ -1,3 +1,11 @@
|
||||
2017-09-19 Joseph Myers <joseph@codesourcery.com>
|
||||
|
||||
* benchtests/Makefile (bench-math): Add trunc and truncf.
|
||||
(CFLAGS-bench-trunc.c): New variable.
|
||||
(CFLAGS-bench-truncf.c): Likewise.
|
||||
* benchtests/trunc-inputs: New file.
|
||||
* benchtests/truncf-inputs: Likewise.
|
||||
|
||||
2017-09-19 Rajalakshmi Srinivasaraghavan <raji@linux.vnet.ibm.com>
|
||||
|
||||
* sysdeps/powerpc/powerpc64/power8/memset.S: Avoid misaligned stores.
|
||||
|
@ -23,7 +23,7 @@ subdir := benchtests
|
||||
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
|
||||
fmaxf powf trunc truncf
|
||||
|
||||
bench-pthread := pthread_once thread_create
|
||||
|
||||
@ -76,6 +76,8 @@ CFLAGS-bench-fmin.c += -fno-builtin
|
||||
CFLAGS-bench-fminf.c += -fno-builtin
|
||||
CFLAGS-bench-fmax.c += -fno-builtin
|
||||
CFLAGS-bench-fmaxf.c += -fno-builtin
|
||||
CFLAGS-bench-trunc.c += -fno-builtin
|
||||
CFLAGS-bench-truncf.c += -fno-builtin
|
||||
|
||||
bench-malloc := malloc-thread
|
||||
|
||||
|
22
benchtests/trunc-inputs
Normal file
22
benchtests/trunc-inputs
Normal file
@ -0,0 +1,22 @@
|
||||
## args: double
|
||||
## ret: double
|
||||
## includes: math.h
|
||||
0.0
|
||||
-0.0
|
||||
0.001
|
||||
-0.001
|
||||
0.5
|
||||
-0.5
|
||||
0.999
|
||||
-0.999
|
||||
1.0
|
||||
-1.0
|
||||
1.001
|
||||
-1.001
|
||||
123.5
|
||||
-123.5
|
||||
12345.1
|
||||
-1000000.1
|
||||
1e15
|
||||
-1e30
|
||||
1e200
|
21
benchtests/truncf-inputs
Normal file
21
benchtests/truncf-inputs
Normal file
@ -0,0 +1,21 @@
|
||||
## args: float
|
||||
## ret: float
|
||||
## includes: math.h
|
||||
0.0f
|
||||
-0.0f
|
||||
0.001f
|
||||
-0.001f
|
||||
0.5f
|
||||
-0.5f
|
||||
0.999f
|
||||
-0.999f
|
||||
1.0f
|
||||
-1.0f
|
||||
1.001f
|
||||
-1.001f
|
||||
123.5f
|
||||
-123.5f
|
||||
12345.1f
|
||||
-1000000.5f
|
||||
1e15f
|
||||
-1e30f
|
Loading…
Reference in New Issue
Block a user