This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
OpenMP vector function ABI for x86_64
- From: Andrew Senkevich <andrew dot n dot senkevich at gmail dot com>
- To: GCC Mailing List <gcc at gcc dot gnu dot org>, openmp-dev at dcs-maillist2 dot engr dot illinois dot edu, libc-alpha <libc-alpha at sourceware dot org>
- Date: Fri, 26 Dec 2014 19:51:05 +0300
- Subject: OpenMP vector function ABI for x86_64
- Authentication-results: sourceware.org; auth=none
Â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