[PATCH] D78655: [CUDA][HIP] Let non-caputuring lambda be host device
Yaxun Liu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 22 11:49:29 PDT 2020
yaxunl marked an inline comment as done.
yaxunl added a comment.
In D78655#2107016 <https://reviews.llvm.org/D78655#2107016>, @tra wrote:
> In D78655#2105058 <https://reviews.llvm.org/D78655#2105058>, @yaxunl wrote:
>
> > - lambdas with any lambda-capture (which must therefore have an enclosing function) inherit the enclosing function's HDness.
>
>
> Nit: *any* capture does not necessarily imply existence of the enclosing function. One can explicitly capture variables in the global scope. E.g.:
>
> int x;
> auto l = [x=x](){ return x;};
>
It seems we can only promote non-capturing lambdas, no matter whether it has enclosing function or not.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D78655/new/
https://reviews.llvm.org/D78655
More information about the cfe-commits
mailing list