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: [RFC] How to add vector math functions to Glibc


On Thu, Sep 25, 2014 at 1:48 PM, Carlos O'Donell <carlos@redhat.com> wrote:
> On 09/25/2014 04:03 PM, H.J. Lu wrote:
>>> Sorry, I don't understand this part, and perhaps that's why I didn't
>>> understand question 7 in the previous post.
>>>
>>> What does it mean for the vector library to target GCC?
>>>
>>
>> From
>>
>> https://sourceware.org/glibc/wiki/libm#Addition_of_x86_64_vector_math_functions_to_Glibc
>
> Thanks for the pointer. I understand now.
>
>> 3.1. Goal
>>
>> Main goal is to improve vectorization of GCC with OpenMP4.0 SIMD
>> constructs (#2.8 in http://www.openmp.org/mp-documents/OpenMP4.0.0.pdf
>> and Cilk Plus constructs (#6-8 in
>> http://www.cilkplus.org/sites/default/files/open_specifications/Intel_Cilk_plus_lang_spec_1.2.htm)
>> on x86_64 by adding SSE4, AVX and AVX2 vector implementations of
>> several vector math functions (float and double versions). AVX-512
>> versions are planned to be added later. These functions can be also
>> used manually (with intrinsics) by developers to obtain speedup.
>>
>> So it is mainly for GCC.
>
> The only counter-argument to that is that a single implementation
> in glibc can be shared by gcc and llvm or any other compiler. As
> noted in "3.5 Open questions, a."
>

I don't think it is an issue since llvm uses libraries from GCC
by default and put it in GLIBC doesn't help llvm on non-GLIBC
based systems either.

Put it in GLIBC means that GCC 5.0 may not support vector
math, depending on the build or target GLIBC.  It is not a good
GCC user experience.

Put it in GCC means that GCC 5.0 supports vector math on
all platforms supported by vector math, including non-GLIBC
based systems.

That is true that programmers who want to use vector math
directly need to install GCC 5.0.  That is one reason I am
asking who is the main user of vector math.

-- 
H.J.


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