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.

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.


https://reviews.llvm.org/D37906



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

Reply via email to