[PATCH] D36410: [OpenCL] Handle taking address of block captures
Anastasia Stulova via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 6 10:36:28 PDT 2017
Anastasia added a comment.
In https://reviews.llvm.org/D36410#856907, @bader wrote:
> In https://reviews.llvm.org/D36410#856716, @yaxunl wrote:
>
> > The captured variable is still passed by value. The address taking is on the duplicate of the captured variable, not on the original variable.
>
>
> In this case address of captured variables should point to the private address space, as function parameters reside in private address space (see "6.5 Address Space Qualifiers" paragraph 3).
This will only apply to blocks used as lambda functions though. But if they are enqueued using `enqueue_kernel` the captures should be accessible from the areas outside current thread too.
https://reviews.llvm.org/D36410
More information about the cfe-commits
mailing list