jdoerfert added reviewers: tra, MaskRay.
jdoerfert added subscribers: MaskRay, tra.
jdoerfert added a comment.

I like this. I hope this is the start of splitting the `__cuda` headers into 
generic and specific code, right?  @tra @MaskRay any objections on the 
direction?



================
Comment at: clang/lib/Headers/offload_macros.h:22
+//===----------------------------------------------------------------------===//
+//===----------------------------------------------------------------------===//
+
----------------
Nit duplicate


================
Comment at: clang/lib/Headers/offload_macros.h:69
+#endif
+#endif
+
----------------
I guess the pattern
```
#if defined(__AMDGCN__)
#define _DEVICE_ARCH amdgcn
// _DEVICE_GPU set below
#endif
#if defined(__NVPTX__)
#define _DEVICE_ARCH nvptx64
#define _DEVICE_GPU __CUDA_ARCH__
#endif
```
is repeating here but it might make sense to lists all the cases one by one 
instead of a single conditional, e.g., `ifdef OPENMP || SYCL || OPENCL || ...`




Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D84743

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

Reply via email to