[Openmp-dev] error: array section does not specify contiguous storage

Doerfert, Johannes via Openmp-dev openmp-dev at lists.llvm.org
Sun Sep 29 19:23:20 PDT 2019


For now you need a second map in a for loop, something like:

#map outer
for (...)
  #map inner array

better syntactic support might make it in 5.1.

________________________________________
From: Openmp-dev <openmp-dev-bounces at lists.llvm.org> on behalf of Itaru Kitayama via Openmp-dev <openmp-dev at lists.llvm.org>
Sent: Sunday, September 29, 2019 21:18
To: Alexey Bataev
Cc: openmp-dev
Subject: Re: [Openmp-dev] error: array section does not specify contiguous      storage

No way to map this array of pointers then?

On Mon, Sep 30, 2019 at 11:11 Alexey Bataev <a.bataev at hotmail.com<mailto:a.bataev at hotmail.com>> wrote:
Yes, because this is not contiguous array section.

Best regards,
Alexey Bataev

> 29 сент. 2019 г., в 22:08, Itaru Kitayama via Openmp-dev <openmp-dev at lists.llvm.org<mailto:openmp-dev at lists.llvm.org>> написал(а):
>
> 
> I thought the code like below should compile with Clang:
>
>         int **p;
>         p = new int*[1024];
>         for (int i=0;i<1024;i++)
>                 p[i] = new int[1024];
> #pragma omp target parallel for map(p[0:1024][0:1024]) reduction(+: sum)
>
> ... but I get a build-time error. Is this expected even in the recent trunk?
> _______________________________________________
> Openmp-dev mailing list
> Openmp-dev at lists.llvm.org<mailto:Openmp-dev at lists.llvm.org>
> https://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev


More information about the Openmp-dev mailing list