]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Utilize x86_64 vector math functions w/o -fopenmp.
authorAndrew Senkevich <andrew.senkevich@intel.com>
Mon, 7 Dec 2015 18:58:26 +0000 (21:58 +0300)
committerAndrew Senkevich <andrew.senkevich@intel.com>
Mon, 7 Dec 2015 18:58:26 +0000 (21:58 +0300)
This patch allows to use x86_64 vector math functions with GCC 6.*
without OpenMP SIMD constructs.  For additional details please visit
<https://sourceware.org/glibc/wiki/libmvec#Example_2>.

    * sysdeps/x86/fpu/bits/math-vector.h: W/o -fopenmp declare vector math
    functions with GCC 6.* __attribute__ ((__simd__)).

ChangeLog
sysdeps/x86/fpu/bits/math-vector.h

index 379ba75ee1ae1680e77cade913cdea972aa904db..7d9622b0ba1b9e793e3980974bc7a2a5dbc5b94a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-12-07  Andrew Senkevich  <andrew.senkevich@intel.com>
+
+       * sysdeps/x86/fpu/bits/math-vector.h: W/o -fopenmp use GCC 6.*
+       __attribute__ ((__simd__)) for vector math function declarations.
+
 2015-12-04  Paul Eggert  <eggert@cs.ucla.edu>
 
        Fix typo in strncat, wcsncat manual entries
index f3bfb869d4cd93a3df4e1423f0556f321aaf6303..495e895df99ea4aebbde18753510cbd93ad14dd1 100644 (file)
 # if defined _OPENMP && _OPENMP >= 201307
 /* OpenMP case.  */
 #  define __DECL_SIMD_x86_64 _Pragma ("omp declare simd notinbranch")
+# elif __GNUC_PREREQ (6,0)
+/* W/o OpenMP use GCC 6.* __attribute__ ((__simd__)).  */
+#  define __DECL_SIMD_x86_64 __attribute__ ((__simd__ ("notinbranch")))
+# endif
+
+# ifdef __DECL_SIMD_x86_64
 #  undef __DECL_SIMD_cos
 #  define __DECL_SIMD_cos __DECL_SIMD_x86_64
 #  undef __DECL_SIMD_cosf