This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 1/N] x86_64 vectorization support: vectorized math functions addition to Glibc


2014-11-27 20:17 GMT+03:00 Joseph Myers <joseph@codesourcery.com>:
> This is all that is needed.  It needs to be written in a
> compiler-independent manner (and agreed between compilers), and state
> explicitly that the semantics of those pragmas are independent of the
> processor for which code is being generated (so, for example, those
> pragmas must not be interpreted as meaning AVX512 versions of functions
> are available even if code is being built for a processor with AVX512
> support) and that any future ABI extension that defines additional vector
> function versions will also define a different pragma to declare their
> availability.

GLIBC 2.21 VECTOR MATH FUNCTION NAME VARIANTS FOR x86_64

Name of vector math function is based on Intel Vector Function ABI
(http://www.cilkplus.org/sites/default/files/open_specifications/Intel-ABI-Vector-Function-2012-v0.9.5.pdf)
with a little difference in part of name specifying ISA â namely
letters b, c, d instead of x, y, Y.

#pragma omp declare simd notinbranch simdlen(2) for some function
âfuncâ means what the name of vector version is:

_ZGVbN2v_func (it is SSE4 implementation).

#pragma omp declare simd notinbranch simdlen(4) for some function
âfuncâ means what the following names are available:

_ZGVcN4v_func (it is AVX implementation)
and
_ZGVdN4v_func (it is AVX2 implementation).

Every vector function should be provided by Glibc for each supported
ISA (currently SSE4, AVX and AVX2).

Semantics of those pragmas are independent of the processor for which
code is being generated.

Those pragmas must not be interpreted as meaning AVX512 versions of
functions are available even if code is being built for a processor
with AVX512 support.

Any future ABI extension that defines additional vector function
versions will also define a different pragma to declare their
availability.

Is it Ok and where is the proper place to put this document, include
to documentation I think, not to wiki?


--
WBR,
Andrew


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]