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]

OpenMP vector function ABI for x86_64


ÂHi,

during work on addition vector math functions to Glibc and discussions
with community was found an issue with meaning of â#pragma omp declare
simdâ (which will appear in math.h).

Issue is there are no working way to specify ISA of vector function
in GCC 5.0, and hence no way to determine exact vector function name.

Here is description of exact meaning of â#pragma omp declare simdâ for x86_64.

This is proposed as agreement between compilers supporting OpenMP.

*************** OpenMP vector function ABI 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 math library 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 version of other ISA
of functions are available even if code is being built for a processor
with such ISA support.
Any future ABI extension that defines additional vector function
versions will also define a different pragma to declare their
availability.

*********************************************************************

Any feedback?


--
WBR,
Andrew


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