[PATCH] D37906: [CUDA] Work around a new quirk in CUDA9 headers.

2017-09-15 Thread Artem Belevich via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL313369: [CUDA] Work around a new quirk in CUDA9 headers. (authored by tra). Changed prior to commit: https://reviews.llvm.org/D37906?vs=115415=115422#toc Repository: rL LLVM

[PATCH] D37906: [CUDA] Work around a new quirk in CUDA9 headers.

2017-09-15 Thread Justin Lebar via Phabricator via cfe-commits
jlebar accepted this revision. jlebar added a comment. This revision is now accepted and ready to land. > BTW, this change essentially augments the job that the "#undef GNUC" above > used to do in older CUDA versions. CUDA9 replaced GNUC with _GLIBCXX_MATH_H > in CUDA-9 in some places. Ah,

[PATCH] D37906: [CUDA] Work around a new quirk in CUDA9 headers.

2017-09-15 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. I don't think we really care why they do it for nvcc. My understanding is that nvcc needs to avoid name clashes between their implementation of functions and the ones that come from the host headers and that's why they have to tread really carefully around host includes.

[PATCH] D37906: [CUDA] Work around a new quirk in CUDA9 headers.

2017-09-15 Thread Justin Lebar via Phabricator via cfe-commits
jlebar added a comment. This is a bit of a Chesterton's Fence -- do we know why they're doing this? I guess it's probably going to be OK because our overriding semantics will make it OK, and our test-suite tests (should) exercise all of math.h. But I'm still a little worried about it.

[PATCH] D37906: [CUDA] Work around a new quirk in CUDA9 headers.

2017-09-15 Thread Artem Belevich via Phabricator via cfe-commits
tra created this revision. Herald added a subscriber: sanjoy. In CUDA-9 some of device-side math functions that we need are conditionally defined within '#if _GLIBCXX_MATH_H'. We need to temporarily undo the guard around inclusion of math_functions.hpp https://reviews.llvm.org/D37906 Files: