[PATCH] D125669: Adding support for target in_reduction

Alexey Bataev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 23 03:59:50 PDT 2022


ABataev added a comment.

In D125669#3604302 <https://reviews.llvm.org/D125669#3604302>, @RitanyaB wrote:

> In D125669#3599134 <https://reviews.llvm.org/D125669#3599134>, @ABataev wrote:
>
>> What about the description? Shall we still emit ` if(0)`?
>
> Can you please elaborate for more clarity?

The description of the patch 
So, this

#pragma omp target in_reduction(+:res)

  for (int i=0; i<N; i++) {
    res = res+i
  }

will become

#pragma omp task in_reduction(+:res) if(0)
#pragma omp target map(res)
for (int i=0; i<N; i++) {

  res = res+i

}

So, the question is is this still true?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D125669/new/

https://reviews.llvm.org/D125669



More information about the cfe-commits mailing list