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 <rz...@uni-heidelberg.de> To: "Tobias Burnus" <tob...@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 <tob...@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