summaryrefslogtreecommitdiffstats
path: root/clang/lib/Headers/cuda_builtin_vars.h
Commit message (Collapse)AuthorAgeFilesLines
* [CUDA] Rename cuda_builtin_vars.h to __clang_cuda_builtin_vars.h.Justin Lebar2016-10-081-126/+0
| | | | | | | | | | | | Summary: This matches the idiom we use for our other CUDA wrapper headers. Reviewers: tra Subscribers: beanz, mgorny, cfe-commits Differential Revision: https://reviews.llvm.org/D24978 llvm-svn: 283679
* NVPTX: Use the nvvm builtins to read SRegs rather than the legacy ptx onesJustin Bogner2016-07-071-13/+13
| | | | | | The ptx spellings were removed from LLVM in r274769. llvm-svn: 274770
* [CUDA] Add conversion operators for threadIdx, blockIdx, gridDim, and ↵Justin Lebar2016-02-241-1/+17
| | | | | | | | | | | | | | | | | | | | | | | | | blockDim to uint3 and dim3. Summary: This lets you write, e.g. uint3 a = threadIdx; uint3 b = blockIdx; dim3 c = gridDim; dim3 d = blockDim; which is legal in nvcc, but was not legal in clang. The fact that e.g. the type of threadIdx is not actually uint3 is still observable, but now you have to try to observe it. Reviewers: tra Subscribers: echristo, cfe-commits Differential Revision: http://reviews.llvm.org/D17561 llvm-svn: 261777
* [cuda] Added support for CUDA built-in variables.Artem Belevich2015-04-211-0/+110
Added cuda_builtin_vars.h which implements built-in CUDA variables using __declattr(property). Fields of built-in variables (except for warpSize) are implemented using __declattr(property) which replaces read/write of a member field with a call to a getter/setter member function, in this case with appropriate NVPTX builtin. Added a test case to check diagnostics on attempt to construct or improperly access a built-in variable. Differential Revision: http://reviews.llvm.org/D9064 llvm-svn: 235448
OpenPOWER on IntegriCloud