GOMP: OMP 5.1: simd construct for non-pointer random access iterators

Tobias Burnus tobias@codesourcery.com
Thu Dec 15 20:53:50 GMT 2022


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


More information about the Gcc mailing list