This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH 1/N] x86_64 vectorization support: vectorized math functions addition to Glibc
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Andrew Senkevich <andrew dot n dot senkevich at gmail dot com>
- Cc: "Zamyatin, Igor" <igor dot zamyatin at intel dot com>, Jakub Jelinek <jakub at redhat dot com>, libc-alpha <libc-alpha at sourceware dot org>
- Date: Thu, 27 Nov 2014 17:17:48 +0000
- Subject: Re: [PATCH 1/N] x86_64 vectorization support: vectorized math functions addition to Glibc
- Authentication-results: sourceware.org; auth=none
- References: <CAMXFM3t=ppndDUBzHzSus7xyuF5hTaLFZ5b273jD39NtddSvsw at mail dot gmail dot com> <Pine dot LNX dot 4 dot 64 dot 1409101549490 dot 12853 at digraph dot polyomino dot org dot uk> <6D39441BF12EF246A7ABCE6654B0235320F09D65 at LEMAIL01 dot le dot imgtec dot org> <20140911210246 dot GN23797 at brightrain dot aerifal dot cx> <87a9655rnu dot fsf at tassilo dot jf dot intel dot com> <20140912074251 dot GZ17454 at tucnak dot redhat dot com> <Pine dot LNX dot 4 dot 64 dot 1409121700030 dot 1118 at digraph dot polyomino dot org dot uk> <20140912170827 dot GE17454 at tucnak dot redhat dot com> <CAMXFM3u5DM_W=iiVReBszH4TY4Wwf3Vm7d79chwdfD_J5tTz5A at mail dot gmail dot com> <20141112175149 dot GK5026 at tucnak dot redhat dot com> <alpine dot DEB dot 2 dot 10 dot 1411121809000 dot 23958 at digraph dot polyomino dot org dot uk> <0EFAB2BDD0F67E4FB6CCC8B9F87D756969C63403 at IRSMSX152 dot ger dot corp dot intel dot com> <alpine dot DEB dot 2 dot 10 dot 1411172353190 dot 3980 at digraph dot polyomino dot org dot uk> <CAMXFM3vYXM2xxqk3qCRE2z3ot8NQ=QLaAvVkdQXPPRneTCVUAA at mail dot gmail dot com>
On Thu, 27 Nov 2014, Andrew Senkevich wrote:
> here is draft version of such a document, could you please review it?
> GLIBC 2.21 VECTOR MATH FUNCTIONS X86_64 ABI/API
Most of this document is not part of what needs agreeing between compiler
implementations (it could e.g. form part of an article informing people
about new features in glibc 2.21).
> 3. Variants of available vector math functions names
> Name of vector function created by GCC 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.
> For compatibility with GCC according names was taken for vector math
> functions in Glibc.
> #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)
> _ZGVdN4v_func (it is AVX2 implementation).
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
Joseph S. Myers