sfantao added a comment.

In http://reviews.llvm.org/D16749#378969, @ABataev wrote:

> Samuel, this is true for device part of codegen. But what about host? If 
>  this code must be executed on host, will it be handled correctly?


Hi Alexey,

Yes, it will be handled correctly. The map clause doesn't change the way 
codegen is done for the host. The host always takes the original references 
regardless the map clause and its modifiers. Even for the device side, map 
clause won't have any effect in the code generation of the outlined target 
function. This behavior is what ensures that everything works seamlessly in a 
system that has a shared address space for host and device.

In any case, I added a new regression tests (CK25) that ensures that the lambda 
gets the same captures regardless the map clause.


http://reviews.llvm.org/D16749



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to