]> git.ipfire.org Git - thirdparty/glibc.git/blame - sysdeps/x86/fpu/bits/math-vector.h
x86-64: Add vector cosh/coshf implementation to libmvec
[thirdparty/glibc.git] / sysdeps / x86 / fpu / bits / math-vector.h
CommitLineData
21933112 1/* Platform-specific SIMD declarations of math functions.
2b778ceb 2 Copyright (C) 2014-2021 Free Software Foundation, Inc.
21933112
AS
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
5a82c748 17 <https://www.gnu.org/licenses/>. */
21933112
AS
18
19#ifndef _MATH_H
20# error "Never include <bits/math-vector.h> directly;\
21 include <math.h> instead."
22#endif
23
24/* Get default empty definitions for simd declarations. */
25#include <bits/libm-simd-decl-stubs.h>
26
27#if defined __x86_64__ && defined __FAST_MATH__
28# if defined _OPENMP && _OPENMP >= 201307
29/* OpenMP case. */
30# define __DECL_SIMD_x86_64 _Pragma ("omp declare simd notinbranch")
377ed004
AS
31# elif __GNUC_PREREQ (6,0)
32/* W/o OpenMP use GCC 6.* __attribute__ ((__simd__)). */
33# define __DECL_SIMD_x86_64 __attribute__ ((__simd__ ("notinbranch")))
34# endif
35
36# ifdef __DECL_SIMD_x86_64
21933112
AS
37# undef __DECL_SIMD_cos
38# define __DECL_SIMD_cos __DECL_SIMD_x86_64
04f496d6
AS
39# undef __DECL_SIMD_cosf
40# define __DECL_SIMD_cosf __DECL_SIMD_x86_64
4b9c2b70
AS
41# undef __DECL_SIMD_sin
42# define __DECL_SIMD_sin __DECL_SIMD_x86_64
2a8c2c7b
AS
43# undef __DECL_SIMD_sinf
44# define __DECL_SIMD_sinf __DECL_SIMD_x86_64
c9a8c526
AS
45# undef __DECL_SIMD_sincos
46# define __DECL_SIMD_sincos __DECL_SIMD_x86_64
a6336cc4
AS
47# undef __DECL_SIMD_sincosf
48# define __DECL_SIMD_sincosf __DECL_SIMD_x86_64
6af25acc
AS
49# undef __DECL_SIMD_log
50# define __DECL_SIMD_log __DECL_SIMD_x86_64
774488f8
AS
51# undef __DECL_SIMD_logf
52# define __DECL_SIMD_logf __DECL_SIMD_x86_64
9c02f663
AS
53# undef __DECL_SIMD_exp
54# define __DECL_SIMD_exp __DECL_SIMD_x86_64
1663be05
AS
55# undef __DECL_SIMD_expf
56# define __DECL_SIMD_expf __DECL_SIMD_x86_64
c10b9b13
AS
57# undef __DECL_SIMD_pow
58# define __DECL_SIMD_pow __DECL_SIMD_x86_64
8aa92022
AS
59# undef __DECL_SIMD_powf
60# define __DECL_SIMD_powf __DECL_SIMD_x86_64
f20f980c
SP
61# undef __DECL_SIMD_acos
62# define __DECL_SIMD_acos __DECL_SIMD_x86_64
63# undef __DECL_SIMD_acosf
64# define __DECL_SIMD_acosf __DECL_SIMD_x86_64
14631017
SP
65# undef __DECL_SIMD_atan
66# define __DECL_SIMD_atan __DECL_SIMD_x86_64
67# undef __DECL_SIMD_atanf
68# define __DECL_SIMD_atanf __DECL_SIMD_x86_64
11c01de1
SP
69# undef __DECL_SIMD_asin
70# define __DECL_SIMD_asin __DECL_SIMD_x86_64
71# undef __DECL_SIMD_asinf
72# define __DECL_SIMD_asinf __DECL_SIMD_x86_64
37475ba8
SP
73# undef __DECL_SIMD_hypot
74# define __DECL_SIMD_hypot __DECL_SIMD_x86_64
75# undef __DECL_SIMD_hypotf
76# define __DECL_SIMD_hypotf __DECL_SIMD_x86_64
3fc9ccc2
SP
77# undef __DECL_SIMD_exp2
78# define __DECL_SIMD_exp2 __DECL_SIMD_x86_64
79# undef __DECL_SIMD_exp2f
80# define __DECL_SIMD_exp2f __DECL_SIMD_x86_64
8b726453
SP
81# undef __DECL_SIMD_exp10
82# define __DECL_SIMD_exp10 __DECL_SIMD_x86_64
83# undef __DECL_SIMD_exp10f
84# define __DECL_SIMD_exp10f __DECL_SIMD_x86_64
ef7ea9c1
SP
85# undef __DECL_SIMD_cosh
86# define __DECL_SIMD_cosh __DECL_SIMD_x86_64
87# undef __DECL_SIMD_coshf
88# define __DECL_SIMD_coshf __DECL_SIMD_x86_64
6af25acc 89
21933112
AS
90# endif
91#endif