From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <libc-alpha-return-52921-listarch-libc-alpha=sources.redhat.com@sourceware.org>
Received: (qmail 16763 invoked by alias); 17 Sep 2014 11:58:18 -0000
Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm
Precedence: bulk
List-Id: <libc-alpha.sourceware.org>
List-Subscribe: <mailto:libc-alpha-subscribe@sourceware.org>
List-Archive: <http://sourceware.org/ml/libc-alpha/>
List-Post: <mailto:libc-alpha@sourceware.org>
List-Help: <mailto:libc-alpha-help@sourceware.org>, <http://sourceware.org/ml/#faqs>
Sender: libc-alpha-owner@sourceware.org
Received: (qmail 16752 invoked by uid 89); 17 Sep 2014 11:58:17 -0000
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-0.1 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2
X-HELO: mail-qc0-f173.google.com
X-Received: by 10.229.48.135 with SMTP id r7mr53681761qcf.9.1410955093984;
 Wed, 17 Sep 2014 04:58:13 -0700 (PDT)
MIME-Version: 1.0
In-Reply-To: <20140917100849.GD17454@tucnak.redhat.com>
References: <CAMXFM3t=ppndDUBzHzSus7xyuF5hTaLFZ5b273jD39NtddSvsw@mail.gmail.com>
 <Pine.LNX.4.64.1409101549490.12853@digraph.polyomino.org.uk>
 <5411F8D3.7050001@redhat.com> <CAMXFM3vEbTO1ntx7KOAG21axosPApTG6vwpcnu7B4VVATD+USw@mail.gmail.com>
 <CAMe9rOqFmwMWYBSsg9gPNeB_nskWZMSpzeWwc=YomsTNzjCn1A@mail.gmail.com>
 <CAMXFM3uNrRrAHDdS0LnbRZ7QwEFv1yd25cu1Ht2NC8fMBxLsBA@mail.gmail.com> <20140917100849.GD17454@tucnak.redhat.com>
From: Andrew Senkevich <andrew.n.senkevich@gmail.com>
Date: Wed, 17 Sep 2014 11:58:00 -0000
Message-ID: <CAMXFM3uBVX+V68-9zSgkV22rZ+MkYQvUQe6wjAKg9q2-cFhx=Q@mail.gmail.com>
Subject: Re: [PATCH 1/N] x86_64 vectorization support: vectorized math
 functions addition to Glibc
To: Jakub Jelinek <jakub@redhat.com>
Cc: "H.J. Lu" <hjl.tools@gmail.com>, "Carlos O'Donell" <carlos@redhat.com>, 
	"Joseph S. Myers" <joseph@codesourcery.com>, libc-alpha <libc-alpha@sourceware.org>, 
	"Zamyatin, Igor" <igor.zamyatin@intel.com>, 
	"Melik-Adamyan, Areg" <areg.melik-adamyan@intel.com>
Content-Type: text/plain; charset=UTF-8
X-SW-Source: 2014-09/txt/msg00418.txt.bz2

Hi Jakub,

> +/* For now we have vectorized version only for _Mdouble_ case */
> +#if !defined _Mfloat_ && !defined _Mlong_double_
> +# if defined _OPENMP && _OPENMP >= 201307
> +#  define __DECL_SIMD _Pragma ("omp declare simd")
>
> As the function is provided only on x86_64, it needs to be guarded
> by defined __x86_64__ too (or have some way how arch specific
> headers can tell what function are elemental).
> Also, only the N (notinbranch) version is provided, so you'd
> need to use "omp declare simd notinbranch", and furthermore only
> the AVX2 version is provided (that is not possible for gcc,
> you need all of SSE2, AVX and AVX2 versions, the other two can be
> thunked (extract arguments and call cos in a loop or similarly, then
> pass result in vector reg again).

thank you, this place will look so:

#if defined (__x86_64__) && !defined _Mfloat_ && !defined _Mlong_double_ \
     && defined _OPENMP && _OPENMP >= 201307
# define __DECL_SIMD _Pragma ("omp declare simd notinbranch")
#else
# define __DECL_SIMD
#endif

Only AVX will be thunked, SSE4 we have implemented.
It will be added in next patch soon.