Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Utilize x86_64 vector math functions w/o -fopenmp.
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__)).
  • Loading branch information
Andrew Senkevich committed Dec 7, 2015
1 parent 5d1d491 commit 377ed00
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions 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
Expand Down
6 changes: 6 additions & 0 deletions sysdeps/x86/fpu/bits/math-vector.h
Expand Up @@ -28,6 +28,12 @@
# 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
Expand Down

0 comments on commit 377ed00

Please sign in to comment.