Vector sin for x86_64 and tests.
[glibc.git] / sysdeps / x86 / fpu / bits / math-vector.h
blob82b7c675d5ab14c7d5f58e19df1c208ba8daf18d
1 /* Platform-specific SIMD declarations of math functions.
2 Copyright (C) 2014-2015 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
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.
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.
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
19 #ifndef _MATH_H
20 # error "Never include <bits/math-vector.h> directly;\
21 include <math.h> instead."
22 #endif
24 /* Get default empty definitions for simd declarations. */
25 #include <bits/libm-simd-decl-stubs.h>
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")
31 # undef __DECL_SIMD_cos
32 # define __DECL_SIMD_cos __DECL_SIMD_x86_64
33 # undef __DECL_SIMD_cosf
34 # define __DECL_SIMD_cosf __DECL_SIMD_x86_64
35 # undef __DECL_SIMD_sin
36 # define __DECL_SIMD_sin __DECL_SIMD_x86_64
37 # endif
38 #endif