This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC 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: PPC64 libmvec implementation of sincos


‐‐‐‐‐‐‐ 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?

Bert.


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