]> granicus.if.org Git - clang/commitdiff
[CUDA] Pre-include sm_60 and sm_61 headers.
authorArtem Belevich <tra@google.com>
Wed, 4 Jan 2017 18:39:29 +0000 (18:39 +0000)
committerArtem Belevich <tra@google.com>
Wed, 4 Jan 2017 18:39:29 +0000 (18:39 +0000)
CUDA-8.0 comes with new headers which nvcc pre-includes via cuda_runtime.h
Clang now makes them available as well.

Differential Revision: https://reviews.llvm.org/D28301

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@290982 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Headers/__clang_cuda_runtime_wrapper.h

index 205e15b40b5d4b7b57860d46c08ae24f2d18eec9..931d44b6965b70beecab75d89feae6de5755fc43 100644 (file)
@@ -232,6 +232,11 @@ static inline __device__ void __brkpt(int __c) { __brkpt(); }
 // hardware, seems to generate faster machine code because ptxas can more easily
 // reason about our code.
 
+#if CUDA_VERSION >= 8000
+#include "sm_60_atomic_functions.hpp"
+#include "sm_61_intrinsics.hpp"
+#endif
+
 #undef __MATH_FUNCTIONS_HPP__
 
 // math_functions.hpp defines ::signbit as a __host__ __device__ function.  This