[PATCH] D94884: [Clang][OpenMP] Include header for CUDA builtin vars into OpenMP wrapper header

Artem Belevich via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 19 14:15:50 PST 2021


tra added a comment.

In D94884#2508000 <https://reviews.llvm.org/D94884#2508000>, @JonChesterfield wrote:

> I won't object too strongly, as ultimately I don't care about cuda, but I view intertwining the two implementations as technical debt.

+1 A lot of CUDA-releated headers are not intended to be reusable nor often the best way to implement particular functionality.
While it may be tempting to reuse existing CUDA bits, having a clean implementation not tied to CUDA SDK is usually better.

That said, the builtin vars header is relatively independent from the CUDA SDK (unlike the runtime wrapper and various math-related headers)  and is OK to use for other purposes, if needed.

Whether OpenMP should make threadIdx & friends available -- I have no opinion on.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D94884



More information about the cfe-commits mailing list