[PATCH] D108493: [HIP] Allow capture this pointer in device lambda

2021-09-08 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked an inline comment as done. yaxunl added inline comments. Comment at: clang/lib/Sema/SemaCUDA.cpp:881-882 + } else if (Capture.isThisCapture() && !LangOpts.HIP) { +// Capture of this pointer is allowed for HIP since this pointer may be +// pointing to manage

[PATCH] D108493: [HIP] Allow capture this pointer in device lambda

2021-08-20 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: clang/lib/Sema/SemaCUDA.cpp:881-882 + } else if (Capture.isThisCapture() && !LangOpts.HIP) { +// Capture of this pointer is allowed for HIP since this pointer may be +// pointing to managed memory which is accessible on both device

[PATCH] D108493: [HIP] Allow capture this pointer in device lambda

2021-08-20 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added a reviewer: tra. yaxunl requested review of this revision. HIP currently diagnose capture of `this` pointer in device lambda in host member functions. If `this` pointer points to managed memory, it can be used in both device and host functions. Under this