[PATCH] D29758: [OpenMP] Parallel reduction on the NVPTX device.

Alexey Bataev via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 10 09:20:20 PST 2017


Arpith, see the comment in CGOpenMPRuntime.cpp

   // if SimpleReduction is true, only the next code is generated:
   //  ...
   //  <LHSExprs>[i] = RedOp<i>(*<LHSExprs>[i], *<RHSExprs>[i]);
   //  ...

and is used for omp simd directive only.

-------------
Best regards,
Alexey Bataev

10.02.2017 18:49, Arpith Jacob via Phabricator пишет:
> arpith-jacob added inline comments.
>
>
> ================
> Comment at: lib/CodeGen/CGOpenMPRuntime.h:956-962
>     virtual void emitReduction(CodeGenFunction &CGF, SourceLocation Loc,
>                                ArrayRef<const Expr *> Privates,
>                                ArrayRef<const Expr *> LHSExprs,
>                                ArrayRef<const Expr *> RHSExprs,
>                                ArrayRef<const Expr *> ReductionOps,
> -                             bool WithNowait, bool SimpleReduction);
> +                             bool WithNowait, bool SimpleReduction,
> +                             OpenMPDirectiveKind ReductionKind);
> ----------------
> ABataev wrote:
>> Number of parameters is getting too big, maybe it is better to aggregate them into a struct/class?
> Thanks Alexey for your comments.  I can place 'WithNoWait, SimpleReduction, ReductionKind' in a struct.
>
> Can you explain what 'SimpleReduction' stands for?  It isn't create to me when the reduction is simple...
>
> Thanks.
>
>
> https://reviews.llvm.org/D29758
>
>
>



More information about the cfe-commits mailing list