public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* GOMP: OMP 5.1: simd construct for non-pointer  random access iterators
@ 2022-12-15 20:31 Grosse-Bley, Paul Leonard
  2022-12-15 20:40 ` Jakub Jelinek
  2022-12-15 20:53 ` Tobias Burnus
  0 siblings, 2 replies; 3+ messages in thread
From: Grosse-Bley, Paul Leonard @ 2022-12-15 20:31 UTC (permalink / raw)
  To: gcc

[-- Attachment #1: Type: text/plain, Size: 394 bytes --]


Hi together,

I just ran into the issue that `#pragma omp simd` does not work on C++ iterator loops (godbolt).
From going through the specifications I understand that this restriction was part of 4.5 and 5.0, but was dropped with 5.1.
As I couldn't find this change in the table of 5.1 (or 5.2) features for libgomp, I wanted to ask if this is on the horizon.

Best,
Paul Große-Bley

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: GOMP: OMP 5.1: simd construct for non-pointer random access iterators
  2022-12-15 20:31 GOMP: OMP 5.1: simd construct for non-pointer random access iterators Grosse-Bley, Paul Leonard
@ 2022-12-15 20:40 ` Jakub Jelinek
  2022-12-15 20:53 ` Tobias Burnus
  1 sibling, 0 replies; 3+ messages in thread
From: Jakub Jelinek @ 2022-12-15 20:40 UTC (permalink / raw)
  To: Grosse-Bley, Paul Leonard; +Cc: gcc

On Thu, Dec 15, 2022 at 09:31:50PM +0100, Grosse-Bley, Paul Leonard wrote:
> 
> Hi together,
> 
> I just ran into the issue that `#pragma omp simd` does not work on C++ iterator loops (godbolt).
> >From going through the specifications I understand that this restriction was part of 4.5 and 5.0, but was dropped with 5.1.
> As I couldn't find this change in the table of 5.1 (or 5.2) features for libgomp, I wanted to ask if this is on the horizon.

That is not the case.
OpenMP 5.1 has the restriction on p. 137 l. 22:
"The only random access iterator types that are allowed for the associated loops are pointer
types."
OpenMP 5.2 has the same thing on p. 235 l. 31.
Even TR11 (first OpenMP 6.0 draft) has the same wording on p. 246 l. 2.

	Jakub


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: GOMP: OMP 5.1: simd construct for non-pointer random access iterators
  2022-12-15 20:31 GOMP: OMP 5.1: simd construct for non-pointer random access iterators Grosse-Bley, Paul Leonard
  2022-12-15 20:40 ` Jakub Jelinek
@ 2022-12-15 20:53 ` Tobias Burnus
  1 sibling, 0 replies; 3+ messages in thread
From: Tobias Burnus @ 2022-12-15 20:53 UTC (permalink / raw)
  To: Grosse-Bley, Paul Leonard, gcc

Hi,

On 15.12.22 21:31, Grosse-Bley, Paul Leonard wrote:
> I just ran into the issue that `#pragma omp simd` does not work on C++ iterator loops (godbolt).
>  From going through the specifications I understand that this restriction was part of 4.5 and 5.0, but was dropped with 5.1.
I assume that it is about "non-pointer random access iterators" – as the
subject line states.

In OpenMP 5.0, there is:

"2.9.1 Canonical Loop Form":  "In the simd construct the only random
access iterator types that are allowed for var are pointer types."
[OpenMP 5.0, 100:15-16]

But I still see in OpenMP 5.1:

"2.11.5.1 simd Construct": "Restrictions to the simd construct are as
follows: ... [C++] The only random access iterator types that are
allowed for the associated loops are pointer types." [OpenMP 5.1, 137:2,
137:22].

Same words as in 5.1 are also in OpenMP 5.2 in "10.4 simd Construct"
[235:31].

Did I miss something? If so, can you provide the example?

Tobias

-----------------
Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-12-15 20:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-15 20:31 GOMP: OMP 5.1: simd construct for non-pointer random access iterators Grosse-Bley, Paul Leonard
2022-12-15 20:40 ` Jakub Jelinek
2022-12-15 20:53 ` Tobias Burnus

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).