public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Fwd: Re: GOMP: OMP  5.1: simd  construct for non-pointer random access  iterators
@ 2022-12-15 21:40 Grosse-Bley, Paul Leonard
  0 siblings, 0 replies; only message in thread
From: Grosse-Bley, Paul Leonard @ 2022-12-15 21:40 UTC (permalink / raw)
  To: gcc

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


Sorry, I just saw that I only answered Jakub and Tobias directly instead of CCing the List,
so I will just forward my answer to Tobias to avoid wasting anyones time.



-------- Original Message --------
Subject: Re: GOMP: OMP 5.1: simd construct for non-pointer random access iterators
Date: Thursday, December 15, 2022 22:19 CET
From: Grosse-Bley, Paul Leonard <rz230@uni-heidelberg.de>
To: "Tobias Burnus" <tobias@codesourcery.com>


Hi Tobias,

as Jakub pointed out to me, the restriction was just moved in the standard (or a redundant copy removed).
The mention that I was searching for in 5.1 and 5.2 was in the "Canonical Loop Form" chapter and not in the chapter about the actual simd construct.
As clang and Intel don't error for that godbold example, I thought I was onto something...

Thanks for answering,

Best,
Paul



On Thursday, December 15, 2022 21:53 CET, Tobias Burnus <tobias@codesourcery.com> wrote:
 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] only message in thread

only message in thread, other threads:[~2022-12-15 21:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-15 21:40 Fwd: Re: GOMP: OMP 5.1: simd construct for non-pointer random access iterators Grosse-Bley, Paul Leonard

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).