[PATCH] D78655: [CUDA][HIP] Let lambda be host device by default

Paul Fultz II via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 30 18:28:14 PDT 2020


pfultz2 added inline comments.


================
Comment at: clang/test/SemaCUDA/lambda.cu:27
+
+    kernel<<<1,1>>>([&](){ hd(b); });
+    // dev-error at -1 {{capture host side class data member by this pointer in device or host device lambda function}}
----------------
Will this still produce diagnostics when the lambda is explicitly `__device__`? Maybe you could add a test case for that.

```
kernel<<<1,1>>>([&]() __device__ { hd(b); });
```


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D78655/new/

https://reviews.llvm.org/D78655





More information about the cfe-commits mailing list