This is the mail archive of the
mailing list for the GCC project.
RE: [gomp4] Some progress on #pragma omp simd
- From: "Iyer, Balaji V" <balaji dot v dot iyer at intel dot com>
- To: Aldy Hernandez <aldyh at redhat dot com>
- Cc: Jakub Jelinek <jakub at redhat dot com>, Richard Henderson <rth at redhat dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Sun, 28 Apr 2013 14:45:11 +0000
- Subject: RE: [gomp4] Some progress on #pragma omp simd
- References: <20130419132957 dot GE12880 at tucnak dot redhat dot com> <5175B40F dot 7040709 at redhat dot com> <20130423135455 dot GN12880 at tucnak dot redhat dot com> <BF230D13CA30DD48930C31D40993300032A37760 at FMSMSX101 dot amr dot corp dot intel dot com> <20130424060117 dot GV12880 at tucnak dot redhat dot com> <20130424062536 dot GW12880 at tucnak dot redhat dot com> <20130424064054 dot GX12880 at tucnak dot redhat dot com> <5178692F dot 2010902 at redhat dot com> <BF230D13CA30DD48930C31D40993300032A39A2B at FMSMSX101 dot amr dot corp dot intel dot com> <517C0B34 dot 3050804 at redhat dot com>
> -----Original Message-----
> From: firstname.lastname@example.org [mailto:gcc-patches-
> email@example.com] On Behalf Of Aldy Hernandez
> Sent: Saturday, April 27, 2013 1:30 PM
> To: Iyer, Balaji V
> Cc: Jakub Jelinek; Richard Henderson; firstname.lastname@example.org
> Subject: Re: [gomp4] Some progress on #pragma omp simd
> Hi Balaji.
> >> "The syntax and semantics of the various simd-openmp-data-clauses are
> >> detailed in the OpenMP specification.
> >> (http://www.openmp.org/mp-documents/spec30.pdf, Section 2.9.3)."
> >> Balaji, can you verify which is correct? For that matter, which are
> >> the official specs from which we should be basing this work?
> > Privatization clause makes a variable private for the simd lane. In
> > general, I would follow the spec. If you have further questions,
> > please feel free to ask.
> Ok, so the Cilk Plus 1.1 spec is incorrectly pointing to the OpenMP 3.0 spec,
> because the OpenMP 3.0 spec has the private clause being task/thread private.
> Since the OpenMP 4.0rc2 explicitly says that the private clause is for the SIMD
> lane (as you've stated), can we assume that when the Cilk Plus 1.1 spec mentions
> OpenMP, it is talking about the OpenMP 4.0 spec?
I don't know of all the references to the OMP manual in the spec, so I will be a bit hesitant to make a blanket assumption like that. In this case, I think you can assume that it behaves in the same way as 4.0. If you have further questions, please feel free to ask. In general, #pragma simd, array notation and elemental functions deal with vectorization, not threading. But, Cilk part (Cilk keywords and reducers) deal with threading. All these parts can be mixed and matched (with restrictions) to take advantage of both threading and vectorization.
> One more question Balaji, the Cilk Plus spec says that for #pragma simd, the
> private, firstprivate, lastprivate, and reduction clauses are as OpenMP.
> However, for <#omp simd>, there is no firstprivate in the OpenMP 4.0rc2 spec.
> Is the firstprivate clause valid for Cilk Plus'
> <#pragma simd>?