Home | History | Annotate | Download | only in docs

Lines Matching full:clang

34 #. Checkout Clang
40 $ svn co http://llvm.org/svn/llvm-project/cfe/trunk clang
42 #. Configure and build LLVM and Clang
107 $ clang++ axpy.cu -o axpy --cuda-gpu-arch=<GPU arch> \
122 Detecting clang vs NVCC
125 Although clang's CUDA implementation is largely compatible with NVCC's, you may
126 still want to detect when you're compiling CUDA code specifically with clang.
128 This is tricky, because NVCC may invoke clang as part of its own compilation
130 compiling for device code, and that host compiler may in fact be clang.
132 When clang is actually compiling CUDA code -- rather than being used as a
134 defined only in device mode (but will be defined if NVCC is using clang as a
135 preprocessor). So you can use the following incantations to detect clang CUDA
141 // clang compiling CUDA code, host mode.
145 // clang compiling CUDA code, device mode.
148 Both clang and nvcc define ``__CUDACC__`` during CUDA compilation. You can
186 example, this flag allows clang to emit the ptx ``sin.approx.f32``
221 <http://clang.llvm.org/docs/AttributeReference.html#pragma-unroll-pragma-nounroll>`_