[PATCH 1/N] x86_64 vectorization support: vectorized math functions addition to Glibc
Andrew Senkevich
andrew.n.senkevich@gmail.com
Wed Sep 17 11:58:00 GMT 2014
Hi Jakub,
> +/* For now we have vectorized version only for _Mdouble_ case */
> +#if !defined _Mfloat_ && !defined _Mlong_double_
> +# if defined _OPENMP && _OPENMP >= 201307
> +# define __DECL_SIMD _Pragma ("omp declare simd")
>
> As the function is provided only on x86_64, it needs to be guarded
> by defined __x86_64__ too (or have some way how arch specific
> headers can tell what function are elemental).
> Also, only the N (notinbranch) version is provided, so you'd
> need to use "omp declare simd notinbranch", and furthermore only
> the AVX2 version is provided (that is not possible for gcc,
> you need all of SSE2, AVX and AVX2 versions, the other two can be
> thunked (extract arguments and call cos in a loop or similarly, then
> pass result in vector reg again).
thank you, this place will look so:
#if defined (__x86_64__) && !defined _Mfloat_ && !defined _Mlong_double_ \
&& defined _OPENMP && _OPENMP >= 201307
# define __DECL_SIMD _Pragma ("omp declare simd notinbranch")
#else
# define __DECL_SIMD
#endif
Only AVX will be thunked, SSE4 we have implemented.
It will be added in next patch soon.
More information about the Libc-alpha
mailing list