This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: PPC64 libmvec implementation of sincos
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: GT <tnggil at protonmail dot com>
- Cc: Jakub Jelinek <jakub at redhat dot com>, "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>, Szabolcs Nagy <Szabolcs dot Nagy at arm dot com>, nd <nd at arm dot com>, Bill Schmidt <wschmidt at linux dot ibm dot com>
- Date: Fri, 17 Jan 2020 09:19:21 +0100
- Subject: Re: PPC64 libmvec implementation of sincos
- References: <GcaLIHZaxSm2PVhunNuxEwEJB-BC3PeXIBlmYb6eMw54vZQ_KF6uBjlTgWmWtPNIMMeXu7UyYg797u1vV1_GS2Qv3ThxrUeORQD0wcddwwo=@protonmail.com> <20191206111540.GC10088@tucnak> <CAFiYyc2WJrh2BW5891XhjxM0SsJkxbSOoOh58AeTBmz+Bed9Tw@mail.gmail.com> <hd-6QLiJS0PVrxLBOkT_w0FiGyHomRJkmlR_hRrIGCHZJXhITGVMZ6fzbOFOOoqt6fZ3E1m5tDhtzwDfbeeusk1IdGwsONZFF2nIA4WvxMw=@protonmail.com> <CCED278B-4638-4238-A798-9FD4C98EF2BE@gmail.com> <lyW7bEDQcGe8hV1r_r-252urMynbbu4bJHT-mEJOb4rljDo4-H-BpPiZcKO3EVm2p2EkkvF0Xl_CLCFRael9C5TiBdoNLJ4TCEXbNTPe8iU=@protonmail.com> <CAFiYyc0Pr58VFoR+tKrgi_pvO3OGcHnm4JH=itYF+NdvaqmJUQ@mail.gmail.com> <Ob53m7cSAsYBYj1DHIj9VH8DF5Hihjngpocha0Ctn5zbjEYG8ixA7ZoKAzR4Hm_2XT74neDGiZukyW_c95ppV_dG4XKwRDrybQAfiOUGhSo=@protonmail.com> <CAFiYyc0sSJdCOeqdKtSi+7+u8y_aZ-P6mCgp_nkq5ybfEghb9w@mail.gmail.com> <WmCoNrPoL6wrMXaqKofP1mAcNkuqDYShTab5uZln-mNhVgnv62OLWvqpKeYQyGbhh__GYoyt058t86W2zIXbdtSjJo9aSZsZ4H_HGRJUKL4=@protonmail.com> <1bP43sIDtgGcokozEcGeINTETW5pPYQ93fU4Eo0b856l8R-Nm6eYIaOTA9T6TRVou2CJTWkya2uRIP4SJHX2vuXhyOaxH-IKMrw8aFht2-Q=@protonmail.com>
On Thu, Jan 16, 2020 at 4:54 PM GT <tnggil@protonmail.com> wrote:
>
>
> ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
> On Wednesday, January 15, 2020 3:20 PM, GT <tnggil@protonmail.com> wrote:
>
> > ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
> > On Thursday, January 9, 2020 8:42 AM, Richard Biener richard.guenther@gmail.com wrote:
> >
> > > As for the other question for testing you probably want to provide a
> > > OMP simd declaration
> > > of a function like
> > > _Complex double mycexpi (double);
> > > and make a testcase like
> > > void foo (_Complex double * __restrict out, double *in)
> > > {
> > > for (int i = 0; i < 1024; ++i)
> > > {
> > > out[i] = mycexpi (in[i]);
> > > }
> > > }
> > > or eventually with two output arrays and explicit __real/__imag
> > > processing. The real
> > > and main question is how is the OMP SIMD declaration of mycexpi looking like?
> > > So I'd completely side-step sincos() and GCCs sincos() ->
> > > __builtin_cepxi transform
> > > and concentrate on OMP SIMD of a function with the signature we need to handle.
> > > Richard.
> >
> > I think what is required here is to attach either #pragma omp declare simd orattribute ((simd))
> > to the declaration of builtin cexpi. In gcc/builtins.def, some attributes are provided during
> > creation of cexpi (line 656, call containing BUILT_IN_CEXPI). Attaching the simd attributes to
> > function declarations is how sin, cos, and the other math functions were handled in math-vector.h
> > glibc header file.
>
> You probably intended that we first teach GCC how to vectorize any function which returns a
> _Complex double and has a single parameter of type double. When that's done, move on to solving
> the specific vectorization of __builtin_cexpi. Right?
Yes.
Richard.
> Bert.