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
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
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.
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.
We just need to get those definitions of the device-side functions and we don't care whether host-side functions with the same name are visible at the same time. I wish CUDA would just put all device-side function definitions into a separate file/namespace and let us cherry-pick them at will. Alas, we have to work around nvcc's work arounds...
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.
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, that's right. Okay then. :)